OSDN Git Service

* tty.cc (tty_list::terminate): Don't enter the busy loop if we don't own the
authorcgf <cgf>
Tue, 18 Jul 2006 15:09:11 +0000 (15:09 +0000)
committercgf <cgf>
Tue, 18 Jul 2006 15:09:11 +0000 (15:09 +0000)
master.

winsup/cygwin/ChangeLog
winsup/cygwin/tty.cc

index a129776..cb1a29a 100644 (file)
@@ -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
index 018ffe0..cfc4b08 100644 (file)
@@ -139,7 +139,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);