summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/syscalls.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-12-27 00:25:02 +0000
committerChristopher Faylor <me@cgf.cx>2003-12-27 00:25:02 +0000
commit56b5feb639f51385da560289e1c1e65512fb3f67 (patch)
tree42bd37417563e78b79eedd998cab0bfe2b9ab685 /winsup/cygwin/syscalls.cc
parent6dc18ca4d35407e4da9b5497f595382aef732f74 (diff)
downloadcygnal-56b5feb639f51385da560289e1c1e65512fb3f67.tar.gz
cygnal-56b5feb639f51385da560289e1c1e65512fb3f67.tar.bz2
cygnal-56b5feb639f51385da560289e1c1e65512fb3f67.zip
* exceptions.cc (try_to_debug): Fix off-by-one problem when resetting
environment variable after error_start detected. * fhandler_tty_slave.cc (fhandler_tty_slave::close): Clarify debug message. * syscalls.cc (setsid): Don't increment usecount here, since it will be automatically decremented on close.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 2b2e97d85..ab8aeea00 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -335,7 +335,7 @@ setsid (void)
myself->pgid, myself->ctty, fhandler_console::open_fhs);
if (cygheap->ctty)
{
- if (!--cygheap->ctty->usecount)
+ if (cygheap->ctty->usecount == 1)
cygheap->ctty->close ();
cygheap->ctty = NULL;
}