Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jul 2011 18:12:15 +0200 (CEST)
From:      Petr Salinger <Petr.Salinger@seznam.cz>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        freebsd-hackers@freebsd.org, Robert Millan <rmh@debian.org>, current@freebsd.org
Subject:   Re: [PATCH] Improve LinuxThreads compatibility in rfork()
Message-ID:  <alpine.LRH.2.02.1107111805350.7134@sci.felk.cvut.cz>
In-Reply-To: <20110711154102.GW43872@deviant.kiev.zoral.com.ua>
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> <20110711154102.GW43872@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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).

We used this:

#define RFTHPNSHIFT    24      /* reserve bits 24-30 */
#define RFTHPNMASK     0x7F    /* for compatibility with linuxthreads/clone()   */
                                /* allow to specify  "clone exit parent notification" signal */
#define RFTHPNSIGNUM(flags)    (((flags) >> RFTHPNSHIFT) & RFTHPNMASK)

Therefore signal #128 (_SIG_MAXSIG) cannot be selected.

Should the bit slice be 7 or 8 bits ?

Petr





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