OSDN Git Service

* pinfo.cc (pinfo::exit): Grab a tty lock before setting pgid.
authorcgf <cgf>
Sun, 24 Oct 2010 03:57:43 +0000 (03:57 +0000)
committercgf <cgf>
Sun, 24 Oct 2010 03:57:43 +0000 (03:57 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/pinfo.cc

index 56e3b67..76b2d42 100644 (file)
@@ -1,5 +1,9 @@
 2010-10-23  Christopher Faylor  <me+cygwin@cgf.cx>
 
+       * pinfo.cc (pinfo::exit): Grab a tty lock before setting pgid.
+
+2010-10-23  Christopher Faylor  <me+cygwin@cgf.cx>
+
        * pinfo.cc (pinfo::exit): Reset tty pgrp to zero if no more handles open.
        (_pinfo::set_ctty): Remove debugging stuff.
 
index d45e0a3..f426bde 100644 (file)
@@ -188,6 +188,7 @@ pinfo::exit (DWORD n)
   sigproc_terminate (ES_FINAL);
   if (myself->ctty >= 0 && myself->ctty != TTY_CONSOLE)
     {
+      lock_ttys here;
       tty *t = cygwin_shared->tty[myself->ctty];
       if (!t->slave_alive ())
        t->setpgid (0);