diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-03 14:37:30 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-03 14:37:30 +0200 |
commit | 6f22624a913e29c6a7088718bd3fd6052f917cc1 (patch) | |
tree | 39546a07ff7681edd91c876173c712443adfa3e9 | |
parent | 295fef80bcc994bd668f369ad863ad8d12c962b7 (diff) | |
download | busybox-w32-6f22624a913e29c6a7088718bd3fd6052f917cc1.tar.gz busybox-w32-6f22624a913e29c6a7088718bd3fd6052f917cc1.tar.bz2 busybox-w32-6f22624a913e29c6a7088718bd3fd6052f917cc1.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>
-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 1ad5fcd72..de04c015a 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -3505,6 +3505,8 @@ static int checkjobs(struct pipe* fg_pipe) | |||
3505 | #endif | 3505 | #endif |
3506 | return rcode; | 3506 | return rcode; |
3507 | } | 3507 | } |
3508 | if (!fg_pipe->alive_cmds) | ||
3509 | return rcode; | ||
3508 | } | 3510 | } |
3509 | /* There are still running processes in the fg pipe */ | 3511 | /* There are still running processes in the fg pipe */ |
3510 | goto wait_more; /* do waitpid again */ | 3512 | goto wait_more; /* do waitpid again */ |