touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #37803
[Bug 608894] Re: dash does not handle ^C trap the same way that bash does
Status changed to 'Confirmed' because the bug affects multiple users.
** Changed in: dash (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dash in Ubuntu.
https://bugs.launchpad.net/bugs/608894
Title:
dash does not handle ^C trap the same way that bash does
Status in dash package in Ubuntu:
Confirmed
Bug description:
Binary package hint: dash
The problems with making /bin/sh symlink to dash instead of bash are
known (#141481), but I haven't seen this particular problem reported
yet.
dash and bash process the ^C (INT) signal differently. Try running
the following script (then type ^C) with both bash and dash:
<<<
tint() { echo int; }
thup() { echo hup; }
tchld() { echo chld; }
tterm() { echo term; }
texit() { echo exit; }
# trap tint INT
trap thup HUP
trap tchld CHLD
trap tterm TERM
trap texit EXIT
echo type ^C...
sleep 100
>>>
bash triggers the EXIT. dash triggers no trap.
If you uncomment the INT trap, bash triggers INT and EXIT, and dash
triggers INT, CHLD, and EXIT.
I don't know what POSIX dictates or which is correct, I am guessing
that any exit should trigger EXIT (so dash is wrong).
Either way, the shells behave differently, and the difference is
causing problems in existing Ubuntu scripts. (I found it in /usr/bin
/xeno-test.)
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: dash 0.5.5.1-3ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-23.37-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-23-generic i686
Architecture: i386
Date: Thu Jul 22 15:12:27 2010
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: dash
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/608894/+subscriptions