Avoid non-portable signal(SIGCHLD, SIG_IGN)
Joerg Wunsch
j at uriah.heep.sax.de
Fri Apr 25 15:37:23 CDT 2003
[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.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
More information about the wine-devel
mailing list