Conn BTW 2 Process Using Signals
Conn BTW 2 Process Using Signals
h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int main() {
int pid;
for (;;) {
// Infinite loop to keep child process running
}
} else { // Parent process
printf("\n PARENT: sending SIGHUP \n\n");
kill(pid, SIGHUP);
sleep(3);
return 0;
}