"Dave Korn" <[EMAIL PROTECTED]> writes:

> On 07 December 2007 20:52, Andreas Schwab wrote:
>
>> "Dave Korn" <[EMAIL PROTECTED]> writes:
>> 
>>>   Perhaps we could work around this case by setting environ in the parent
>>> before the vfork call and restoring it afterward, but we'd need kind of
>>> serialisation there,
>> 
>> Do we?  vfork should block the parent until the child calls execve or
>> exit.
>
>   I don't see anything in posix that suggests that?

That is true, but technically it is rather difficult to implement a true
vfork without blocking the parent between vfork and exec/exit, since
that these are the only synchronisation points.

> I'm worrying in this case about races between multiple threads in the
> parent vfork'ing multiple children,

Typically in a multithreaded environment vfork is mapped to fork anyway.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Reply via email to