Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: coprocess descriptor and error messages
- X-seq: zsh-workers 28266
- From: Peter Stephenson <Peter.Stephenson@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: PATCH: coprocess descriptor and error messages
- Date: Fri, 17 Sep 2010 09:46:10 +0100
- In-reply-to: <100916220444.ZM30547@xxxxxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Cambridge Silicon Radio
- References: <100916220444.ZM30547@xxxxxxxxxxxxxxxxxxxxxx>
On Thu, 16 Sep 2010 22:04:42 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> This seems somehow wrong to me ... starting from "zsh -f":
>
> torch% print -p ; echo $?
> print: bad file number: -1
> 1
> torch% read -p ; echo $?
> 1
>
> Seems to me that both commands should either fail silently, or print a
> more specific error. Patch below does the former. (Line numbers may
> be off.) I won't commit until I see commentary.
The question is whether it's useful to be able to test whether the
coprocess is open at the same time as attempting to read or write. If so,
doing it silently is reasonable. Otherwise it might be less mysterious to
print "coprocess not open", or something like that, in both cases.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
Messages sorted by:
Reverse Date,
Date,
Thread,
Author