opnsense-src/tools/regression/bin/sh/builtins/exit3.0
Jilles Tjoelker 70df11eaad sh: Make exit without parameters from EXIT trap POSIX-compliant.
It should use the original exit status, just like falling off the
end of the trap handler.

Outside an EXIT trap, 'exit' is still equivalent to 'exit $?'.
2011-01-08 23:08:13 +00:00

5 lines
98 B
Text

# $FreeBSD$
# exit without arguments differs from exit $? in an EXIT trap.
trap 'false; exit' 0