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