This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: libiberty/pex-unix vfork abuse?


On 07 December 2007 20:52, Andreas Schwab wrote:

> "Dave Korn" <dave.korn@artimi.com> 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....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]