]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/exec12.sub
Bash-4.4 patch 19
[thirdparty/bash.git] / tests / exec12.sub
CommitLineData
a0c0a00f
CR
1: ${TMPDIR:=/var/tmp}
2TMPFILE=$TMPDIR/exitcode
3
4rm -f $TMPFILE
5set -e
6exit_handler() { echo "exit code: $?" ; touch $TMPFILE; }
7false() { ! :; }
8notfound() { nosuchcommand ; }
9syntaxerror() { !:; }
10
11main()
12{(
13 trap exit_handler 0
14 "$@" >> /dev/null 2>&1
15)}
16main "$@"
17echo "after main: should not get here"