ash: exec: Return 126 on most errors in shellexec
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 5 Aug 2018 16:04:09 +0000 (18:04 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 5 Aug 2018 16:11:15 +0000 (18:11 +0200)
commit2596f412cd02d4b040262e5f40de2e7a7e6b32cf
treea91540715f5eafb8a5265c5a748d5edae16c3974
parent1c5eb88cd84c90e4c3d014f4abc8f8310c008842
ash: exec: Return 126 on most errors in shellexec

Upstream commit:

    Date: Sat, 19 May 2018 02:39:37 +0800
    exec: Return 126 on most errors in shellexec

    Currently when shellexec fails on most errors the shell will exit
    with exit status 2.  This patch changes it to 126 in order to avoid
    ambiguities with the exit status from a successful exec.

    The errors that result in 127 has also been expanded to include
    ENOTDIR, ENAMETOOLONG and ELOOP.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
function                                             old     new   delta
shellexec                                            245     254      +9

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