diff options
author | Christopher Faylor <me@cgf.cx> | 2012-01-11 23:07:11 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-01-11 23:07:11 +0400 |
commit | 0e1f0840d2def205a7e2089872038930643d48f7 (patch) | |
tree | 64df2c610ceccf24f646408496023aeed8ab15fa /winsup/cygwin/spawn.cc | |
parent | 5ecc040cff80eb26ef4977ce6dfe7f429778b584 (diff) |
Update copyright on all files checked in so far this year.
* fhandler.h: Use #pragma once rather than ifdef guards.
(fhandler_console::tc_getpgid): Return our pgid if we have never opened a
console.
* fork.cc: Rearrange includes to accommodate fhandler.h use of pinfo.h.
* sigproc.cc: Ditto.
* spawn.cc: Ditto.
(child_info_spawn::worker): Query myself->pgid rather than calling expensive
function.
* thread.h: Use #pragma once rather than ifdef guards.
* pinfo.h: Use #pragma once rather than ifdef guards.
(pinfo::remember): Don't define if sigproc.h has not been included.
(pinfo::reattach): Ditto.
* sigproc.h: Use #pragma once rather than ifdef guards. Use different test to
see if pinfo.h has been included.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 74642519a..c0320fc08 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -18,16 +18,16 @@ details. */ #include <winuser.h> #include <wchar.h> #include <ctype.h> -#include "cygerrno.h" #include <sys/cygwin.h> +#include "cygerrno.h" #include "security.h" +#include "sigproc.h" +#include "pinfo.h" #include "path.h" #include "fhandler.h" #include "dtable.h" -#include "sigproc.h" #include "cygheap.h" #include "child_info.h" -#include "pinfo.h" #include "environ.h" #include "cygtls.h" #include "tls_pbuf.h" @@ -337,6 +337,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, int looped = 0; HANDLE orig_wr_proc_pipe = NULL; +#if 0 myfault efault; if (efault.faulted ()) { @@ -347,6 +348,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, res = -1; goto out; } +#endif child_info_types chtype; if (mode != _P_OVERLAY) @@ -584,7 +586,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, because the Ctrl-C event is sent to all processes in the console, unless they ignore it explicitely. CREATE_NEW_PROCESS_GROUP does that for us. */ if (!iscygwin () && myself->ctty >= 0 && iscons_dev (myself->ctty) - && fhandler_console::tc_getpgid () != getpgrp ()) + && fhandler_console::tc_getpgid () != myself->pgid) c_flags |= CREATE_NEW_PROCESS_GROUP; refresh_cygheap (); /* When ruid != euid we create the new process under the current original |