From owner-freebsd-hackers@FreeBSD.ORG Mon May 23 01:40:07 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E12016A420; Mon, 23 May 2005 01:40:07 +0000 (GMT) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (wantadilla.lemis.com [192.109.197.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AC2543D49; Mon, 23 May 2005 01:40:05 +0000 (GMT) (envelope-from grog@lemis.com) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 6BC2985651; Mon, 23 May 2005 11:10:04 +0930 (CST) Date: Mon, 23 May 2005 11:10:04 +0930 From: Greg 'groggy' Lehey To: =?iso-8859-1?Q?Se=E1n_C=2E?= Farley Message-ID: <20050523014004.GS34798@wantadilla.lemis.com> References: <428307A9.10901@atempo.com> <20050512134151.O2556@thor.farley.org> <20050512163409.O4283@thor.farley.org> <4284CFB5.7040805@atempo.com> <20050513123403.J11641@thor.farley.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FiqEyLLt06qkB6ow" Content-Disposition: inline In-Reply-To: <20050513123403.J11641@thor.farley.org> User-Agent: Mutt/1.4.2.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: hackers@freebsd.org, =?iso-8859-1?Q?Herv=E9?= Kergourlay , David Xu Subject: Re: Porting on FreeBSD 53 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2005 01:40:07 -0000 --FiqEyLLt06qkB6ow Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [severely trimmed] On Friday, 13 May 2005 at 12:45:12 -0500, Sen C. Farley wrote: > On Fri, 13 May 2005, Herv=E9 Kergourlay wrote: >> Se=E1n C. Farley a =E9crit : >>> On Thu, 12 May 2005, Se=E1n C. Farley wrote: >>>> On Thu, 12 May 2005, Herv=E9 Kergourlay wrote: >>>>> 4) wait() API >>>>> >>>>> 2 problems, the first is a ECHILD error on a wait call after a fork >>>>> fork The code is generic for most of unix system. Is there any >>>>> specific problems to manage the fork and wait APIs ? the second >>>>> problem with calls is a blocking wait() call in the same condition >>>>> but this time the son process is finished but the wait call in the >>>>> father stays blocked, again it's a generic Unix code >>>>> >>>>> If there is no evidence, ask me for more informations >>>> >>>> The second problem sounds like what I am encountering >>>> (http://www.freebsd.org/cgi/query-pr.cgi?pr=3D77818) with zsh for my >>>> shell. You did suspend (sigsuspend()) SIGCHLD before the fork? By >>> >>> >>> Ah ha! I see the problem that has been causing me this problem and >>> probably you too. Signal suspensions (only these?) are not being >>> copied with a double fork(). Here is an example program[1] to >>> illustrate. They do get copied on FreeBSD-4.10 and Linux. I just do >>> not know if they are supposed to be copied. >> >> I test your sample >> >> it's working on Linux and FreeBSD 4.0 but failing on FreeBDS 5.2 et >> 5.3. the process stays blocked on the suspend call >> >> I rewrite another sample with the same model, joined here, as we wrote >> it in our main program. It's working also on Linux but failing on all >> FreeBSD included FreeBSD 4.0, 5.2 et 5.3 >> >> ... >> >> the wait call return with an errno ECHILD ?? > > The children are exiting before the parents (due to sleep()'s) get to > their wait()'s. > >> did you have any idea if the problem will be solve by the FreeBSD team >> or not ? > > I updated my bug report and tried to notify David Xu but the e-mail > server rejected the e-mail (too many "Received" headers). I am also > Cc'ing Greg Lehey since he ran into a possibly similar bug[1] in > February. Now that I've had time to look at it, both problems appear to be related to signals, but that's about as far as it goes. I wouldn't expect any connection unless it's a general signal race condition. Greg -- See complete headers for address and phone numbers. --FiqEyLLt06qkB6ow Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFCkTR0IubykFB6QiMRAt4IAKCczrRdzwdevPW32zSBjhevHXGdgwCdGPlh NqrP6AHzNpyTIS+KySWv3Y4= =bdtN -----END PGP SIGNATURE----- --FiqEyLLt06qkB6ow--