[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: trap / kill



Manoj Srivastava <srivasta@debian.org> writes:
> On Tue, 29 Apr 2008 22:08:46 -0700, Russ Allbery <rra@debian.org> said: 

>> We discussed including all of XSI, but there's a pile of other stuff
>> in XSI that I think we decided that dash didn't actually implement.  I
>> don't remember the details, though.

>         OK. I guess we can just say that the trap function will follow
>  XSI, perhaps with a special exemption for SIGPIPE?
>
>         Or is something else being planned?

Not so far as I know.  I'd be happy with that resolution.  I think that
reflects what's really portable in practice (although possibly not
portable to posh).

configure and libtool use 1 2 13 and 15 (I just checked).  XSI guarantees
1 2, and 15.  Sounds like we should add wording basically saying that
scripts may assume that trap and kill implement the XSI extension to POSIX
and that trapping signal 13 by number is supported to catch SIGPIPE.

The signal numbers are the only XSI extension to trap.

For kill, XSI is what permits kill -1 or kill -HUP.  POSIX without XSI
requires kill -s HUP (no numbers allowed and -s required).  This is a bit
more than just the signal number thing, but I think it's reasonable to
permit all XSI behavior here as well.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: