diff options
author | Christopher Faylor <me@cgf.cx> | 2003-09-26 07:20:30 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-09-26 07:20:30 +0400 |
commit | 6c68fbbc61b58863debe39c97f71a9d06ecc87f5 (patch) | |
tree | 81c795b768639df9399ac6011262c73f2af87132 /winsup/cygwin/fork.cc | |
parent | 177989407a3d1775148e1b56a54ad656f05d5004 (diff) |
* fork.cc (fork_parent): Detect failed pinfo constructor.
* spawn.cc (spawn_guts): Don't overwrite ENOMEM errno on failed pinfo
constructor.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r-- | winsup/cygwin/fork.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 2fe73667a..00f296bae 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -500,6 +500,13 @@ fork_parent (HANDLE& hParent, dll *&first_dll, #else pinfo forked (cygwin_pid (pi.dwProcessId), 1); #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 for the forkee. */ |