Skip to content

Instantly share code, notes, and snippets.

@pawelz
Created August 14, 2010 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pawelz/524763 to your computer and use it in GitHub Desktop.
Save pawelz/524763 to your computer and use it in GitHub Desktop.
void
sigchld(int signum) {
(void) signum;
if (signal(SIGCHLD, sigchld) == SIG_ERR)
fatal("Can't install SIGCHLD handler");
while(0 < waitpid(-1, NULL, WNOHANG));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment