From 0e1f0840d2def205a7e2089872038930643d48f7 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 11 Jan 2012 19:07:11 +0000 Subject: 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. --- winsup/cygwin/spawn.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'winsup/cygwin/spawn.cc') 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 #include #include -#include "cygerrno.h" #include +#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 -- cgit v1.2.3