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>2010-10-23 22:57:43 +0400
committerChristopher Faylor <me@cgf.cx>2010-10-23 22:57:43 +0400
commitc4f296c2a9cc3c860cf5610188205e22e0277621 (patch)
tree1115c7292428285941cd01bdaec6a31b057fc3ce
parent74882a259a97e56d906ad34b29604c4e25aa9a2b (diff)
* pinfo.cc (pinfo::exit): Grab a tty lock before setting pgid.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/pinfo.cc1
2 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 56e3b67c4..76b2d428c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index d45e0a3cf..f426bde64 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -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);