* tty.h (tty::hwnd): Move to tty_min.
(tty::gethwnd): Ditto. (tty::sethwnd): Ditto. (tty_min::hwnd): Receive variable from tty class. (tty_min::gethwnd): Receive function from tty classs. (tty_min::sethwnd): Ditto. * dtable.cc (dtable::stdio_init): Only call init_console_handler when we actually own the console. * fhandler_console.cc (fhandler_console::get_tty_stuff): Set tty's hwnd to non-zero value. * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Semi-reinstate handling of console when pgrp is set.
This commit is contained in:
@ -32,7 +32,7 @@ details. */
|
||||
#include "dtable.h"
|
||||
#include "cygheap.h"
|
||||
#include "ntdll.h"
|
||||
#include "tty.h"
|
||||
#include "shared_info.h"
|
||||
|
||||
static const char NO_COPY unknown_file[] = "some disk file";
|
||||
|
||||
@ -135,7 +135,9 @@ dtable::stdio_init ()
|
||||
|
||||
if (myself->cygstarted || ISSTATE (myself, PID_CYGPARENT))
|
||||
{
|
||||
init_console_handler (myself->ctty >= 0);
|
||||
tty_min *t = cygwin_shared->tty.get_tty (myself->ctty);
|
||||
if (t && t->getpgid () == myself->pid && t->gethwnd ())
|
||||
init_console_handler (true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user