Subject: Re: SMP problems in fork()?
To: David Laight <david@l8s.co.uk>
From: Antti Kantee <pooka@cs.hut.fi>
List: tech-kern
Date: 12/08/2002 23:36:22
On Sun Dec 08 2002 at 21:19:29 +0000, David Laight wrote:
> Consider also the case of fork with both FORK_PPWAIT and FORK_NOWAIT
> set (ie vfork with the parent set to initproc).
>
> The process priorities could be such that:
> if (flags & FORK_PPWAIT)
> while (p2->p_flag & P_PPWAIT)
> tsleep(p1, PWAIT, "ppwait", 0);
>
> accesses p2->p_flag after the child has been reaped - even on
> a single cpu system.
vfork with nowait doesn't make much sense. Besides, there's nothing that
calls fork1() with both set, and I can't imagine why there ever would be.
--
Antti Kantee <pooka@iki.fi> Of course he runs NetBSD
http://www.iki.fi/pooka/ http://www.NetBSD.org/
"connoisseurs do not chill their malts."