]> sourceware.org Git - newlib-cygwin.git/commitdiff
* sigproc.cc (remove_proc): Don't do busy loop when execing since thread could
authorChristopher Faylor <me@cgf.cx>
Mon, 21 Nov 2011 19:13:30 +0000 (19:13 +0000)
committerChristopher Faylor <me@cgf.cx>
Mon, 21 Nov 2011 19:13:30 +0000 (19:13 +0000)
have been terminated prior to setting flag.
* signal.cc (sigwaitinfo): Zero event before closing to signal other threads
that it is no longer available.

winsup/cygwin/ChangeLog
winsup/cygwin/signal.cc
winsup/cygwin/sigproc.cc

index f9505df4a84f340e85bf131a6fe3b8e196be9e7f..e7278c8575530d2e41869c08c4a45b73b54c5256 100644 (file)
@@ -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
index 32cbfe9d344d0e7dfa6b80a79911bbc452ea1e97..9b45fee1bc1128e270b83db77c1789320b6d1ab0 100644 (file)
@@ -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;
index 663abfb5c2f6606e82b04bd7f21cd3c07dc6ab80..a48bd43fd64ef1590304ba4993d9e8bc18541d51 100644 (file)
@@ -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;
This page took 0.037112 seconds and 5 git commands to generate.