* fhandler_termios.cc (tcinit): Remove previously applied change.
Replace with... * fhandler_tty.cc (fhandler_tty_slave::init): Become process group leader if called from dtable::init_std_file_from_handle. Add comment to explain.
This commit is contained in:
@@ -719,6 +719,15 @@ fhandler_tty_slave::init (HANDLE f, DWORD a, mode_t)
|
||||
flags = O_RDWR;
|
||||
|
||||
int ret = open (flags);
|
||||
if (ret && !cygwin_finished_initializing)
|
||||
{
|
||||
/* This only occurs when called from dtable::init_std_file_from_handle
|
||||
We have been started from a non-Cygwin process. So we should become
|
||||
tty process group leader.
|
||||
TODO: Investigate how SIGTTIN should be handled with pure-windows
|
||||
programs. */
|
||||
tc->pgid = myself->pgid;
|
||||
}
|
||||
|
||||
if (f != INVALID_HANDLE_VALUE)
|
||||
CloseHandle (f); /* Reopened by open */
|
||||
|
Reference in New Issue
Block a user