On 13/02/2016 16:45, Martijn Dekker wrote:
The 'trap' command in dash is not compliant with POSIX. According to the
spec, both '-' and any unsigned decimal integer should be accepted as an
argument meaning 'unset this trap'; dash only accepts '-'.
Indeed. This was reported early December at
<http://www.spinics.net/lists/dash/msg01109.html> along with a patch.
The patch got rejected in its initial form, which would treat any
unsigned decimal integer as a signal number. Its later update treats
unsigned decimal integers as signal numbers only up to NSIG (which is an
OS-dependent value). bash uses a dynamic limit based on NSIG too, except
it adds some specific special numbers for bash-specific traps. I
wouldn't be surprised if it's dynamic in the other shells you tested as
well, and that the shell-specific traps are the reason for the slight
variations in limits you found.
Cheers,
Harald van Dijk
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html