Linux-Dash Archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Sylvain Bertrand <sylvain.bertrand@gmail.com>, dash@vger.kernel.org
Subject: Re: POSIX compliant trap signal names
Date: Thu, 30 Oct 2014 09:26:46 -0600	[thread overview]
Message-ID: <545258B6.7020501@redhat.com> (raw)
In-Reply-To: <CAN5MFOrmT4U+A+4jS_NGybFjH1uw1HGoRbpa2megL_LshsTuGA@mail.gmail.com>

[-- 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 --]

      reply	other threads:[~2014-10-30 15:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 15:23 POSIX compliant trap signal names Sylvain Bertrand
2014-10-30 15:26 ` Eric Blake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=545258B6.7020501@redhat.com \
    --to=eblake@redhat.com \
    --cc=dash@vger.kernel.org \
    --cc=sylvain.bertrand@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).