* fork.cc (vfork): Avoid recursive vforks.

This commit is contained in:
Christopher Faylor
2001-09-14 04:37:57 +00:00
parent 02a9889121
commit 25e40ae6aa
2 changed files with 9 additions and 1 deletions

View File

@ -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
}