Not a bug, just a difference in the trap command wrt /bin/sh..Quote:>Hi!
>I just inserted the fix, and I see no change ?
>(well, may be I did not crate the correct testing
>environment?)
>How to test that bug ?
>My freshly compiled ZSh reacts strangely if I hit ^C !
>it always says 'zsh: command not found: 1'
>In our /etc/profile is set (comming from /bin/sh)
>trap '' 1 2 3 15
>and later at the end of it is done
>trap 1 2 3 15
>setting the traps to theit default functions.
>BUT the zsh gets it as "set command '1' to be done in case
>of interrupt '2'" So the zsh does NOT work with a default
>/bin/sh script, and so is not usable as a login-shell !!!
>Question: 'bug, or feature' ???
>Stucki
Simply change the latter "trap 1 2 3 15" to a block like:
if [ "$RANDOM" != "$RANDOM" ]; then
trap - 1 2 3 # ksh, zsh
else
trap 1 2 3 # sh
fi
/-----_-- - ----_|| +1 514 466 8932 - &-