From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12383 invoked by alias); 16 Sep 2003 20:04:05 -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 12376 invoked from network); 16 Sep 2003 20:04:04 -0000 Received: from unknown (HELO redhat.com) (66.187.230.200) by sources.redhat.com with SMTP; 16 Sep 2003 20:04:04 -0000 Received: by redhat.com (Postfix, from userid 201) id 73D226C6F5; Tue, 16 Sep 2003 16:04:00 -0400 (EDT) Date: Tue, 16 Sep 2003 20:04:00 -0000 From: Christopher Faylor To: cygwin@cygwin.com Subject: Re: setvbuf/setlinebuf issue Message-ID: <20030916200400.GI23057@redhat.com> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20030916191331.85685.qmail@web40017.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030916191331.85685.qmail@web40017.mail.yahoo.com> User-Agent: Mutt/1.4.1i X-SW-Source: 2003-09/txt/msg01079.txt.bz2 On Tue, Sep 16, 2003 at 12:13:31PM -0700, Jan Jaeger wrote: >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. Do you have a simple test case which demonstrates this? I wrote the below and piped it into cat and it works as expected. "foo" is printed, there is a five second pause, and "bar is printed. cgf #include int main (int argc, char **argv) { setvbuf(stdout, NULL, _IOLBF, 0); printf ("foo\n"); sleep (5); printf ("bar"); } -- Please use the resources at cygwin.com rather than sending personal email. Special for spam email harvesters: send email to aaaspam@sourceware.org and be permanently blocked from mailing lists at sources.redhat.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/