* 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:
parent
177989407a
commit
6c68fbbc61
@ -1,3 +1,9 @@
|
|||||||
|
2003-09-25 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* fork.cc (fork_parent): Detect failed pinfo constructor.
|
||||||
|
* spawn.cc (spawn_guts): Don't overwrite ENOMEM errno on failed pinfo
|
||||||
|
constructor.
|
||||||
|
|
||||||
2003-09-25 Christopher Faylor <cgf@redhat.com>
|
2003-09-25 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* spawn.cc (spawnve): Remove vfork short circuit and let caller deal
|
* spawn.cc (spawnve): Remove vfork short circuit and let caller deal
|
||||||
|
@ -500,6 +500,13 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
|
|||||||
#else
|
#else
|
||||||
pinfo forked (cygwin_pid (pi.dwProcessId), 1);
|
pinfo forked (cygwin_pid (pi.dwProcessId), 1);
|
||||||
#endif
|
#endif
|
||||||
|
if (!forked)
|
||||||
|
{
|
||||||
|
syscall_printf ("pinfo failed");
|
||||||
|
if (get_errno () != ENOMEM)
|
||||||
|
set_errno (EAGAIN);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
/* Initialize things that are done later in dll_crt0_1 that aren't done
|
/* Initialize things that are done later in dll_crt0_1 that aren't done
|
||||||
for the forkee. */
|
for the forkee. */
|
||||||
|
@ -792,7 +792,8 @@ spawn_guts (const char * prog_arg, const char *const *argv,
|
|||||||
if (!child)
|
if (!child)
|
||||||
{
|
{
|
||||||
syscall_printf ("pinfo failed");
|
syscall_printf ("pinfo failed");
|
||||||
set_errno (EAGAIN);
|
if (get_errno () != ENOMEM)
|
||||||
|
set_errno (EAGAIN);
|
||||||
res = -1;
|
res = -1;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user