summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-07-03 21:22:17 +0000
committerChristopher Faylor <me@cgf.cx>2003-07-03 21:22:17 +0000
commit3d8a75bdbeb70170768011afb51ae2e18e9fa4ce (patch)
tree1a8c189587a94a3925909e10a56abaa71c435d6d
parent6556178009cd9bd3112c79510361cfed266f6c43 (diff)
downloadcygnal-3d8a75bdbeb70170768011afb51ae2e18e9fa4ce.tar.gz
cygnal-3d8a75bdbeb70170768011afb51ae2e18e9fa4ce.tar.bz2
cygnal-3d8a75bdbeb70170768011afb51ae2e18e9fa4ce.zip
* fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize a little more of
the cygserver stuff so that ttys actually work.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_tty.cc11
2 files changed, 11 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 998f89a76..a65c92d4f 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-03 Christopher Faylor <cgf@redhat.com>
+
+ * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize a little
+ more of the cygserver stuff so that ttys actually work.
+
2003-07-03 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (mmap64): Allow MAP_FIXED with pagesize granularity (4K).
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 84b862e40..6e3a93364 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -507,12 +507,11 @@ fhandler_tty_slave::open (path_conv *, int flags, mode_t)
HANDLE from_master_local, to_master_local;
- if (!wincap.has_security ()
#ifdef USE_CYGSERVER
+ if (!wincap.has_security ()
|| cygserver_running == CYGSERVER_UNAVAIL
- || !cygserver_attach_tty (&from_master_local, &to_master_local)
+ || !cygserver_attach_tty (&from_master_local, &to_master_local))
#endif
-)
{
termios_printf ("cannot dup handles via server. using old method.");
@@ -596,10 +595,12 @@ int
fhandler_tty_slave::cygserver_attach_tty (LPHANDLE from_master_ptr,
LPHANDLE to_master_ptr)
{
+#ifndef USE_CYGSERVER
+ return 0;
+#else
if (!from_master_ptr || !to_master_ptr)
return 0;
-#ifdef USE_CYGSERVER
client_request_attach_tty req ((DWORD) get_ttyp ()->master_pid,
(HANDLE) get_ttyp ()->from_master,
(HANDLE) get_ttyp ()->to_master);
@@ -609,9 +610,9 @@ fhandler_tty_slave::cygserver_attach_tty (LPHANDLE from_master_ptr,
*from_master_ptr = req.from_master ();
*to_master_ptr = req.to_master ();
-#endif
return 1;
+#endif
}
void