ash: mkinit: Split reset into exitreset and reset
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 17 Feb 2020 10:22:59 +0000 (11:22 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 17 Feb 2020 10:22:59 +0000 (11:22 +0100)
commitafc91faeddd6b8234dccea2f7913f57a5bb3d1ec
treeae4b2d8f7802cc94987841832d010ba3129773a1
parent9ee5892798be81f7a6f3e070ecd52cbf0d55740e
ash: mkinit: Split reset into exitreset and reset

Upstream commit:

    Date: Sat, 19 May 2018 02:39:40 +0800
    mkinit: Split reset into exitreset and reset

    Previously reset was called after exitshell.  This was changed
    so that it was called before exitshell because certain state needed
    to be reset in order for the EXIT trap to work.

    However, this caused issues because certain other states (such
    as local variables) should not be reset.  This patch fixes this
    by creating a new function exitreset that is called prior to
    exitshell and moving reset back to its original location.

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