Signal is a notification sent asynchronously to a #Process that an event has occurred typically used in #unix like operating system.
Signals are defined in #c library signal.h
. All supported signals could be viewed with the command kill -l
or kill -L
. Special signals SIGUSR1 and SIGUSR2 are user defined signals that could be used for process communication.
It could be sent using kill()
Unix System Call# by specifying the target process ID and the signal sent, or raise()
to send Signal to the current process. SIGALRM can be raised using the system call alarm()
with a parameter that specify when will the signal be delivered in seconds. pause()
can be used to put the calling process into suspend until there is a Signal raised.