From: Atom Smasher <atom@smasher.org>
To: zsh-users@sunsite.dk
Subject: runaway zselect
Date: Sun, 17 May 2009 16:43:23 +1200 (NZST) [thread overview]
Message-ID: <20090517044323.15333.qmail@smasher.org> (raw)
i would expect zselect to return an error and stop the while loop when "w"
stops producing output. instead i'm seeing an infinite loop of blank
lines, after "w" finishes:
while zselect -r 0
do
read -r foo
print -r -- $foo
done < <( w )
same thing reading from a coproc with "done <& p"
the weird thing is that i have it working as desired (reading from a
coproc) in a script, but i can't reproduce it outside of the script... the
weirder thing is that i can get this working when i test it:
sysread -i 0 -o 1 -t 200 <& p
but in the script mentioned above, it fails:
coprocess: bad file descriptor
any ideas? thanks...
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"People have so manipulated the concept of freedom that it
finally boils down to the right of the stronger and richer to
take from the weaker and poorer whatever they still have."
-- Theodor Adorno
next reply other threads:[~2009-05-17 4:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-17 4:43 Atom Smasher [this message]
2009-05-17 7:58 ` Atom Smasher
2009-05-17 21:47 ` Bart Schaefer
2009-05-17 23:28 ` Atom Smasher
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=20090517044323.15333.qmail@smasher.org \
--to=atom@smasher.org \
--cc=zsh-users@sunsite.dk \
/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).