diff options
author | Christopher Faylor <me@cgf.cx> | 2000-03-15 04:49:36 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-03-15 04:49:36 +0000 |
commit | 332600d80cdfcf46ce36c9f5c77b452d8636fa7f (patch) | |
tree | 31ba7287033df0ea28d03a345d08840662a1b798 /winsup/cygwin/exceptions.cc | |
parent | 31b3dbe174d47b96ee7a8b08c7e67b50505eb79e (diff) | |
download | cygnal-332600d80cdfcf46ce36c9f5c77b452d8636fa7f.tar.gz cygnal-332600d80cdfcf46ce36c9f5c77b452d8636fa7f.tar.bz2 cygnal-332600d80cdfcf46ce36c9f5c77b452d8636fa7f.zip |
Pipe changes throughout suggested by Eric Fifer <EFifer@sanwaint.com>
* debug.cc (threadname_init): Pass name of lock as arg 2 of new_muto.
* malloc.cc (malloc_init): Ditto.
* sigproc.cc (sigproc_init): Ditto.
* exceptions.cc (events_init): Ditto.
(call_handler): Eliminate special case for hExeced. Report locked thread in
debugging output.
* fhandler.cc (fhandker_pipe::fhandler_pipe): Propagate device type to base
class.
* fhandler.h (fhandler_pipe): Ditto.
* hinfo.cc (hinfo::build_fhandler): Pass specific type of pipe to constructor.
* spawn.cc (spawn_guts): Eliminate dependency on signal when waiting for
subprocess.
* strace.cc: Remove obsolete #ifdef.
* sync.cc (muto::muto): Save the name of the muto.
(muto:~muto): Also release the muto.
* sync.h: Add a muto name field.
* select.cc (peek_pipe): Avoid doing a PeekNamedPipe on the write end of a
pipe.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 57cb232c9..4e9cc64cd 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -652,14 +652,6 @@ call_handler (int sig, struct sigaction& siga, void *handler, int nonmain) HANDLE hth = NULL; int res; - if (hExeced != NULL && hExeced != INVALID_HANDLE_VALUE) - { - SetEvent (signal_arrived); // For an EINTR case - sigproc_printf ("armed signal_arrived"); - exec_exit = sig; // Maybe we'll exit with this value - goto out1; - } - if (!nonmain) ebp = sigsave.ebp; else @@ -675,15 +667,16 @@ call_handler (int sig, struct sigaction& siga, void *handler, int nonmain) sigproc_printf ("suspending mainthread"); res = SuspendThread (hth); + muto *m; /* FIXME: Make multi-thread aware */ - for (muto *m = muto_start.next; m != NULL; m = m->next) + for (m = muto_start.next; m != NULL; m = m->next) if (m->unstable () || m->owner () == maintid) goto keep_looping; break; keep_looping: - sigproc_printf ("suspended thread owns a muto"); + sigproc_printf ("suspended thread owns a muto (%s)", m->name); if (res) goto set_pending; @@ -702,7 +695,7 @@ call_handler (int sig, struct sigaction& siga, void *handler, int nonmain) ebp = cx.Ebp; } - if (nonmain && interruptible (cx.Eip)) + if (hExeced != NULL || (nonmain && interruptible (cx.Eip))) interrupt_now (&cx, sig, siga, handler); else if (!interrupt_on_return (ebp, sig, siga, handler)) { @@ -729,7 +722,6 @@ out: sigproc_printf ("ResumeThread returned %d", res); } -out1: sigproc_printf ("returning %d", interrupted); return interrupted; } @@ -974,7 +966,7 @@ events_init (void) api_fatal ("can't create title mutex, %E"); ProtectHandle (title_mutex); - mask_sync = new_muto (FALSE, NULL); + mask_sync = new_muto (FALSE, "mask_sync"); windows_system_directory[0] = '\0'; (void) GetSystemDirectory (windows_system_directory, sizeof (windows_system_directory) - 2); char *end = strchr (windows_system_directory, '\0'); |