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? I'm worrying in this case about races between multiple threads in the parent vfork'ing multiple children, not about the child-parent interaction, which this suggestion was a workaround for. (But in any case, the subsequent suggestion by Ross to just fall back on fork instead of vfork when the environment needs setting is probably the simplest and most robust, obsoleting this earlier suggestion of mine). cheers, DaveK -- Can't think of a witty .sigline today....