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>
1 file changed