Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jul 2011 18:41:02 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Petr Salinger <Petr.Salinger@seznam.cz>
Cc:        freebsd-hackers@freebsd.org, Robert Millan <rmh@debian.org>, current@freebsd.org
Subject:   Re: [PATCH] Improve LinuxThreads compatibility in rfork()
Message-ID:  <20110711154102.GW43872@deviant.kiev.zoral.com.ua>
In-Reply-To: <alpine.LRH.2.02.1107111718440.7134@sci.felk.cvut.cz>
References:  <CAOfDtXMe_pkBdAFpUdvzmfs38Re=nw_YBz4w0Va0naEcuak7iw@mail.gmail.com> <20110711123332.GS43872@deviant.kiev.zoral.com.ua> <alpine.LRH.2.02.1107111455230.7134@sci.felk.cvut.cz> <20110711133342.GT43872@deviant.kiev.zoral.com.ua> <alpine.LRH.2.02.1107111556000.7134@sci.felk.cvut.cz> <20110711142232.GU43872@deviant.kiev.zoral.com.ua> <alpine.LRH.2.02.1107111641340.7134@sci.felk.cvut.cz> <20110711150614.GV43872@deviant.kiev.zoral.com.ua> <alpine.LRH.2.02.1107111718440.7134@sci.felk.cvut.cz>

next in thread | previous in thread | raw e-mail | index | archive | help

--Z0wTxTCd2IDq3u/i
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.
>=20
> We need a way to specify "no signal".
> It can be "new flag" or "ugly SIGCHLD".
>=20
> 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
>=20
> ugly SIGCHLD:
>   pros: immediate GNU/kFreeBSD compatibility
>   cons: ugly design
>=20
> But definitely, it would be much, much better to have "new flag" compared=
=20
> to diverge indefinitely ;-)
>=20
> What should be name of the "new flag" ?
>=20
> #define RFTHPNONE (1<<19)  /* do not send exit notification signal to the=
=20
> parent */
>=20

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
<=3D _SIG_MAXSIG).

--Z0wTxTCd2IDq3u/i
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAk4bGY0ACgkQC3+MBN1Mb4iB3ACg7W4IXzVsMQdGWspxVlmx2A7i
icYAnjOSgI2LR2L42ailheOMQ4OdmDOF
=ARQi
-----END PGP SIGNATURE-----

--Z0wTxTCd2IDq3u/i--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110711154102.GW43872>