I do not know any other shell than Bash that would run EXIT trap on
signal that has its default action.

You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dash in Ubuntu.

  dash does not handle ^C trap the same way that bash does

Status in dash package in Ubuntu:

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

  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

  ProblemType: Bug
  DistroRelease: Ubuntu 10.04
  Package: dash
  ProcVersionSignature: Ubuntu 2.6.32-23.37-generic
  Uname: Linux 2.6.32-23-generic i686
  Architecture: i386
  Date: Thu Jul 22 15:12:27 2010
   PATH=(custom, user)
  SourcePackage: dash

To manage notifications about this bug go to:

Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to