I have a parent process spawning several child processes. I want to know when any child process exits by registering a SIGCHLD
signal handler.
The question is, what happens if another SIGCHLD
(or any other signal) is received, while the parent process is already in a signal handler?
I can think of the following outcomes:
- The signal is ignored
- The signal is queued, and will be processed as soon as the current handler returns
- The current handler is in turn interrupted, just like the main program
Which one is correct?