Yash 2 その 294: トラップ内での return 結果
POSIX の return 組込みの規定には昔から When return is executed in a trap action, the last command is considered to be the command that executed immediately preceding the trap action.
と書いてあって、exit 組込みと同様に、トラップ内で無引数で return 組込みを呼んだらトラップに入る直前の終了ステータスが return の終了ステータスになることになってゐる。が、果たしてこれは合理的な挙動なのだらうか?