Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: getting the status of the left-hand side of a pipe in the right-hand side
- X-seq: zsh-users 24122
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: getting the status of the left-hand side of a pipe in the right-hand side
- Date: Fri, 2 Aug 2019 00:44:17 +0200
- In-reply-to: <CAH+w=7apRhSvOA+v0jiJEiDv1RJeBEBA=C64U6OP2GBRw0TfJA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20190801154346.GA18570@zira.vinc17.org> <CAH+w=7apRhSvOA+v0jiJEiDv1RJeBEBA=C64U6OP2GBRw0TfJA@mail.gmail.com>
On 2019-08-01 09:49:03 -0700, Bart Schaefer wrote:
> So you might be able to find the job from the job table but the best you
> can reliably do for its status is to send it a "kill -0" and see if that
> returns error.
Can I assume that the left-hand side is the last job in the table
(this seems to be the case in all the tests I've done)?
That would be nice as a precise status is provided: either "running"
or the exit status. And this would be very useful as it appears that
$pipestatus no longer contains the expected value if the jobs builtin
is used:
zira% false | { sleep 1; jobs } ; echo $pipestatus
[1] exit 1 false
0
i.e. "0" instead of "1 0". Is this a bug? At least, this is not
documented.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author