Using fork, pipe and signal.
Set up a C program that uses fork to create two processes.Before forking, create and register
a signal handler for SIGUSR1 and/or SIGUSR2.
It will look something like:
#include <signal.h>
void handler(int isignal){/* C code goes here */}
signal(SIGUSR1, handler);
You’ll also want to create a pipe before you fork.
Use the pipe and signal to pass the client two numbers, have itadd them and pass the result
back to original process.
The forkee will probably look like:
{ for(;;) sleep(100);
}
and its signal handler will do the work.
Solution