Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Trap and exit



I am not claiming this is a bug in Zsh, but I confess I prefer the
behavior from Bash and Ash.

/tmp % cat foo.sh                                                nostromo 12:42
#! /bin/sh
trap 'echo trap: $?' 0
exit 59
/tmp % ash ./foo.sh                                              nostromo 12:42
trap: 59
/tmp % bash ./foo.sh                                            nostromo Err 59
trap: 59
/tmp % zsh ./foo.sh                                             nostromo Err 59
trap: 0
/tmp %                                                          nostromo Err 59

What do you think?



Messages sorted by: Reverse Date, Date, Thread, Author