|
CS473 - Computer Networks
| Displaying exercises/e4/files/listen.c
/**
* This function should fork(), and execlp() the clear Unix command in the child
* and wait for the child process to complete in the parent.
*/
void clear(void)
{
}
/**
* This should be a signal handler to clean up the socket file and exit when
* at a minimum Ctl-C is pressed.
*/
void cleanup(int sig)
{
}
/**
* Make a program that works just like listen.c, done in class, except that
* it uses a Unix Domain socket to listen on. The default socket path should be
* /tmp/listen, but may be altered by providing a path given by the command line.
* After setting up the socket it should clear the screen and print:
* Login to <hostname> and say at <socket_path>
*
* It should then read messages from the socket continuously and print them
* to the stdout.
*/
int main(int argc, char *argv[])
{
return 0;
}
|