Re: bashism question
"brian m. carlson" <sandals@crustytoothpaste.ath.cx> writes:
> As for the signal numbers, different architectures have different signal
> numbers. See signal(7), but the most common ones *are* identical.
> However, signals such as SIGUSR1 and SIGUSR2 are not, and using a number
> for these will break on at least alpha, mips, mipsel, and sparc[1].
> Using names is not only more portable, it is more explicit. Everyone
> knows what SIGABRT does, but not everyone knows what signal 4 does.
> Think of using signal numbers as using magic numbers: it's a bad
> programming practice.
I'm personally leaning towards modifying Policy to say that XSI extensions
are permitted for kill and trap, which not only allows a very specific set
of numeric signals but also allows kill -1 instead of kill -s 1.
The one remaining problem is that some scripts (libtool, I think) trap
SIGPIPE by number, which is not one of the XSI-allowed numeric signals.
I'm not sure if we should make an additional special exception.
Cc'd to the relevant Policy bug.
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: