* pipe.cc (fhandler_pipe::create): Avoid derefencing a NULL pointer.

* child_info.h (child_info): Reorganize some elements so that the ones which
are initialized in a constructor are all together.
* sigproc.cc (child_info::child_info): Initialize values via the constructor
rather than as C statements and make sure that flags is set to zero initially.
* spawn.cc (child_info_spawn::worker): Use iscygwin() test for determining when
to send strace info since it is more foolproof than checking the suspend state.
This commit is contained in:
Christopher Faylor
2011-11-23 21:58:43 +00:00
parent 9f65451e3e
commit 5f38ec4681
5 changed files with 25 additions and 16 deletions

View File

@@ -264,14 +264,14 @@ fhandler_pipe::create (LPSECURITY_ATTRIBUTES sa_ptr, PHANDLE r, PHANDLE w,
/* The pipe is already open with compatible parameters.
Pick a new name and retry. */
debug_printf ("pipe busy", !name ? ", retrying" : "");
if (!*name)
if (!name)
*r = NULL;
break;
case ERROR_ACCESS_DENIED:
/* The pipe is already open with incompatible parameters.
Pick a new name and retry. */
debug_printf ("pipe access denied%s", !name ? ", retrying" : "");
if (!*name)
if (!name)
*r = NULL;
break;
default: