aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-06-03 14:37:30 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-06-03 14:37:30 +0200
commit6f22624a913e29c6a7088718bd3fd6052f917cc1 (patch)
tree39546a07ff7681edd91c876173c712443adfa3e9
parent295fef80bcc994bd668f369ad863ad8d12c962b7 (diff)
downloadbusybox-6f22624a913e29c6a7088718bd3fd6052f917cc1.tar.gz
hush: fix a case when backgrounded cmd makes shell hang
Signed-off-by: Bayram Kurumahmut <kbayram@ubicom.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/hush.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 1ad5fcd72..de04c015a 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -3505,6 +3505,8 @@ static int checkjobs(struct pipe* fg_pipe)
#endif
return rcode;
}
+ if (!fg_pipe->alive_cmds)
+ return rcode;
}
/* There are still running processes in the fg pipe */
goto wait_more; /* do waitpid again */