Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: $(<nofile) doesn't set $? to non-zero
- X-seq: zsh-workers 42467
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: $(<nofile) doesn't set $? to non-zero
- Date: Thu, 15 Mar 2018 09:23:05 +0000
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180315092308euoutp02f402b6eb4573fd45dd955a9dd54572e9~cDafI7a_t1935819358euoutp026
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1521105788; bh=ZdgRbJpyPwLw3k4a4LUvd8LLUwt4qsxIUqXRU+R7cc8=; h=Date:From:To:Subject:In-reply-to:References:From; b=VGBVbSr+5XkDgvTRTR8qJr30x8dk1SJd668bIYMOQnEqy5ZULElT+eMIersYBlNXF yLgSG3tXLqwxcIChtlwS/Wqu6wUpJBw2zcTmtnXfVsOBcoD/YKbA7cCb9tX8xbc3SN Eg3TIO8Nq6Eqlwj2gjvHmTcUXUatIEHKs6Z49cck=
- In-reply-to: <20180315071204.GA10057@chaz.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: SCSC
- References: <CGME20180314103335epcas4p30222f0df02adda27cbddbe62075ff9ad@epcas4p3.samsung.com> <20180314103254.GA10404@chaz.gmail.com> <20180314105442.28c5554a@camnpupstephen> <20180314144248.GC10404@chaz.gmail.com> <20180314145004.6e4b971b@camnpupstephen> <20180315071204.GA10057@chaz.gmail.com>
On Thu, 15 Mar 2018 07:12:04 +0000
Stephane Chazelas <stephane.chazelas@xxxxxxxxx> wrote:
> 2018-03-14 14:50:04 +0000, Peter Stephenson:
> > On Wed, 14 Mar 2018 14:42:48 +0000
> > Stephane Chazelas <stephane.chazelas@xxxxxxxxx> wrote:
> > > Would it be worth doing some:
> > >
> > > ret = readoutput(stream, qt);
> > > if (errno) {
> > > zwarn("%e: %s", errno, s);
> > > lastval = cmdoutval = 1;
> > > }
> > > return ret;
> > >
> > > there (or something cleaner to avoid relying on errno)?
> >
> > The return value is the linked list as we're in the context of
> > substitution, not command execution, which isn't easy to change
> > without a complete rewrite.
> [...]
>
> Why not just pass the error as a return argument like in the
> patch below?
That should be more consistent, thanks. I've committed it (minor
tweaks).
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author