The trap builtin silently ignores invalid signal specifications if the first argument is "-"; e.g., % trap - INT '@#?junk!*' TERM succeeds without complaint. The attached patch changes this so that an error is reported (which matches the behaviour if the first argument is not "-"). I've also amended the documentation for trap, which didn't discuss the invocations "trap -" and "trap SIG1 SIG2 ...". Regards, Thorsten Dahlheimer
Attachment:
trap.patch
Description: Binary data