freebsd-dev/bin/sh/tests/errors/script-error1.0
Jilles Tjoelker 77da4a95e8 sh: Use 126 and 127 exit status for failures opening a script
This affects scripts named on the command line, named with a '.' special
builtin and found via the PATH %func autoloading mechanism.

PR:		231986
2018-11-27 21:49:59 +00:00

6 lines
112 B
Plaintext

# $FreeBSD$
{ stderr=$(${SH} /var/empty/nosuchscript 2>&1 >&3); } 3>&1
r=$?
[ -n "$stderr" ] && [ "$r" = 127 ]