ext/iodine/fio.c
/*
 * Zombie Reaping
 * With thanks to Dr Graham D Shaw.
 * http://www.microhowto.info/howto/reap_zombie_processes_using_a_sigchld_handler.html
 */
Zombie Reaping
With thanks to Dr Graham D Shaw.
Zombie Reaping With thanks to Dr Graham D Shaw .
static void reap_child_handler(int sig) {
  (void)(sig);
  int old_errno = errno;
  while (waitpid(-1, NULL, WNOHANG) > 0)
    ;
  errno = old_errno;
  if (fio_old_sig_chld.sa_handler != SIG_IGN &&
      fio_old_sig_chld.sa_handler != SIG_DFL)
    fio_old_sig_chld.sa_handler(sig);
}
static void reap_child_handler ( int sig ) { ( void ) ( sig ) ; int old_errno = errno ; while ( waitpid ( -1 , NULL , WNOHANG ) > 0 ) ; errno = old_errno ; if ( fio_old_sig_chld . sa_handler != SIG_IGN && fio_old_sig_chld . sa_handler != SIG_DFL ) fio_old_sig_chld . sa_handler ( sig ) ; }
Zombie Reaping
 With thanks to Dr Graham D Shaw.
Zombie Reaping With thanks to Dr Graham D Shaw .