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
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-11-21 23:13:30 +0400
committerChristopher Faylor <me@cgf.cx>2011-11-21 23:13:30 +0400
commit15660c23ab4e99605b638f791b71d4d68f4ab436 (patch)
tree5db68b40c8d8444bc4f8cde9b964850db783f8cd /winsup
parent8b0e312bf1379d45f83a68091683df5e87bab454 (diff)
* sigproc.cc (remove_proc): Don't do busy loop when execing since thread could
have been terminated prior to setting flag. * signal.cc (sigwaitinfo): Zero event before closing to signal other threads that it is no longer available.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/signal.cc2
-rw-r--r--winsup/cygwin/sigproc.cc5
3 files changed, 13 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f9505df4a..e7278c857 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,11 @@
+2011-11-21 Christopher Faylor <me.cygwin2011@cgf.cx>
+
+ * sigproc.cc (remove_proc): Don't do busy loop when execing since
+ thread could have been terminated prior to setting flag.
+
+ * signal.cc (sigwaitinfo): Zero event before closing to signal other
+ threads that it is no longer available.
+
2011-11-18 Corinna Vinschen <corinna@vinschen.de>
* shared.cc (get_shared_parent_dir): Use global shared_parent_dir
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index 32cbfe9d3..9b45fee1b 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -608,6 +608,8 @@ sigwaitinfo (const sigset_t *set, siginfo_t *info)
__seterrno ();
res = -1;
}
+
+ _my_tls.event = NULL;
CloseHandle (h);
sigproc_printf ("returning signal %d", res);
return res;
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 663abfb5c..a48bd43fd 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -1106,8 +1106,9 @@ remove_proc (int ci)
moving it or it may become confused. The chances are very high that
the proc_waiter thread has already done this by the time we
get here. */
- while (!procs[nprocs].waiter_ready)
- yield ();
+ if (!have_execed)
+ while (!procs[nprocs].waiter_ready)
+ yield ();
procs[ci] = procs[nprocs];
}
return 0;