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/fork.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/fork.cc') diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index c4d122f4d..ffd48e47a 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -198,7 +198,7 @@ sync_with_parent(const char *s, bool hang_self) debug_printf ("signalling parent: %s", s); /* Tell our parent we're waiting. */ if (!SetEvent (child_proc_info->subproc_ready)) - api_fatal ("fork child - SetEvent failed, %E"); + api_fatal ("fork child - SetEvent for %s failed, %E", s); if (hang_self) { HANDLE h = child_proc_info->forker_finished; @@ -210,13 +210,14 @@ sync_with_parent(const char *s, bool hang_self) switch (psync_rc) { case WAIT_TIMEOUT: - api_fatal ("WFSO timed out"); + api_fatal ("WFSO timed out for %s", s); break; case WAIT_FAILED: if (GetLastError () == ERROR_INVALID_HANDLE && WaitForSingleObject (child_proc_info->forker_finished, 1) != WAIT_FAILED) break; - api_fatal ("WFSO failed, fork_finished %p, %E", child_proc_info->forker_finished); + api_fatal ("WFSO failed for %s, fork_finished %p, %E", s, + child_proc_info->forker_finished); break; default: debug_printf ("no problems"); -- cgit v1.2.3