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:
authorChristopher Faylor <me@cgf.cx>2000-10-17 05:42:04 +0400
committerChristopher Faylor <me@cgf.cx>2000-10-17 05:42:04 +0400
commit92e1969051640fe2c25a8862162eb1a59bd0b888 (patch)
treef5ec28a82dbf3c1d02b647487934de9fc9db57c1 /winsup/cygwin/tty.cc
parent166b2571ce446b4085d4c2067b0d0d36c608f131 (diff)
* debug.cc (add_handle): Issue warning on attempts to add the same handle more
than once. * fhandler_tty.cc (fhandler_tty_slave::open): Protect some handles. (fhandler_tty_common::close): Use proper name when closing handles. (fhandler_pty_master::close): Don't close to_slave or from_slave since they've already been closed earlier in the function. * sigproc.cc (proc_subproc): Don't protect vchild->hProcess. Expect that the caller will do this, instead. * tty.cc (tty_list::terminate): Use proper name when closing handles. (tty::make_pipes): Protect some handles.
Diffstat (limited to 'winsup/cygwin/tty.cc')
-rw-r--r--winsup/cygwin/tty.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc
index f0be2a534..baff0a4c2 100644
--- a/winsup/cygwin/tty.cc
+++ b/winsup/cygwin/tty.cc
@@ -136,8 +136,8 @@ tty_list::terminate (void)
}
termios_printf ("tty %d master about to finish", ttynum);
- CloseHandle (t->to_slave);
- CloseHandle (t->from_slave);
+ ForceCloseHandle1 (t->to_slave, to_pty);
+ ForceCloseHandle1 (t->from_slave, from_pty);
WaitForSingleObject (tty_master->hThread, INFINITE);
t->init ();
@@ -355,12 +355,14 @@ tty::make_pipes (fhandler_pty_master *ptym)
return FALSE;
}
+ ProtectHandle1 (to_slave, to_pty);
if (CreatePipe (&from_slave, &to_master, &sec_all, 0) == FALSE)
{
termios_printf ("can't create output pipe");
set_errno (ENOENT);
return FALSE;
}
+ ProtectHandle1 (from_slave, from_pty);
termios_printf ("tty%d from_slave %p, to_slave %p", ntty, from_slave,
to_slave);
ptym->set_io_handle (from_slave);