From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2132 invoked by alias); 16 Sep 2003 19:13:33 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 2125 invoked from network); 16 Sep 2003 19:13:32 -0000 Received: from unknown (HELO web40017.mail.yahoo.com) (66.218.78.57) by sources.redhat.com with SMTP; 16 Sep 2003 19:13:32 -0000 Message-ID: <20030916191331.85685.qmail@web40017.mail.yahoo.com> Received: from [212.64.95.20] by web40017.mail.yahoo.com via HTTP; Tue, 16 Sep 2003 12:13:31 PDT Date: Tue, 16 Sep 2003 19:18:00 -0000 From: Jan Jaeger Subject: setvbuf/setlinebuf issue To: cygwin@cygwin.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-09/txt/msg01068.txt.bz2 Hi List, I am one of the developers of the hercules emulator (http://www.conmicro.cx/hercules), and it seems that we have hit a problem with setvbuf in more recent cygwin versions. We capture all standard output by means of redirecting stdout to a pipe, which is subsequently read by a logger function. (printf() to stdout, which then goes to the pipe, read() by the logger function from the pipe) We have always used setvbuf(stdout, NULL, _IOLBF, 0) to ensure that each line is read by the logger as it is written. However this has now stopped working in the current release of cygwin, adding a fflush() after every printf() bypasses the error, but at the moment setvbuf does not seem to work correctly for us. What I find somewhat odd is that this only happens when I recompile under the current cygwin. If I use an older binrary (created on backlevel cygwin) then all works fine. Has anyone experienced any similar problems with streams buffering? Thanks and regards, Jan Jaeger __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/