From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: How to misplace an entire pipeline
Date: Tue, 9 Aug 2011 21:19:10 +0100 [thread overview]
Message-ID: <20110809211910.631d6561@pws-pc.ntlworld.com> (raw)
In-Reply-To: <110808231032.ZM2380@torch.brasslantern.com>
On Mon, 08 Aug 2011 23:10:32 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Aug 8, 7:27pm, Peter Stephenson wrote:
> } Subject: Re: How to misplace an entire pipeline
> }
> } On Sun, 07 Aug 2011 21:05:07 -0700
> } Bart Schaefer <schaefer@brasslantern.com> wrote:
> } > - jobtab[thisjob].stat |= STAT_CURSH|STAT_NOPRINT;
> } > + jobtab[thisjob].stat |= STAT_CURSH;
> } > + if (!jobtab[thisjob].procs)
> } > + jobtab[thisjob].stat |= STAT_NOPRINT;
> }
> } Looks fairly plausible, anyway.
>
> Should that be "if (hasprocs(thisjob))" instead, do you think?
To a first approximation, the user isn't directly interested in the aux
procs, but there might still be some knock-on effect. So until we find
otherwise, I would guess not.
> So the following hack does the right thing in the case of piping to
> true where execbuiltin() has returned, but does not do the right thing
> in the case of read. What needs to be tested in place of (!list_pipe)
> to determine that the tail of the current pipeline is a simple shell
> builtin?
I don't think we've remembered that fact, but it's available (as
is_builtin) in execcmd(), so could be stored before the builtin is
called. What I don't know about is where to put that information (is it
as simple as using thisjob?), and what might invalidate it.
> In fact even that may not be enough, maybe this needs to know if the
> current job is a simple shell builtin -- it might be blocked on a
> "while read; do ..." or on a "wait" in the middle of a loop, etc.
I suppose it depends on what cases the list_pipe logic would be
triggered.
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
next prev parent reply other threads:[~2011-08-09 20:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-06 3:31 Bart Schaefer
2011-08-07 17:50 ` Peter Stephenson
2011-08-07 21:43 ` Bart Schaefer
2011-08-08 4:05 ` Bart Schaefer
2011-08-08 18:27 ` Peter Stephenson
2011-08-09 6:10 ` Bart Schaefer
2011-08-09 20:19 ` Peter Stephenson [this message]
2011-08-13 18:52 ` Bart Schaefer
2011-08-13 20:15 ` Bart Schaefer
2011-09-12 13:51 ` Alexey I. Froloff
2011-09-12 16:03 ` Bart Schaefer
2011-09-12 16:18 ` Bart Schaefer
2011-09-12 16:35 ` Peter Stephenson
2011-09-15 14:57 ` Alexey I. Froloff
2011-09-16 16:16 ` Bart Schaefer
2011-09-12 16:27 ` Alexey I. Froloff
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=20110809211910.631d6561@pws-pc.ntlworld.com \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@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).