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>
1_14_stable
Denys Vlasenko 2009-06-03 14:37:30 +02:00 committed by Mike Frysinger
parent 078d55028e
commit 6a98f95373
1 changed files with 2 additions and 0 deletions

View File

@ -3398,6 +3398,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 */