* fork.cc (fork_parent): Detect failed pinfo constructor.

* spawn.cc (spawn_guts): Don't overwrite ENOMEM errno on failed pinfo
constructor.
This commit is contained in:
Christopher Faylor
2003-09-26 03:20:30 +00:00
parent 177989407a
commit 6c68fbbc61
3 changed files with 15 additions and 1 deletions

View File

@ -792,7 +792,8 @@ spawn_guts (const char * prog_arg, const char *const *argv,
if (!child)
{
syscall_printf ("pinfo failed");
set_errno (EAGAIN);
if (get_errno () != ENOMEM)
set_errno (EAGAIN);
res = -1;
goto out;
}