blob: aff6d51870d1281c18a484bb7900540ca8fc975c [file] [log] [blame]
Denys Vlasenkoc91950f2020-02-19 12:10:41 +01001# "exit" in trap should not use last command's exitcode,
2# but exitcode on entering the trap.
3$THIS_SH -c '
4 trap "false;exit" term
5 kill $$ &
Denys Vlasenko9aa751b2020-02-26 09:05:52 +01006 (sleep 1; exit 42)
Denys Vlasenkoc91950f2020-02-19 12:10:41 +01007'
8echo 42:$?