diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-03 14:37:30 +0200 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-07-22 05:19:15 -0400 |
commit | 6a98f95373d60d48001299797f52b1f19c7ffecd (patch) | |
tree | ad957483bc617c93fef9fbb0a43170f118bfe115 | |
parent | 078d55028e4f4e9e4ba9216580a37778c40eca5c (diff) | |
download | busybox-w32-6a98f95373d60d48001299797f52b1f19c7ffecd.tar.gz busybox-w32-6a98f95373d60d48001299797f52b1f19c7ffecd.tar.bz2 busybox-w32-6a98f95373d60d48001299797f52b1f19c7ffecd.zip |
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>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r-- | shell/hush.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c index 386307720..835159066 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -3398,6 +3398,8 @@ static int checkjobs(struct pipe* fg_pipe) | |||
3398 | #endif | 3398 | #endif |
3399 | return rcode; | 3399 | return rcode; |
3400 | } | 3400 | } |
3401 | if (!fg_pipe->alive_cmds) | ||
3402 | return rcode; | ||
3401 | } | 3403 | } |
3402 | /* There are still running processes in the fg pipe */ | 3404 | /* There are still running processes in the fg pipe */ |
3403 | goto wait_more; /* do waitpid again */ | 3405 | goto wait_more; /* do waitpid again */ |