Take the tour ×  I'm currently working on a C++ server that
takes requests and spawns off new processes to handle them.
Those child processes then (sometimes) have to execute calls to
system(3) to invoke other programs (third party ones over which
I have no control). This server is being ported over to a new
hardware platform, so I have to retain compatibility between
multiple systems, going back to kernel 2.4.20. I'm currently
ignoring children (signal(SIGCHLD, SIG_IGN)) and this works fine
on the old kernel, however when I run the server on the newer
kernels to which I'm porting the server (2.6, 3.2) on different
hardware, this system call fails, with system(3) setting errno
to ECHILD. What's changed in the kernel and what's the proper
way of handling children if I can't ignore them ? (Note, when I
register a handler for SIGCHLD following Beej's example, it
works fine)  share|improve this question Don't spawn new
processes with system. You're in for a world of pain. –  Daniel
Kamil Kozar Feb 12 at 21:45 Hah