* fork.cc (vfork): Avoid recursive vforks.
This commit is contained in:
parent
02a9889121
commit
25e40ae6aa
|
@ -1,3 +1,7 @@
|
|||
Fri Sep 14 00:37:54 2001 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* fork.cc (vfork): Avoid recursive vforks.
|
||||
|
||||
Fri Sep 14 00:18:52 2001 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* fhandler.h (fhandler_pipe::is_slow): Return true only if pipes are
|
||||
|
|
|
@ -705,6 +705,8 @@ vfork ()
|
|||
|
||||
if (vf == NULL)
|
||||
vf = vfork_storage.create ();
|
||||
else if (vf->pid)
|
||||
return fork ();
|
||||
|
||||
if (!setjmp (vf->j))
|
||||
{
|
||||
|
@ -735,6 +737,8 @@ vfork ()
|
|||
exit (exitval);
|
||||
}
|
||||
|
||||
return vf->pid;
|
||||
int pid = vf->pid;
|
||||
vf->pid = 0;
|
||||
return pid;
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue