[Sorry for the late reply.]
As Alexandre Julliard wrote:
Unfortunately, a general patch for this is beyond my (current) capabilities, so I'd really appreciate could the two of you agree on a general fix for this.
Does this do the right thing on FreeBSD?
- struct sigaction sig_act;
- sig_act.sa_handler = SIG_IGN;
- sig_act.sa_flags = 0;
- sigemptyset( &sig_act.sa_mask );
...
+#ifdef SA_NOCLDWAIT
- sig_act.sa_flags |= SA_NOCLDWAIT;
+#endif
- sigaction( SIGCHLD, &sig_act, NULL );
I didn't test that yet, but i think that should work. If SA_NOCLDWAIT is set (in a call for SIGCHLD), sa_handler ought to be ignored anyway.