autoconf
[Top][All Lists]
Advanced

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

Re: posh and Autoconf


From: Eric Blake
Subject: Re: posh and Autoconf
Date: Tue, 08 Apr 2008 21:36:21 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 4/7/2008 12:18 AM:
| Hello Russ,
|
| * Russ Allbery wrote on Mon, Apr 07, 2008 at 03:04:11AM CEST:
|> I believe posh was explicitly written as a POSIX compliance test suite for
|> shell scripts, and hence doesn't implement any extensions other than those
|> so ubiquitous that they're de facto standards.  There's discussion right
|> now about whether numeric signals fall into that category (one problem is
|> that only a limited set of those numbers are portable, since signal
|> numbers are not the same in different versions of UNIX, although I believe
|> the XSI extension spells out which ones are portable).

On the other hand, the version of 'ash' that ships with cygwin doesn't
understand signal names - ONLY signal numbers.  In other words, you can't
portably do

trap - EXIT

|
| Then I suppose that will not improve the situation wrt. Autoconf-
| generated scripts.  They trap 13 which is not listed as portable.
| Does anybody know of a system where that is not SIGPIPE?  I've
| so far thought of that as ubiquitous.

Maybe it is still possible to be portable to both camps.  Autoconf could
do a quick test as part of shell sanitization on whether trap/kill
understands numbers or names, then define variables $ac_sigpipe,
$ac_sigkill, $ac_sighup, ... that expand to the correct number and/or
name.  Then we could replace:
trap cleanup 0
with:
trap cleanup $ac_sigexit

But yes, it would be nicer if posh would accept the XSI list from POSIX
(1, 2, 3, 6, 9, 14, 15), plus 0 for EXIT and 13 for SIGPIPE.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkf8ObUACgkQ84KuGfSFAYDahQCfVDrC0JBWuEjhS/0Ocdc3lEf9
PFQAoJWgv8tjiyRfVwogBqjGltl58SOD
=mWdK
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]