aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-07-18 15:17:35 +0000
committerCorinna Vinschen <corinna@vinschen.de>2006-07-18 15:17:35 +0000
commit6902793ada2e1bef45deed519c3fb73e47410851 (patch)
tree7764de4eec9f5e171ac5162854994bca96c17cff
parent2572a3bfdf0fcef545feed5bb2b53b10a316c04f (diff)
downloadnewlib-6902793ada2e1bef45deed519c3fb73e47410851.zip
newlib-6902793ada2e1bef45deed519c3fb73e47410851.tar.gz
newlib-6902793ada2e1bef45deed519c3fb73e47410851.tar.bz2
* tty.cc (tty_list::terminate): Don't enter the busy loop if we don't
own the master.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/tty.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 275dde7..8dba361 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2006-07-18 Christopher Faylor <cgf@timesys.com>
+
+ * tty.cc (tty_list::terminate): Don't enter the busy loop if we don't
+ own the master.
+
2006-07-18 Silvio Laguzzi <slaguzzi@data-al.de>
* sec_acl.cc (acltotext32): Add missing handling of default ACL entry
diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc
index f357b7b..9793c8c 100644
--- a/winsup/cygwin/tty.cc
+++ b/winsup/cygwin/tty.cc
@@ -145,7 +145,7 @@ tty_list::terminate ()
int ttynum = myself->ctty;
/* Keep master running till there are connected clients */
- if (ttynum != -1 && ttys[ttynum].master_pid == myself->pid)
+ if (ttynum != -1 && tty_master && ttys[ttynum].master_pid == myself->pid)
{
tty *t = ttys + ttynum;
CloseHandle (tty_master->from_master);