* 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.
This commit is contained in:
Christopher Faylor
2010-09-29 03:57:24 +00:00
parent 9d86e31826
commit f95f18c950
3 changed files with 14 additions and 3 deletions

View File

@ -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)