From dad664031ac1a8122f919314095ef42fb1973366 Mon Sep 17 00:00:00 2001 From: sabetts Date: Sat, 11 Jun 2005 16:31:26 +0000 Subject: (cmd_tmpwm): stop waiting for the child if waitpid produced an error. --- src/actions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3