This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libiberty/pex-unix vfork abuse?
- From: rridge at csclub dot uwaterloo dot ca (Ross Ridge)
- To: gcc at gcc dot gnu dot org
- Date: Fri, 7 Dec 2007 14:38:13 -0500 (EST)
- Subject: Re: libiberty/pex-unix vfork abuse?
Dave Korn 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, and I don't know how to do a critical section using
> pthreads/posix.
A simple solution would be to call fork() instead of vfork() when changing
the environment.
Ross Ridge