From 1ed95be609c9af283fe0c1b21b760b3abc0792f8 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 16 Dec 2003 23:28:03 +0000 Subject: * exceptions.cc (set_signal_mask): Report on input argument rather than getsigmask. * fhandler.h (fhandler_base): Make friends with close_all_files. * pinfo.cc (_pinfo::set_ctty): Add more debugging. * sigproc.cc (proc_can_be_signalled): Detect state when signal handler thread is gone in target process as an EPERM situation. Set errno to ESRCH if process doesn't exist. (sigproc_terminate): Set sendsig to illegal value when closed. (sig_send): Rely on proc_can_be_signalled setting the proper errno. * syscalls.cc (close_all_files): Detect when all ttys are closed prior to calling close_all_files. The ctty needs to be closed explicitly in this case. --- winsup/cygwin/pinfo.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/pinfo.cc') diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index f1c1c8cff..805f96b0b 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -278,6 +278,7 @@ _pinfo::set_ctty (tty_min *tc, int flags, fhandler_tty_slave *arch) tc->setpgid (pgid); if (cygheap->ctty != arch) { + debug_printf ("cygheap->ctty %p, arch %p", cygheap->ctty, arch); if (!cygheap->ctty) syscall_printf ("ctty NULL"); else @@ -289,7 +290,10 @@ _pinfo::set_ctty (tty_min *tc, int flags, fhandler_tty_slave *arch) } cygheap->ctty = arch; if (arch) - arch->usecount++; + { + arch->usecount++; + debug_printf ("arch usecount for tty%d is %d", tc->ntty, arch->usecount); + } } } } -- cgit v1.2.3