title: Handling multiple SIGCHLD
body: <p>In a system running Linux 2.6.35+ my program creates many child processes and monitors them.  If a child process dies I do some clean-up and spawn the process again. I use <code>signalfd()</code> to get the <code>SIGCHLD</code> signal in my process. <code>signalfd</code> is used asynchronously using <code>libevent</code>.</p>
  
  <p>When using signal handlers for non-real time signals, while the signal handler is running for a particular signal further occurrence of the same signal has to be blocked to avoid getting into recursive handlers. If multiple signals arrive at that time then kernel invokes the handler only once (when the signal is unblocked).</p>
  
  <p>Is it the same behavior when using <code>signalfd()</code> as well? Since <code>signalfd</code> based handling doesn't have the typical problems associated with the asynchronous execution of the normal signal handlers I was thinking kernel can <em>queue</em> all the further occurrences of <code>SIGCHLD</code>? </p>
  
  <p>Can anyone clarify the Linux behavior in this case ...</p>