From 3b69aaa9326376641b02e43556b6c9c706c7467f Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 18 Mar 2006 19:28:59 +0000 Subject: * pinfo.h (EXITCODE_OK): Define new constant. * sigproc.cc (child_info::sync): Return EXITCODE_OK if entering with exit_code == 0. (sig_send): Don't complain if sending signals while blocked if the sender isn't in the main thread. --- winsup/cygwin/ChangeLog | 8 ++++++++ winsup/cygwin/pinfo.h | 1 + winsup/cygwin/sigproc.cc | 4 +++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index aaeac479b..17be5b5d8 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2006-03-18 Christopher Faylor + + * pinfo.h (EXITCODE_OK): Define new constant. + * sigproc.cc (child_info::sync): Return EXITCODE_OK if entering with + exit_code == 0. + (sig_send): Don't complain if sending signals while blocked if the + sender isn't in the main thread. + 2006-03-18 Christopher Faylor * child_info.h (CURR_CHILD_INFO_MAGIC): Regenerate. diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h index 93a862688..fbd73dab9 100644 --- a/winsup/cygwin/pinfo.h +++ b/winsup/cygwin/pinfo.h @@ -35,6 +35,7 @@ enum picom #define EXITCODE_SET 0x8000000 #define EXITCODE_NOSET 0x4000000 #define EXITCODE_RETRY 0x2000000 +#define EXITCODE_OK 0x1000000 class fhandler_pipe; diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index a213a5607..a82e90002 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -520,7 +520,7 @@ sig_send (_pinfo *p, int sig) SetEvent (sigCONT); sigheld = false; } - else + else if (&_my_tls == _main_tls) { #ifdef DEBUGGING system_printf ("signal %d sent to %p while signals are on hold", sig, p); @@ -886,6 +886,8 @@ child_info::sync (pid_t pid, HANDLE& hProcess, DWORD howlong) DWORD child_info::proc_retry (HANDLE h) { + if (!exit_code) + return EXITCODE_OK; switch (exit_code) { case STILL_ACTIVE: /* shouldn't happen */ -- cgit v1.2.3