Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2010-09-29 07:57:24 +0400
committerChristopher Faylor <me@cgf.cx>2010-09-29 07:57:24 +0400
commitf95f18c95007ce24daad56615f911b88414bf748 (patch)
tree8fb9f7e1eae15aed349e790ac12a9b665f82bf8a /winsup
parent9d86e318268d40d33505a11ed865984754bdd040 (diff)
* fhandler_tty.cc (fhandler_tty_slave::init): Add debugging. Use tcsetpgrp to
potentially set pgid since it is smarter about deciding if a process is in the background. * include/sys/cygwin.h (PID_ORPHANED): Actually delete as planned. (PID_NOTCYGWIN): Correctly define.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/fhandler_tty.cc6
-rw-r--r--winsup/cygwin/include/sys/cygwin.h3
3 files changed, 14 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 3e225b63f..7c799a4e7 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,11 @@
+2010-09-28 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * fhandler_tty.cc (fhandler_tty_slave::init): Add debugging. Use
+ tcsetpgrp to potentially set pgid since it is smarter about deciding if
+ a process is in the background.
+ * include/sys/cygwin.h (PID_ORPHANED): Actually delete as planned.
+ (PID_NOTCYGWIN): Correctly define.
+
2010-09-28 Corinna Vinschen <corinna@vinschen.de>
* net.cc (getdomainname): Drop special case for NT4.
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index a919d14e4..9f1cd6169 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -723,7 +723,11 @@ fhandler_tty_slave::init (HANDLE f, DWORD a, mode_t)
tty is a non-cygwin process or we've been started directly
from a non-Cygwin process with no Cygwin ancestry. */
if (!p || ISSTATE (p, PID_NOTCYGWIN))
- tc->setpgid (myself->pgid);
+ {
+ termios_printf ("Setting process group leader to %d since %W(%d) is not a cygwin process",
+ myself->pgid, p->progname, p->pid);
+ tcsetpgrp (myself->pgid);
+ }
}
if (f != INVALID_HANDLE_VALUE)
diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h
index 37a74513c..a6e63b282 100644
--- a/winsup/cygwin/include/sys/cygwin.h
+++ b/winsup/cygwin/include/sys/cygwin.h
@@ -155,8 +155,7 @@ enum
PID_STOPPED = 0x00004, /* Waiting for SIGCONT. */
PID_TTYIN = 0x00008, /* Waiting for terminal input. */
PID_TTYOU = 0x00010, /* Waiting for terminal output. */
- PID_NOTCYGWIN = 0x00080, /* Set if process is not a cygwin app. */
- PID_ORPHANED = 0x00020, /* Member of an orphaned process group. */
+ PID_NOTCYGWIN = 0x00020, /* Set if process is not a cygwin app. */
PID_ACTIVE = 0x00040, /* Pid accepts signals. */
PID_CYGPARENT = 0x00080, /* Set if parent was a cygwin app. */
PID_MAP_RW = 0x00100, /* Flag to open map rw. */