zsh-workers
 help / color / mirror / code / Atom feed
* Re: PATCH: read_poll Re: PATCH: Zpty cleanup (merge 13061 with 13116)
@ 2000-11-09  8:09 Sven Wischnowsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 2000-11-09  8:09 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> On Nov 8, 11:20am, Sven Wischnowsky wrote:
> }
> } Bart Schaefer wrote:
> } 
> } > However, that does not mean that the rest of the tests should be skipped
> } > when select() returns 0.  A return of 0 means the select() timed out,
> } > which (apparently) might happen under Cygwin even if there actually are
> } > characters available to be read.  Peter/Andrej, is that the case?
> } 
> } I don't know about Cygwin, but that blocking read (line 1381) is
> } exactly the test I wanted to avoid.
> 
> The read on line 1381 is *non-*blocking.  Since polltty is now always zero
> when called from zpty, the setblock_fd() call is made before the read() is
> attempted.  That was the patch I first committed which started me down the
> road of merging in your changes.

Ouch. Right, hadn't thought about the change to polltty. Sorry.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: PATCH: read_poll Re: PATCH: Zpty cleanup (merge 13061 with 13116)
@ 2000-11-09  8:12 Sven Wischnowsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 2000-11-09  8:12 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> On Nov 8,  3:58pm, Bart Schaefer wrote:
> } Subject: PATCH: read_poll Re: PATCH: Zpty cleanup (merge 13061 with 13116)
> }
> } You're correct.  The code Sven referenced at line 474 needs to be repeated
> } after line 484.
> 
> Sven's apparently also sent a patch for this which hasn't propagated
> through the mailing list yet -- he committed the change.

And it still hasn't. Hm, that's weird, makes me wonder what happened
with the other mails I sent yesterday afternoon (not to the list).

I'll just change the `?????' in the ChangeLog to `unposted' (and
change it again if the mail re-appears).

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: PATCH: Zpty cleanup (merge 13061 with 13116)
@ 2000-11-08 10:20 Sven Wischnowsky
  2000-11-08 10:42 ` Andrej Borsenkow
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 2000-11-08 10:20 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> ...
> 
> > There were some things in [read_poll()] I think were really wrong,
> > like testing `select() > 1' and like trying all possible tests if the
> > first tests worked but returned zero.
> 
> ...
> 
> However, that does not mean that the rest of the tests should be skipped
> when select() returns 0.  A return of 0 means the select() timed out,
> which (apparently) might happen under Cygwin even if there actually are
> characters available to be read.  Peter/Andrej, is that the case?

I don't know about Cygwin, but that blocking read (line 1381) is
exactly the test I wanted to avoid. When building the patch I had a
case where zpty was waiting in checkptycmd() because of that (select()
correctly had returned zero, saying that there wasn't anything to be
read, the `timeout' being zero after all means that the select should
just do a poll, not wait).

I don't know if I can reproduce it, maybe I'll try at the weekend.

> ...
> 
> [Late-breaking note:  *Somebody* should have noticed that read_poll()
> calls gettyinfo() and settyinfo(), which of course affects SHTTY, and
> has nothing whatever to do with the pty.  So polltty=1 is just a very
> expensive no-op for zpty, and it really must pass 0.]

Ahem. Oops.

Hmhm. I wasn't too happy with calling read_poll() in zpty.c
anyway. The problem I wanted to solve is, of course, that a zpty
command should be marked as `finished' if there is still input to be
read even though the OS tells us that the process has exited (which
can happen and is very ugly).

I don't have any particular comments or patches for the other things. Yet.


Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-11-09  8:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-09  8:09 PATCH: read_poll Re: PATCH: Zpty cleanup (merge 13061 with 13116) Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
2000-11-09  8:12 Sven Wischnowsky
2000-11-08 10:20 Sven Wischnowsky
2000-11-08 10:42 ` Andrej Borsenkow
2000-11-08 14:03   ` read_poll " Andrej Borsenkow
2000-11-08 14:46     ` Andrej Borsenkow
2000-11-08 15:58       ` PATCH: read_poll " Bart Schaefer
2000-11-08 17:00         ` Bart Schaefer

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).