Re: POSIX compliant trap signal names

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

 



On 10/30/2014 09:23 AM, Sylvain Bertrand wrote:
> Hit the issue while compiling linux 3.16.3 with dash,
> ${linux-src}/scripts/link-vmlinux.sh line 114 .
> The signal names for trap built-in must be prefixed with SIG to be
> POSIX compliant. dash expect trap signal names without a SIG prefix.

Wrong.  Per
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#trap

The condition can be EXIT, 0 (equivalent to EXIT), or a signal specified
using a symbolic name, without the SIG prefix, as listed in the tables
of signal names in the <signal.h> header defined in XBD Headers; for
example, HUP, INT, QUIT, TERM. Implementations may permit names with the
SIG prefix or ignore case in signal names as an extension.

Thus, POSIX requires 'trap ... INT' to work, but says 'trap ... SIGINT'
and 'trap ... int' are up to the implementation whether they are
supported as an extension.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux