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:
authorEgor Duda <deo@logos-m.ru>2001-03-19 21:27:37 +0300
committerEgor Duda <deo@logos-m.ru>2001-03-19 21:27:37 +0300
commit78ace8a7e5103099f20423acbc6d03c1b5d53fdd (patch)
tree4601ec6f506485c5701fa607919575a527ed1823 /winsup/cygwin/tty.cc
parent98750a84047ec2ab23c3c74006e29319ce66e595 (diff)
* tty.h (tty::create_inuse): Add new parameter to allow non-
inheritable 'inuse' events. * tty.cc (tty::create_inuse): Use new parameter. * fhandler_tty.cc (fhandler_tty_master::init): Ditto. * fhandler_tty.cc (fhandler_pty_master::open): Ditto. * fhandler_tty.cc (fhandler_tty_master::init): Create master_alive event. * tty.cc (tty_list::terminate): Close master_alive event. * fhandler_tty.cc (fhandler_tty_common::close): Send EOF to slaves when master side is closed.
Diffstat (limited to 'winsup/cygwin/tty.cc')
-rw-r--r--winsup/cygwin/tty.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc
index a986ec820..b71e32acb 100644
--- a/winsup/cygwin/tty.cc
+++ b/winsup/cygwin/tty.cc
@@ -138,6 +138,7 @@ tty_list::terminate (void)
termios_printf ("tty %d master about to finish", ttynum);
ForceCloseHandle1 (t->to_slave, to_pty);
ForceCloseHandle1 (t->from_slave, from_pty);
+ CloseHandle (tty_master->inuse);
WaitForSingleObject (tty_master->hThread, INFINITE);
t->init ();
@@ -299,13 +300,13 @@ tty::alive (const char *fmt)
}
HANDLE
-tty::create_inuse (const char *fmt)
+tty::create_inuse (const char *fmt, BOOL inherit)
{
HANDLE h;
char buf[sizeof (TTY_MASTER_ALIVE) + 16];
__small_sprintf (buf, fmt, ntty);
- h = CreateEvent (&sec_all, TRUE, FALSE, buf);
+ h = CreateEvent ((inherit ? &sec_all : &sec_all_nih), TRUE, FALSE, buf);
termios_printf ("%s = %p", buf, h);
if (!h)
termios_printf ("couldn't open inuse event, %E", buf);