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 Jun 1, 11:31am, Peter Stephenson wrote:
} Subject: Re: Bug#310872: zsh can't be a ksh replacement (can't trap ERR).
}
} Bart Schaefer wrote:
} > 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.
} 
} How did you work this out?

I was basing it on an observation of the awk-generated list of trap names
on my system and the lack of any explicit mention of CLD and IO elsewhere
in the trap code, vs. the presence of alt_sigs in jobs.c.

} Adding SIGERR as an alias where there's no system signal is trivial.
} Now it should show up in the trap lists under ERR, too.  I've removed
} the ALT_SIGS definition because there isn't really any justification for
} making the mechanism optional now.

I can't tell by reading the patch: does this do as Oliver suggested and
prefer the ZERR equivalent for ERR, requiring SIGERR to get the actual
signal?  If not -- that is, if SIGERR is preferred when available --
then we still don't have ksh compatibility.



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