From 5e733918c085833e32581ac0bb0437b00ad2aa8e Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 22 Sep 2001 16:55:02 +0000 Subject: * exceptions.cc (setup_handler): Always relinquish lock after we've interrupted. * fhandler.cc: Move pipe methods to pipe.cc. * fhandler.h (fhandler_pipe): Add new methods. * fork.cc (sync_with_parent): Make error messages more informative. * pipe.cc (fhandler_pipe::fhandler_pipe): Move here from fhandler.cc. (fhandler_pipe::lseek): Ditto. (fhandler_pipe::set_close_on_exec): New method. (fhandler_pipe::read): Ditto. (fhandler_pipe::close): Ditto. (fhandler_pipe::dup): Ditto. (make_pipe): Create the guard mutex on the read side of the pipe. * select.cc (peek_pipe): Use guard_mutex to discover if we have the right to read on this pipe. (fhandler_pipe::readh_for_read): Pass the read pipe guard mutex to peek_pipe. * syscalls.cc (_read): Always detect signal catchers, for now. * debug.cc (makethread): Eliminate hack to make thread inheritable. * sigproc.cc (subproc_init): Don't use hack to make thread inheritable. --- winsup/cygwin/exceptions.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'winsup/cygwin/exceptions.cc') diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 37607cd8e..0102371a7 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -849,8 +849,7 @@ setup_handler (int sig, void *handler, struct sigaction& siga) if (th) { interrupted = interrupt_on_return (th, sig, handler, siga); - if (!interrupted) - LeaveCriticalSection (&th->lock); + LeaveCriticalSection (&th->lock); } else if (interruptible (cx.Eip)) interrupted = interrupt_now (&cx, sig, handler, siga); @@ -870,9 +869,6 @@ setup_handler (int sig, void *handler, struct sigaction& siga) sigproc_printf ("couldn't send signal %d", sig); } - if (th) - LeaveCriticalSection (&th->lock); - if (!hth) sigproc_printf ("good. Didn't suspend main thread, th %p", th); else -- cgit v1.2.3