ash: eval: Restore input files in evalcommand
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 5 Aug 2018 15:07:26 +0000 (17:07 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 5 Aug 2018 16:11:15 +0000 (18:11 +0200)
commit1c5eb88cd84c90e4c3d014f4abc8f8310c008842
tree50cff50b137d834599d2e9690ebf4802c5a87cf1
parent58eb805c2c453c6764acbd65f5604465438d9272
ash: eval: Restore input files in evalcommand

Upstream commit:

    Date: Tue, 27 Mar 2018 00:39:35 +0800
    eval: Restore input files in evalcommand

    When evalcommand invokes a command that modifies parsefile and
    then bails out without popping the file, we need to ensure the
    input file is restored so that the shell can continue to execute.

Reported-by: Martijn Dekker <martijn@inlv.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
function                                             old     new   delta
unwindfiles                                            -      20     +20
evalcommand                                         1635    1653     +18
getoptscmd                                           584     595     +11
popallfiles                                           20      10     -10
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/1 up/down: 49/-10)             Total: 39 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c