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

Re: Bug#310872: zsh can't be a ksh replacement (can't trap ERR).



On May 30, 10:06am, Clint Adams wrote:
} Subject: Re: Bug#310872: zsh can't be a ksh replacement (can't trap ERR).
}
} If the wise people on zsh-workers think that not understanding ERR is
} acceptable for ksh emulation, I'm inclined to do nothing.

Please note that I was not making any sort of judgement about whether
zsh *ought* to treat ERR differently in ksh mode.  I merely explained
why zsh behaves the way it does.  (Google indicates that ksh does run
on UNICOS; I wonder what it does with ERR in that case.)

I note in passing that "trap" in zsh doesn't understand all the same
signals that "kill" does.  For example, when the OS defines both, "kill"
understands SIGIO as a synonym for SIGPOLL and SIGCLD for SIGCHLD, but
"trap" only knows CHLD and POLL.

Perhaps the "alt_sigs" code should be factored out of jobs.c [*] and
extended to cover SIGERR as well.  Whether that's enabled only in ksh
emulation is a second question.

[*] Or perhaps bin_trap() should be moved *to* jobs.c.



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