summary refs log tree commit diff
path: root/src/funcs/suspend
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2018-05-19 02:39:41 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2018-05-28 17:12:22 +0800
commit6c691b3e5099de380a9d2f97d5c72f4a978bb794 (patch)
tree53672df8d103ca0a1af2f1ff3eb0e15eba2081d5 /src/funcs/suspend
parentmkinit: Split reset into exitreset and reset (diff)
downloaddash-6c691b3e5099de380a9d2f97d5c72f4a978bb794.tar.gz
dash-6c691b3e5099de380a9d2f97d5c72f4a978bb794.zip
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>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
command substitutionHerbert Xu 2018-05-28jobs: Only clear gotsigchld when waiting for everythingHerbert Xu 2018-05-28mkinit: Split reset into exitreset and resetHerbert Xu 2018-05-28main: Only set savestatus in exitcmdHerbert Xu 2018-05-28exec: Return 126 on most errors in shellexecHerbert Xu 2018-05-17Release 0.5.10.2.Herbert Xu 2018-05-15parser: Fix incorrect eating of backslash newlinesHerbert Xu 2018-05-10Release 0.5.10.1.Herbert Xu 2018-05-09jobs - Do not block when waiting on SIGCHLDHerbert Xu 2018-05-03Release 0.5.10.Herbert Xu 2018-04-19eval: Variable assignments on functions are no longer persistentHerbert Xu 2018-04-19parser: Fix parameter expansion inside inner double quotesHerbert Xu 2018-04-19parser: Fix parsing of ${}Herbert Xu 2018-04-19man: correct typos, iff -> ifMartijn Dekker 2018-04-19expand: Do not quote backslashes in unquoted parameter expansionHerbert Xu 2018-04-19shell: Add subdir-objects to AM_INIT_AUTOMAKEJason Bowen 2018-04-19eval: Restore input files in evalcommandHerbert Xu 2018-04-19eval: Reap zombies after built-in commands and functionsHerbert Xu 2018-04-19redir: Fix typo in noclobber codeHerbert Xu 2018-04-19expand: Fix glibc glob(3) supportHerbert Xu 2018-04-02expand: Fix buffer overflow in expandmetaHerbert Xu 2018-04-02builtin: Move echo space/nl handling into print_escape_strHerbert Xu 2018-04-02builtin: Fix echo performance regressionHerbert Xu 2018-04-02expand: Fix ghost fields with unquoted $@/$*Herbert Xu 2018-04-02parser: Allow newlines within parameter substitutionHerbert Xu 2018-04-02expand: Fix bugs with words connected to the right of $@Herbert Xu 2018-03-25Revert "[BUILTIN] Remove unnecessary restoration of format string in printf"Herbert Xu 2018-03-22parser: Fix backquote support in here-document EOF markHerbert Xu