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
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-12-13 12:07:12 +0300
committerCorinna Vinschen <corinna@vinschen.de>2005-12-13 12:07:12 +0300
commit4c848934fea7f6da431ee6c136ce991cc55f1ceb (patch)
treec1a5de20a7c0a9d0297143484ce66289cd108f58
parent82f423291b05df1f2553a87b22b5160e46b46356 (diff)
* fhandler_tty.cc (fhandler_tty::open): Close newly created window
station after switching to original window station.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_tty.cc7
2 files changed, 10 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 2975f6e59..28abe9d93 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_tty.cc (fhandler_tty::open): Close newly created window
+ station after switching to original window station.
+
2005-12-13 Christopher Faylor <cgf@timesys.com>
* fhandler_tty.cc (fhandler_tty::open): Add a comment.
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 47ba20720..0e451b482 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -605,8 +605,11 @@ fhandler_tty_slave::open (int flags, mode_t)
}
b = AllocConsole (); // will cause flashing if workstation
// stuff fails
- if (horig && h != horig)
- SetProcessWindowStation (horig);
+ if (horig && h && h != horig)
+ {
+ SetProcessWindowStation (horig);
+ CloseHandle (h);
+ }
termios_printf ("%d = AllocConsole (), %E", b);
if (b)
init_console_handler (TRUE);