zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: <zsh-workers@sunsite.auc.dk>
Subject: RE: PATCH: ptyread eating CPU on Cygwin
Date: Thu, 19 Oct 2000 13:49:03 +0400	[thread overview]
Message-ID: <001501c039b1$d0ab8470$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <200010190845.KAA15888@beta.informatik.hu-berlin.de>

> This also changes comptest and nslookup to use `zpty -b' to get
> blocking IO on the pty. Hm, should blocking be the default and -b
> select non-blocking behaviour?
>

Yes, I'd say. I've tried to find reasonable usage for non-blocking mode and
failed. Consider "zpty -r foo bar pat" in non-blocking mode. It reads whatever
was available and returns error code if it did not match. So, what can program
now do with 'bar' content? Request additional read? That returns us to the
same busy loop problem. Or just through away. (This was discussed when zpty
was born).

So I suggest adding "read-with-timeout" possibilty, and making blocking read
default. It is also useful to distinguish between EOF and timeout with
different return code.

-andrej


  reply	other threads:[~2000-10-19  9:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-19  8:45 Sven Wischnowsky
2000-10-19  9:49 ` Andrej Borsenkow [this message]
2000-10-19 14:24   ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2000-10-23  7:59 Sven Wischnowsky
2000-10-20  7:01 Sven Wischnowsky
2000-10-20  7:55 ` Andrej Borsenkow
2000-10-18  9:04 Peter Stephenson
2000-10-18 11:30 ` PATCH: " Andrej Borsenkow
2000-10-18 15:55   ` Bart Schaefer
2000-10-18 16:44     ` Andrej Borsenkow

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='001501c039b1$d0ab8470$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=zsh-workers@sunsite.auc.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).