[PATCH] Improve LinuxThreads compatibility in rfork()
Kostik Belousov
kostikbel at gmail.com
Mon Jul 11 15:41:10 UTC 2011
On Mon, Jul 11, 2011 at 05:43:23PM +0200, Petr Salinger wrote:
> >>The 1st patch satisfies this. I agree that SIGCHLD part
> >>is not easily readable.
> >The SIGCHLD part is ugly. This is why I am asking about possible ways
> >to overcome this.
>
> We need a way to specify "no signal".
> It can be "new flag" or "ugly SIGCHLD".
>
> new flag:
> pros: cleaner design
> cons: one bit of flags eaten
> cons: GNU/kFreeBSD have to detect at runtime which "no signal" have to use
> cons: GNU/kFreeBSD have to add "ugly SIGCHLD" for some time
> (up-to and including next Debian release) anyway
>
> ugly SIGCHLD:
> pros: immediate GNU/kFreeBSD compatibility
> cons: ugly design
>
> But definitely, it would be much, much better to have "new flag" compared
> to diverge indefinitely ;-)
>
> What should be name of the "new flag" ?
>
> #define RFTHPNONE (1<<19) /* do not send exit notification signal to the
> parent */
>
I would instead use a new flag to specify a signal sent on the child
death. Like RFTSIGZMB. If flag is not set, SIGCHLD is used. If it is
set, the bit slice is used as signal number, 0 means do not send any
signal.
Please note that the signal should be checked for validity, it must be
<= _SIG_MAXSIG).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20110711/e46cf73e/attachment.pgp
More information about the freebsd-current
mailing list