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>2006-05-20 08:59:53 +0400
committerChristopher Faylor <me@cgf.cx>2006-05-20 08:59:53 +0400
commit6118c524b0142cb2c1548aa2478434759e4696e8 (patch)
tree22ea9a21e2484f948eb5629619ac09e8bbe1b7ce
parent3b26b6a2053c7e67bf9f9fae15edd2af20774a4f (diff)
* fhandler_tty.cc (fhandler_tty::close): Remove problematic hExeced guard.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/fhandler_tty.cc26
2 files changed, 18 insertions, 12 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 4e55b540d..5eef80c2c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
2006-05-20 Christopher Faylor <cgf@timesys.com>
+ * fhandler_tty.cc (fhandler_tty::close): Remove problematic hExeced guard.
+
+2006-05-20 Christopher Faylor <cgf@timesys.com>
+
* fhandler_tty.cc (fhandler_tty_slave::open): Reinstate call to
need_invisible on first pty open.
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 19759247a..853972840 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -598,22 +598,24 @@ out:
int
fhandler_tty_slave::close ()
{
- if (!hExeced)
- {
- cygheap->manage_console_count ("fhandler_tty_slave::close", -1);
+ /* This used to always call fhandler_tty_common::close when hExeced but that
+ caused multiple closes of the handles associated with this tty. Since
+ close_all_files is not called until after the cygwin process has synced
+ or before a non-cygwin process has exited, it should be safe to just
+ close this normally. cgf 2006-05-20 */
+ cygheap->manage_console_count ("fhandler_tty_slave::close", -1);
- archetype->usecount--;
- report_tty_counts (this, "closed", "");
+ archetype->usecount--;
+ report_tty_counts (this, "closed", "");
- if (archetype->usecount)
- {
+ if (archetype->usecount)
+ {
#ifdef DEBUGGING
- if (archetype->usecount < 0)
- system_printf ("error: usecount %d", archetype->usecount);
+ if (archetype->usecount < 0)
+ system_printf ("error: usecount %d", archetype->usecount);
#endif
- termios_printf ("just returning because archetype usecount is != 0");
- return 0;
- }
+ termios_printf ("just returning because archetype usecount is != 0");
+ return 0;
}
termios_printf ("closing last open %s handle", ttyname ());