From 56b5feb639f51385da560289e1c1e65512fb3f67 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 27 Dec 2003 00:25:02 +0000 Subject: * 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. --- winsup/cygwin/syscalls.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'winsup/cygwin/syscalls.cc') 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; } -- cgit v1.2.3