Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

RE: read_poll RE: PATCH: Zpty cleanup (merge 13061 with 13116)



>
> Andrej Borsenkow wrote:
>
> > Unless I completely miss something:
> >
> > read_poll tries to read from fd and stores the character it has read in
> > readchar; that is cmd->read when called from checkptycmd. But
> this value does
> > not seem to be used anywhere in read loop that looks like read_poll simply
> > eats up this readahead char ...
>
> See zpty.c:474 and following lines.
>

But this is before main loop. So, cmd->read should be -1 (it was not ever
changed yet), and ret == 0 (as set on entry into ptyread). The first thing
executed is then read_poll and then immediately read.

-andrej



Messages sorted by: Reverse Date, Date, Thread, Author