From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2335 invoked from network); 8 Nov 2000 14:46:52 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Nov 2000 14:46:52 -0000 Received: (qmail 4463 invoked by alias); 8 Nov 2000 14:46:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13139 Received: (qmail 4456 invoked from network); 8 Nov 2000 14:46:17 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer goliath.siemens.de) From: "Andrej Borsenkow" To: "Sven Wischnowsky" , Subject: RE: read_poll RE: PATCH: Zpty cleanup (merge 13061 with 13116) Date: Wed, 8 Nov 2000 17:46:07 +0300 Message-ID: <000101c04992$a0657370$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 In-Reply-To: <200011081409.PAA22201@beta.informatik.hu-berlin.de> > > 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