void signal_handler(signal_code sig) { switch(sig) { case 600: printf("CarDoor -- Signal Received!!Car door is closed %d\n", sig); break; default: printf("Incorrect Signal - SeatBelt\n"); } _os_rte(); }
void signal_handler(signal_code sig) { switch(sig) { case 600: printf("I am P1 -- Signal Received!! -- %d\nSending signal to the next process\n", sig); break; default: printf("Incorrect Signal - P1\n"); } _os_rte(); }
void sighand(int sig) { switch (sigval = sig) { case 0: fprintf (stderr, "SIG ZERO?\n"); break; case 2: /* fatal signals */ case 3: exit(sig); case SMAP_DONE_SIG: /* printf("got my sig!!\n"); */ break; default: /* ignore signal */ break; } _os_rte(); }