From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: zpty -r and pipes
Date: Mon, 13 May 2013 18:25:27 -0700 [thread overview]
Message-ID: <CAH+w=7ZVL_wx2ZUiU5ZQKFzosG4YENWA5bQ-ovtNMrOuJ1W2WQ@mail.gmail.com> (raw)
In-Reply-To: <20130513152720.GA10320@chaz.gmail.com>
On Mon, May 13, 2013 at 8:27 AM, Stephane Chazelas
<stephane.chazelas@gmail.com> wrote:
>
> $ zsh -c 'zmodload zsh/zpty; zpty E echo test; zpty -r E | cat'
> $
>
> No output.
Check the exit status:
% zsh -c 'zmodload zsh/zpty; zpty E echo test; zpty -r E | cat &&
print $pipestatus'
1 0
%
"zpty -r" is failing. I wonder if this is another case of a read()
being interrupted by a signal? It seems to be a race, I can affect it
by inserting a sleep:
% zsh -c 'zmodload zsh/zpty; zpty E echo test; (zpty -r E) | cat'
test
% zsh -c 'zmodload zsh/zpty; zpty E echo test; {sleep 1; zpty -r E} | cat'
% zsh -c 'zmodload zsh/zpty; zpty E echo test; {zpty -r E; sleep 1} | cat'
test
prev parent reply other threads:[~2013-05-14 1:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-13 15:27 Stephane Chazelas
2013-05-13 16:21 ` Peter Stephenson
2013-05-14 1:25 ` Bart Schaefer [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='CAH+w=7ZVL_wx2ZUiU5ZQKFzosG4YENWA5bQ-ovtNMrOuJ1W2WQ@mail.gmail.com' \
--to=schaefer@brasslantern.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).