Package: bash3
Version: 3.0-12
Severity: normal

before i begin, let me say that the following provides an excellent
detailed background:

        http://www.cons.org/cracauer/sigint.html

in my opinion, the philosophy of bash for ^C is often different from
the user's usual expectation.  it's hard to call bash's signal
behavior a bug if it was designed that way.

but it's easy to say it's a bug if it causes radically unexpected
behavior for users, and the user has no easy, obvious, documented way
to get expected behavior in the most important cases.

please make it possible and document in the man page how to get
expected ^C and ^Z behavior from shell scripts -- stopping the whole
script instead of continuing on -- preferably using an environment
variable.

it's best as a variable because it can be set once and inherited by
subshells, and it won't be necessary to set traps everywhere just
to get expected behavior.

also consider interactive commands like:

        $ sleep 3600 ; echo hi

if you do ^C on that, hi gets echoed.  this does not happen in zsh and
many users do not expect that.  this makes users wonder under what
conditions interrupting a loop will interrupt the entire loop and
not make it continue.  i've seen it both ways in bash.

i've seen it suggested in bash circles that the latter should be
something like:

        $ sleep 3600 && echo hi

but it should be possible to set an environment variable to get the
expected behavior without having to consider the exit code of every
program that you want to run like that.

i have no problem at all with bash designers having their own
philosophy on this, but as the number 1 shell, it would be best for
bash to allow the user to set an environment variable to make it
handle signals differently.

it would be a shame for all users who get sufficiently annoyed with
things running when they don't want them to to have to switch to zsh
merely because it handles signals more comfortably (that's not to say
that it handles them perfectly either).

thanks.

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11--from-2.6.9-proc-config-and-menuconfig
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages bash3 depends on:
ii  base-files              3.1.2            Debian base system miscellaneous f
ii  libc6                   2.3.6-7          GNU C Library: Shared libraries
ii  libncurses5             5.5-1.1          Shared libraries for terminal hand
ii  passwd                  1:4.0.3-31sarge5 change and administer password and

bash3 recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to