NEXT UP previous
Next: Answers

Exercises

  1. Modify the chat program you wrote in the exercises at the end of the socket library case study to make your server into a daemon.

  2. Add a built-in command to the tiny shell which allows shell users to store simple messages for the system administrator. This new command should operate by taking the message, adding the user's login name to the start of it and sending the completed string to a named pipe called /tmp/messfifo which has previously been created. Then write a daemon process which continuously monitors the read end of the named pipe and transfers any messages it receives to the message file (/tmp/sysmess), along with a time stamp to say when the message was written. If you have sufficient privilege on the machine, you should set tile system up so that user shells cannot write directly to the message file.

NEXT UP previous
Next: Answers