diff options
author | Christopher Faylor <me@cgf.cx> | 2005-12-13 05:43:30 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-12-13 05:43:30 +0000 |
commit | 82f423291b05df1f2553a87b22b5160e46b46356 (patch) | |
tree | 14b78ad0527b57500e4905d09dfece58d69ec3fa | |
parent | 3220aed3544bcb6134c223998d38484a4510ef99 (diff) | |
download | newlib-82f423291b05df1f2553a87b22b5160e46b46356.zip newlib-82f423291b05df1f2553a87b22b5160e46b46356.tar.gz newlib-82f423291b05df1f2553a87b22b5160e46b46356.tar.bz2 |
* fhandler_tty.cc (fhandler_tty::open): Add a comment.
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a010a3a..2975f6e 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2005-12-13 Christopher Faylor <cgf@timesys.com> + + * fhandler_tty.cc (fhandler_tty::open): Add a comment. + 2005-12-12 Christopher Faylor <cgf@timesys.com> * times.cc (hires_ms::usecs): Subtract from slop from system time or diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 5483249..47ba207 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -581,6 +581,17 @@ fhandler_tty_slave::open (int flags, mode_t) { BOOL b; HWINSTA h, horig; + /* The intent here is to allocate an "invisible" console if we have no + controlling tty or to reuse the existing console if we already have + a tty. So, first get the old windows station. If there is no controlling + terminal, create a new windows station and then set it as the current + windows station. The subsequent AllocConsole will then be allocated + invisibly. But, after doing that we have to restore any existing windows + station or, strangely, characters will not be displayed in any windows + drawn on the current screen. We only do this if we have changed to + a new windows station and if we had an existing windows station previously. + + Phew. */ h = horig = GetProcessWindowStation (); if (myself->ctty == -1) { |