From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-users@zsh.org
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 [thread overview]
Message-ID: <20190801224417.GA1259@zira.vinc17.org> (raw)
In-Reply-To: <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@vinc17.net> - 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)
prev parent reply other threads:[~2019-08-01 22:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-01 15:43 Vincent Lefevre
2019-08-01 16:49 ` Bart Schaefer
2019-08-01 22:44 ` Vincent Lefevre [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190801224417.GA1259@zira.vinc17.org \
--to=vincent@vinc17.net \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).