ash: eval: Reap zombies after built-in commands and functions
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 18 Feb 2020 13:28:30 +0000 (14:28 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 18 Feb 2020 13:28:30 +0000 (14:28 +0100)
commitd81af7216b3305a1aac211dc847dd1c191f3b307
tree3ff0488dfe7ee89a7a5472c2f75e9c8cecc99554
parent22c75924daa41b7ea097796afd4baafa2fc99d05
ash: eval: Reap zombies after built-in commands and functions

Upstream commit:

    Date: Mon, 26 Mar 2018 23:55:50 +0800
    eval: Reap zombies after built-in commands and functions

    Currently dash does not reap dead children after built-in commands
    or functions.  This means that if you construct a loop consisting
    of solely built-in commands and functions, then zombies can hang
    around indefinitely.

    This patch fixes this by reaping when necessary after each built-in
    command and function.

Reported-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c