FYI: incompatibility in 'trap'
Posted Aug 5, 2004 15:22 UTC (Thu) by
vmole (guest, #111)
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.
trap 0
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
for details.)
(
Log in to post comments)