From 4e74da05692c4ac7070c65167ce9c745553bad50 Mon Sep 17 00:00:00 2001 From: cgf Date: Mon, 21 Nov 2011 21:09:31 +0000 Subject: [PATCH] * sigproc.cc (remove_proc): Don't do busy loop when exiting since it doesn't matter. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/sigproc.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e7278c8575..2c79342040 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2011-11-21 Christopher Faylor + * sigproc.cc (remove_proc): Don't do busy loop when exiting since it + doesn't matter. + +2011-11-21 Christopher Faylor + * sigproc.cc (remove_proc): Don't do busy loop when execing since thread could have been terminated prior to setting flag. diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index a48bd43fd6..8d31139862 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -1106,7 +1106,7 @@ 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. */ - if (!have_execed) + if (!have_execed && !exit_state) while (!procs[nprocs].waiter_ready) yield (); procs[ci] = procs[nprocs]; -- 2.11.0