From owner-freebsd-current@FreeBSD.ORG Mon Jul 11 15:41:10 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 8E4021065689; Mon, 11 Jul 2011 15:41:10 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 2D5268FC16; Mon, 11 Jul 2011 15:41:09 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p6BFf2DZ097906 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 11 Jul 2011 18:41:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p6BFf2e2051132; Mon, 11 Jul 2011 18:41:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p6BFf2ED051131; Mon, 11 Jul 2011 18:41:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 11 Jul 2011 18:41:02 +0300 From: Kostik Belousov To: Petr Salinger Message-ID: <20110711154102.GW43872@deviant.kiev.zoral.com.ua> 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Z0wTxTCd2IDq3u/i" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua 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 15:41:10 -0000 --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--