delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
X-Envelope-Sender-Is: | Andrej DOT Borsenkow AT mow DOT siemens DOT ru (at relayer goliath.siemens.de) |
From: | "Andrej Borsenkow" <Andrej DOT Borsenkow AT mow DOT siemens DOT ru> |
To: | "Cygwin Mailing List" <Cygwin AT Sourceware DOT Cygnus DOT Com> |
Subject: | Possible bug with select and master side of pty |
Date: | Wed, 8 Nov 2000 17:46:06 +0300 |
Message-ID: | <000001c04992$9ff5e8c0$21c9ca95@mow.siemens.ru> |
MIME-Version: | 1.0 |
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 |
When polling master side of pseudo tty for reading, select is just using common function fhandler_pipe::select_read. This does not work when we do onlcr conversion (actually, always), read buffer of size 1 and are reading NL. In this case, first select returns readable descriptor (because there is real data in master-slave pipe) and first read returns CR. Second select does not think fd is readable because there is no more data in pipe; still, read from master side would return NL here. It _looks_ like adding fhandler_tty_master::select_read that is combination of fhandler_tty_common::select_read (when need_nl == 0) and fhandler_null::select_read (when need_nl != 0) should do the job. But I never programmed in C++ and do not trust myself to fully understand all these method interaction :( -andrej Have a nice DOS! B >> -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |