Re: Portability problems in autoconf manual

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

 



On Wednesday 29 April 2009 15:47:19 Paul Eggert wrote:
> > It seems that 'trap 1 2 13 15' (without any command) reset the traps
> > in a reasonably portable way,
>
> I'm afraid not.  For example, on Ubuntu 9.04:
>
> $ dash
> !-penguin $ trap 1 2
> !-penguin $ kill -2 $$
> dash: 1: not found
>
> It's hard to argue that this is a bug, since POSIX requires this behavior.

that looks like a bug in dash according to the POSIX documentation

http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#trap
If the first operand is an unsigned decimal integer, the shell shall treat all 
operands as conditions, and shall reset each condition to the default value. 
Otherwise, if there are operands, the first is treated as an action and the 
remaining as conditions.

thus `trap 1 2` should reset signals 1 and 2 to the default handler since the 
first arg "1" is an unsigned decimal integer.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux