summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsabetts <sabetts>2005-06-11 16:31:26 +0000
committersabetts <sabetts>2005-06-11 16:31:26 +0000
commitdad664031ac1a8122f919314095ef42fb1973366 (patch)
tree171b1051f348d03e1920d409daa06639f3429054
parentc79ff3cc23bc3772e1d09faf1394da88d5e7a960 (diff)
downloadratpoison-dad664031ac1a8122f919314095ef42fb1973366.zip
(cmd_tmpwm): stop waiting for the child if waitpid
produced an error.
-rw-r--r--ChangeLog5
-rw-r--r--src/actions.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b48a6cc..4a47a77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-11 Shawn Betts <sabetts@vcn.bc.ca>
+
+ * src/actions.c (cmd_tmpwm): stop waiting for the child if waitpid
+ produced an error.
+
2005-04-17 Shawn <sabetts@vcn.bc.ca>
* src/actions.h: new prototype compat
diff --git a/src/actions.c b/src/actions.c
index 076c186..e05fa06 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -4173,7 +4173,7 @@ cmd_tmpwm (int interactive, struct cmdarg **args)
do
{
child = waitpid (pid, &status, 0);
- } while (child != pid);
+ } while (child != -1 && child != pid);
/* Enable our SIGCHLD handler */
set_sig_handler (SIGCHLD, chld_handler);
/* Some processes may have quit while our sigchld handler was