summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_tty.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-06-12 14:56:31 +0000
committerChristopher Faylor <me@cgf.cx>2006-06-12 14:56:31 +0000
commit313b51e6c16cf2111c61edd10c55b8bf7e4fc9a4 (patch)
treee8c17bdcac6237d491d187365f66ee9ee7f80bb9 /winsup/cygwin/fhandler_tty.cc
parent184574d61c070013956f739c074649b2e3e86eff (diff)
downloadcygnal-313b51e6c16cf2111c61edd10c55b8bf7e4fc9a4.tar.gz
cygnal-313b51e6c16cf2111c61edd10c55b8bf7e4fc9a4.tar.bz2
cygnal-313b51e6c16cf2111c61edd10c55b8bf7e4fc9a4.zip
* fhandler_tty.cc (fhandler_pty_master::close): Always close
from_master/to_master since we always have copies of these handles.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r--winsup/cygwin/fhandler_tty.cc18
1 files changed, 6 insertions, 12 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 86d5d88b5..c623c872a 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1166,18 +1166,12 @@ fhandler_pty_master::close ()
}
fhandler_tty_master *arch = (fhandler_tty_master *) archetype;
- if (arch->dwProcessId != GetCurrentProcessId ())
- termios_printf ("not closing from_master(%p)/to_master(%p) since we don't own them(%d)",
- arch->from_master, arch->to_master, arch->dwProcessId);
- else
- {
- termios_printf ("closing from_master(%p)/to_master(%p) since we own them(%d)",
- arch->from_master, arch->to_master, arch->dwProcessId);
- if (!ForceCloseHandle (arch->from_master))
- termios_printf ("error closing from_master %p, %E", arch->from_master);
- if (!ForceCloseHandle (arch->to_master))
- termios_printf ("error closing from_master %p, %E", arch->to_master);
- }
+ termios_printf ("closing from_master(%p)/to_master(%p) since we own them(%d)",
+ arch->from_master, arch->to_master, arch->dwProcessId);
+ if (!ForceCloseHandle (arch->from_master))
+ termios_printf ("error closing from_master %p, %E", arch->from_master);
+ if (!ForceCloseHandle (arch->to_master))
+ termios_printf ("error closing from_master %p, %E", arch->to_master);
fhandler_tty_common::close ();
if (hExeced || get_ttyp ()->master_pid != myself->pid)