diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-02-18 15:37:43 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-02-18 15:37:43 +0100 |
commit | 47eb979404735b9528538968cb5eaac7355a0c5a (patch) | |
tree | 3e75d1d7e964b45156c097ce745eee26d004fb9b /archival/libarchive | |
parent | 97edfc42f112a15828aaec886ef7012d24f34d5e (diff) | |
download | busybox-47eb979404735b9528538968cb5eaac7355a0c5a.tar.gz |
ash: jobs: Only clear gotsigchld when waiting for everything
Upstream commit:
Date: Sat, 19 May 2018 02:39:41 +0800
jobs: Only clear gotsigchld when waiting for everything
The gotsigchld flag is always cleared in dowait but not all callers
of dowait will wait for everything. In particular, when jp is set
we only wait until the set job isn't running anymore.
This patch fixes this by only clearing gotsigchld if jp is unset.
It also changes the waitcmd to actually set jp which corresponds
to the behaviour of bash/ksh93/mksh.
The only other caller of dowait that doesn't wait for everything
is the jobless reaper. This is in fact redundant now that we wait
after every simple command. This patch removes it.
Finally as every caller of dowait needs to wait until either the
given job is not running, or until all terminated jobs have been
processed, this patch moves the loop into dowait itself.
Fixes: 03876c0743a5 ("eval: Reap zombies after built-in...")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libarchive')
0 files changed, 0 insertions, 0 deletions