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>2013-01-17 03:04:28 +0400
committerChristopher Faylor <me@cgf.cx>2013-01-17 03:04:28 +0400
commit211dd84b838e17901221067742438a9f7e4c3669 (patch)
treec0faba2132f5ec5c8807128ea70e02b133b8e7b7
parentf432e328af134680f900083323144692cca0069c (diff)
* sigproc.cc (no_signals_available): Finally remove this macro entirely.
(exit_thread): Ensure process lock is released on error exit. (sig_send): Simplify "its_me" test. Remove no_signals_available tests.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/sigproc.cc17
2 files changed, 10 insertions, 14 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index dcc1591f6..643c6f348 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,12 @@
2013-01-16 Christopher Faylor <me.cygwin2013@cgf.cx>
+ * sigproc.cc (no_signals_available): Finally remove this macro
+ entirely.
+ (exit_thread): Ensure process lock is released on error exit.
+ (sig_send): Simplify "its_me" test. Remove no_signals_available tests.
+
+2013-01-16 Christopher Faylor <me.cygwin2013@cgf.cx>
+
* pthread.cc (pthread_exit): Add kludge to accommodate noreturn attribute.
2013-01-14 Antti Kantee <pooka@iki.fi>
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index b38abc3ce..fc5631785 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -31,8 +31,6 @@ details. */
#define WSSC 60000 // Wait for signal completion
#define WPSP 40000 // Wait for proc_subproc mutex
-#define no_signals_available() ((myself->exitcode & EXITCODE_SET) || (&_my_tls == _sig_tls))
-
/*
* Global variables
*/
@@ -489,6 +487,7 @@ exit_thread (DWORD res)
#ifdef DEBUGGING
system_printf ("couldn't duplicate the current thread, %E");
#endif
+ for_now.release ();
ExitThread (res);
}
ProtectHandle1 (h, exit_thread);
@@ -543,7 +542,7 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
pack.wakeup = NULL;
bool wait_for_completion;
- if (!(its_me = (!have_execed && (p == NULL || p == myself || p == myself_nowait))))
+ if (!(its_me = p == NULL || p == myself || p == myself_nowait))
{
/* It is possible that the process is not yet ready to receive messages
* or that it has exited. Detect this.
@@ -558,11 +557,6 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
}
else
{
- if (no_signals_available ())
- {
- set_errno (EAGAIN);
- goto out; // Either exiting or not yet initializing
- }
wait_for_completion = p != myself_nowait;
p = myself;
}
@@ -688,9 +682,7 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
}
else
{
- if (no_signals_available ())
- sigproc_printf ("I'm going away now");
- else if (!p->exec_sendsig)
+ if (!p->exec_sendsig)
system_printf ("error sending signal %d to pid %d, pipe handle %p, %E",
si.si_signo, p->pid, sendsig);
}
@@ -728,9 +720,6 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
rc = 0; // Successful exit
else
{
- if (!no_signals_available ())
- system_printf ("wait for sig_complete event failed, signal %d, rc %d, %E",
- si.si_signo, rc);
set_errno (ENOSYS);
rc = -1;
}