Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 May 2005 16:43:47 -0500 (CDT)
From:      =?ISO-8859-1?Q?Se=E1n_C=2E_Farley?= <sean-freebsd@farley.org>
To:        =?ISO-8859-1?Q?Herv=E9_Kergourlay?= <herve.kergourlay@atempo.com>
Cc:        David Xu <davidxu@freebsd.org>
Subject:   Re: Porting on FreeBSD 53
Message-ID:  <20050512163409.O4283@thor.farley.org>
In-Reply-To: <20050512134151.O2556@thor.farley.org>
References:  <428307A9.10901@atempo.com> <20050512134151.O2556@thor.farley.org>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-1585788071-1115934011=:4283
Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1; FORMAT=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-ID: <20050512164024.T4283@thor.farley.org>

On Thu, 12 May 2005, Se=E1n C. Farley wrote:

> On Thu, 12 May 2005, Herv=E9 Kergourlay wrote:
>
> <snip>
>
>> 4) wait() API
>>=20
>> 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
>>=20
>> 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
> "fork fork", do you mean you fork twice?

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.

Se=E1n

P.S.  I included David since he has been trying to help me with this
bug.

   1. http://www.farley.org/freebsd/tmp/grandparent.c
--=20
sean-freebsd@farley.org
--0-1585788071-1115934011=:4283--



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