> Yes, it's a common idiom and is almost universally supported, but > POSIX is quite clear that "trap 0 1 2 3 15" is supposed to execute the > command "0" when one of the signals 1 2 3 15 arrive. > > I reviewed how ksh etc. actually behave, and it's pretty clear that > this is a bug in POSIX. None of the shells I checked behave the way > that POSIX requires. I just now submitted a bug report to the Open > Group (my reference number 20060125a), and we'll see how they resolve > it.
(Due to recent spam, the open group bug reports are now moderated instead of instantly mirrored, so I haven't yet seen your report to read the actual details of it.) Unpatched bash 3.0 tried to execute "0", rather than including 0 in the list of signals to ignore. By popular demand, this was fixed in bash 3.0 patchlevel 3 and above; however, it renders this idiom unportable thanks to the strict wording of POSIX. -- Eric Blake _______________________________________________ bug-gnulib mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-gnulib
