From owner-freebsd-current@FreeBSD.ORG Mon Jul 11 16:03:29 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6ABA2106566B; Mon, 11 Jul 2011 16:03:29 +0000 (UTC) (envelope-from Petr.Salinger@seznam.cz) Received: from relay.felk.cvut.cz (relay.felk.cvut.cz [147.32.80.7]) by mx1.freebsd.org (Postfix) with ESMTP id DB52B8FC29; Mon, 11 Jul 2011 16:03:28 +0000 (UTC) Received: from sci.felk.cvut.cz (sci.felk.cvut.cz [147.32.83.100]) by relay.felk.cvut.cz (8.14.4/8.14.4) with ESMTP id p6BG3How086824; Mon, 11 Jul 2011 18:03:17 +0200 (CEST) (envelope-from Petr.Salinger@seznam.cz) Date: Mon, 11 Jul 2011 18:12:15 +0200 (CEST) From: Petr Salinger X-X-Sender: salinger@sci.felk.cvut.cz To: Kostik Belousov In-Reply-To: <20110711154102.GW43872@deviant.kiev.zoral.com.ua> Message-ID: References: <20110711123332.GS43872@deviant.kiev.zoral.com.ua> <20110711133342.GT43872@deviant.kiev.zoral.com.ua> <20110711142232.GU43872@deviant.kiev.zoral.com.ua> <20110711150614.GV43872@deviant.kiev.zoral.com.ua> <20110711154102.GW43872@deviant.kiev.zoral.com.ua> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-FELK-MailScanner-Information: X-MailScanner-ID: p6BG3How086824 X-FELK-MailScanner: Found to be clean X-FELK-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.119, required 6, AWL 0.00, BAYES_00 -1.90, FREEMAIL_FROM 0.00, SPF_NEUTRAL 0.78) X-FELK-MailScanner-From: petr.salinger@seznam.cz X-FELK-MailScanner-To: current@freebsd.org, freebsd-hackers@freebsd.org, kostikbel@gmail.com, rmh@debian.org X-FELK-MailScanner-Watermark: 1311004997.74881@3PVEEZ+jUrOzDdbDuZJulA X-Spam-Status: No X-Mailman-Approved-At: Mon, 11 Jul 2011 16:08:12 +0000 Cc: freebsd-hackers@freebsd.org, Robert Millan , current@freebsd.org Subject: Re: [PATCH] Improve LinuxThreads compatibility in rfork() X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2011 16:03:29 -0000 > 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