DASH Shell discussions
 help / color / mirror / Atom feed
* POSIX compliant trap signal names
@ 2014-10-30 15:23 Sylvain Bertrand
  2014-10-30 15:26 ` Eric Blake
  0 siblings, 1 reply; 2+ messages in thread
From: Sylvain Bertrand @ 2014-10-30 15:23 UTC (permalink / raw)
  To: dash

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.

regards,

-- 
Sylvain BERTRAND

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: POSIX compliant trap signal names
  2014-10-30 15:23 POSIX compliant trap signal names Sylvain Bertrand
@ 2014-10-30 15:26 ` Eric Blake
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Blake @ 2014-10-30 15:26 UTC (permalink / raw)
  To: Sylvain Bertrand, dash

[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-30 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-30 15:23 POSIX compliant trap signal names Sylvain Bertrand
2014-10-30 15:26 ` Eric Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox