|
From: | Chet Ramey |
Subject: | Re: trap reset for multiple signals |
Date: | Wed, 01 Sep 2004 10:10:38 -0400 |
User-agent: | Mozilla Thunderbird 0.7.1 (Macintosh/20040626) |
struebinc@post.ch wrote:
Configuration Information [Automatically generated, do not change]: Machine: sparc OS: solaris2.8 Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc' -DCONF_OSTYPE='sol aris2.8' -DCONF_MACHTYPE='sparc-sun-solaris2.8' -DCONF_VENDOR='sun' -DLOCALEDIR= '/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -I./lib/intl -I/data/packages/build/bash/3.0/src/bash-3.0/lib/intl -g - O2 uname output: SunOS wcwe00ho.post.ch 5.8 Generic_108528-29 sun4u sparc SUNW,Ultr a-5_10 Machine Type: sparc-sun-solaris2.8 Bash Version: 3.0 Patch Level: 0 Release Status: release Description:By setting traps in the /etc/profile we use : trap "" 2 3. At the end of of the profile we reset the trap by : trap 2 3 But the trap still exists.On bash 2.05 this works fine.
POSIX/SUS makes this syntax (`trap 2 3') obsolescent. The first argument is taken as the `action'; it is not optional. Bash-3.0 only supports this when `trap' is supplied a single non-option argument -- there's no ambiguity in that case. I have a backwards-compatibility patch that will support this in the case that the first argument is a valid signal number. I think that's a reasonable compromise. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet ) Live...Laugh...LoveChet Ramey, ITS, CWRU chet@po.cwru.edu http://tiswww.tis.cwru.edu/~chet/
[Prev in Thread] | Current Thread | [Next in Thread] |