[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: testsuite portability nit
From: |
Eric Blake |
Subject: |
Re: testsuite portability nit |
Date: |
Mon, 18 Apr 2005 01:50:56 +0000 |
> > On cygwin, where /bin/sh is ash, "trap '' CHLD" doesn't work (ash only
> > accepts signal numbers, not names):
> >
> > $ trap '' CHLD
> > trap: bad signal CHLD
> >
> > But CHLD is not one of the portable signal numbers (it is 20 on cygwin,
> > but other numbers on other platforms). Not all versions of kill(1) can
> > convert names to numbers, but this is coreutils.
>
> The names should be used instead of numbers. That is, the existing
> usage seems to be the right thing to do; it's what POSIX mangates
> nowadays. See
> http://www.opengroup.org/onlinepubs/009695399/utilities/trap.html.
>
I'm in total agreement that POSIX requires support for names, but my argument
was that cygwin's /bin/sh (and any other platform that uses ash or other
non-POSIX shells for /bin/sh) does not support names. Look at the screenshot
you quoted from my original mail. Hence, my proposed patch is the only
'portable' way I could come up with to supply the number to trap; and even that
is not portable outside of the coreutils testsuite, because it relies on
coreutils kill(1) to do the translation from name to number. See my query to
the autoconf list a while back:
http://lists.gnu.org/archive/html/autoconf/2005-01/msg00136.html
--
Eric Blake
- Re: testsuite portability nit,
Eric Blake <=