Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-09-20 06:06:57 +0400
committerChristopher Faylor <me@cgf.cx>2005-09-20 06:06:57 +0400
commitc529909f45fe73394d2846f6b886218449a4b2a0 (patch)
tree6384cc4fbe4fea54c45f99b57ec6dc794ac382a1 /winsup/cygwin/sigproc.cc
parentcddfc170fd5e28012ea231e62062cb5dcf31b782 (diff)
* dcrt0.cc (do_exit): Only call sigproc_terminate from one location --
pinfo::exit. * pinfo.cc (pinfo::exit): Move sigproc_terminate later so that signals can be processed while waiting for hExeced child. (pinfo::maybe_set_exit_code_from_windows): Set exit code from sigExeced if it is non-zero. Set exit_state to ES_EXEC_EXIT prior to waiting for captive process exit code. * exceptions.cc (sigExeced): New global variable. (signal_exit): Remove noreturn attribute from declaration. (signal_exit): Just terminate captive process and return if hExeced on the theory that the exit will be subsequently handled in the main thread. * sigproc.cc (sigproc_terminate): Eliminate test for ES_SIGPROCTERMINATE and use ES_FINAL instead. (sig_send): Use no_signals_available instead of duplicate test. * winsup.h (ES_EXEC_EXIT): New enum. (ES_SIGPROCTERMINATE): Delete.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 59f79961d..b9c66f376 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -492,7 +492,7 @@ sigproc_terminate (exit_states es)
{
exit_states prior_exit_state = exit_state;
exit_state = es;
- if (prior_exit_state > ES_SIGPROCTERMINATE)
+ if (prior_exit_state >= ES_FINAL)
sigproc_printf ("already performed");
else
{
@@ -541,7 +541,7 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
}
else
{
- if (!my_sendsig || (si.si_signo != __SIGEXIT && myself->exitcode & EXITCODE_SET) || &_my_tls == _sig_tls)
+ if (no_signals_available (si.si_signo != __SIGEXIT))
{
sigproc_printf ("my_sendsig %p, myself->sendsig %p, exit_state %d",
my_sendsig, myself->sendsig, exit_state);
@@ -638,7 +638,7 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
}
else
{
- if (no_signals_available (si.si_signo != __SIGEXIT))
+ if (no_signals_available (true))
sigproc_printf ("I'm going away now");
else if (!p->exec_sendsig)
system_printf ("error sending signal %d to pid %d, pipe handle %p, %E",