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
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-01-05 06:58:19 +0300
committerChristopher Faylor <me@cgf.cx>2006-01-05 06:58:19 +0300
commit4c3faa85cef1d76b90ec014172b014494f76248c (patch)
treef1b308d943528b758cfd3e8263634b230a37f1fe /winsup
parentfaec62caaf6492481f346125dc978bed6dfa382d (diff)
* fhandler_console.cc (fhandler_console::need_invisible): Only try to open
"CygwinInvisible" windows station if opening of default station fails. Use CloseWindowStation to close window station handle.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/fhandler_console.cc10
2 files changed, 12 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 80e748f12..c4d349fd5 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,11 @@
2006-01-04 Christopher Faylor <cgf@timesys.com>
+ * fhandler_console.cc (fhandler_console::need_invisible): Only try to
+ open "CygwinInvisible" windows station if opening of default station
+ fails. Use CloseWindowStation to close window station handle.
+
+2006-01-04 Christopher Faylor <cgf@timesys.com>
+
* fhandler_console.cc (fhandler_console::need_invisible): Open up the
security of the newly created windows station.
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 842d58c35..c130d9bd0 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -1856,7 +1856,9 @@ fhandler_console::need_invisible ()
h = horig = GetProcessWindowStation ();
if (myself->ctty == -1)
{
- h = CreateWindowStation ("CygwinInvisible", 0, WINSTA_ALL_ACCESS, &sec_all_nih);
+ if (!(h = CreateWindowStation (NULL, 0, WINSTA_ALL_ACCESS, &sec_all_nih)))
+ h = CreateWindowStation ("CygwinInvisible", 0, WINSTA_ALL_ACCESS,
+ &sec_all_nih);
termios_printf ("CreateWindowStation(\"CygwinInvisible\", %p), %E", h);
if (h)
{
@@ -1864,11 +1866,11 @@ fhandler_console::need_invisible ()
termios_printf ("SetProcessWindowStation %d, %E", b);
}
}
- b = AllocConsole (); // will cause flashing if workstation
- // stuff fails
+ b = AllocConsole (); /* will cause flashing if CreateWorkstation
+ failed */
debug_printf ("h (%p), horig (%p)", h, horig);
if (horig && h && h != horig && SetProcessWindowStation (horig))
- CloseHandle (h);
+ CloseWindowStation (h);
termios_printf ("%d = AllocConsole (), %E", b);
invisible_console = true;
}