Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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" To: Subject: Possible bug in fhandler_pty_master::process_slave_output() Date: Thu, 3 Aug 2000 14:24:13 +0400 Message-ID: <000701bffd34$f82da190$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 If need_nl is not zero, we get int rc = 0; ... if (need_nl) { /* We need to return a left over \n character, resulting from \r\n conversion. Note that we already checked for FLUSHO and OutputStopped at the time that we read the character, so we don't check again here. */ buf[0] = '\n'; need_nl = 0; goto out; } ... out: termios_printf ("returning %d", rc); return rc; That is, in this case instead of 1 function returns 0, that of course means EOF. That corresponds to symptoms I've seen here - after every line read from master side I get a read() with size 0. Next read() returns next character(s) from the next line. This opens up another question. It means, that somewhere between slave and master side NL is converted into CR-NL. Program writes into slave side "foo\n" - and reading from master side I get "foo\r" followed by EOF. I already tried to set binary mode for both slave and master using setmode() but without any luck. Do I need some special initialization for pseudo terminals? I'm currently running cygwin-1.1.3-1 prerelease; source are from CVS on Kuly, 30th. The revision of fhandler_tty.cc is 1.10 for HEAD. -andrej Have a nice DOS! B >> -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com