[Top][All Lists]

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

removing old trap behavior causes serious issues on Solaris

From: Vince Del Vecchio
Subject: removing old trap behavior causes serious issues on Solaris
Date: Thu, 16 Sep 2004 12:57:10 -0400 (EDT)

Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.8
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc' 
-DCONF_OSTYPE='solaris2.8' -DCONF_MACHTYPE='sparc-sun-solaris2.8' 
-DCONF_VENDOR='sun' -DLOCALEDIR='/cpd/misc/share/locale' -DPACKAGE='bash' 
-DSHELL -DHAVE_CONFIG_H  -I.  -I.. -I../include -I../lib -I../lib/intl 
-I/cpd/src/gnu/bash/3.0/sol58/lib/intl  -O3
uname output: SunOS dejavu.spd.analog.com 5.8 Generic_108528-29 sun4u sparc 
Machine Type: sparc-sun-solaris2.8

Bash Version: 3.0
Patch Level: 0
Release Status: release

The NEWS file says:
> oo. The historical behavior of `trap' that allows a missing `action' argument
>     to cause each specified signal's handling to be reset to its default is
>     now only supported when `trap' is given a single non-option argument.

But the standard /etc/profile on Solaris (at least 7/8, not sure about 9)
uses this behavior.  It begins with
  trap "" 2 3
and ends with
  trap 2 3
which leaves the shell in a state where programs invoked cannot be

Since this is the historical behavior of the shell, and there are
clearly scripts in existence which depend on it, wouldn't it make more
sense to preserve backward compatibility?  Put another way, why should
all Solaris sysadmins have to edit /etc/profile solely just because
bash does something incompatible?

  bash --norc --noprofile
  trap "" 2 3
  trap 2 3
  <Type Control-C.  It will be ignored.>
Undo the change described in the NEWS file.

reply via email to

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