FYI: incompatibility in 'trap'
Posted Aug 5, 2004 15:22 UTC (Thu) by vmole
Parent article: Bash 3.0 released
It turns out that one of the POSIX fixes breaks a long standing use of the 'trap' builtin. Previously, one could specify e.g.
to reset the signal handler to the default for signal 0. POSIX requires the form
trap - 0
Turning POSIX mode off, or running the script with "#!/bin/bash" instead
of "#!/bin/sh" solves this, but doesn't really help scripts that are meant to be portable.
(No, I didn't figure this out myself. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=261948
to post comments)