zsh-users
 help / color / mirror / code / Atom feed
* trap inconsistency between platforms
@ 2017-05-13 14:18 Thorsten Kampe
  2017-05-13 18:25 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Kampe @ 2017-05-13 14:18 UTC (permalink / raw)
  To: zsh-users

Hi,

the below code fragment generates...

TRAPPED ON ERROR
TRAPPED ON EXIT

...on Cygwin, Linux and macOS with Bash and on Cygwin 
and macOS with Zsh.

On Linux with Zsh it only generates...

TRAPPED ON ERROR

```
# will also run on error (except with zsh on Linux)
exit_handler() { echo "TRAPPED ON EXIT"; }

error_handler() {
    error_code=$?
    echo "TRAPPED ON ERROR"
    exit $error_code
}

trap exit_handler EXIT
trap error_handler ERR

false
```

Cygwin 2.8.0, zsh 5.3.1, bash 4.4.12
Ubuntu 17.04, zsh 5.2, bash 4.4.5
macOS Sierra, zsh 5.3.1, bash 4.4.12

Thorsten


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: trap inconsistency between platforms
  2017-05-13 14:18 trap inconsistency between platforms Thorsten Kampe
@ 2017-05-13 18:25 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2017-05-13 18:25 UTC (permalink / raw)
  To: zsh-users

This was fixed by workers/41012 (commit d7110d8f01), I believe.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-13 18:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-13 14:18 trap inconsistency between platforms Thorsten Kampe
2017-05-13 18:25 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).