This seems necessary at least on Linux, otherwise
we handle only the first child process.
git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@37387
b3059339-0415-0410-9bf9-
f77b7e298cf2
do {
pid = waitpid(-1, NULL, WNOHANG);
} while (pid > 0);
+ // Without this, we will be called only once at
+ // least on Linux 3.16.
+ signal(SIGCHLD, child_sighandler);
}
#endif
// Catch signals
#ifndef __MINGW32__
+ // TODO: use newer POSIX SIG_IGN behaviour instead to
+ // automatically handle children?
signal(SIGCHLD, child_sighandler);
#endif