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).
- X-seq: zsh-workers 21298
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug#310872: zsh can't be a ksh replacement (can't trap ERR).
- Date: Wed, 01 Jun 2005 13:50:49 +0000
- Cc: 310872@xxxxxxxxxxxxxxx
- In-reply-to: <200506011031.j51AV17i010021@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200505261638.SAA09610@xxxxxxxxxxxxxxxxx> <20050526191520.GA30061@xxxxxxxxxxx> <42971781.9050402@xxxxxxx> <20050530140616.GA7651@xxxxxxxxxxx> <1050530184143.ZM30459@xxxxxxxxxxxxxxxxxxxxxxx> <200506011031.j51AV17i010021@xxxxxxxxxxxxxx>
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