www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/09/16/15:14:05

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <20030916191331.85685.qmail@web40017.mail.yahoo.com>
Date: Tue, 16 Sep 2003 12:13:31 -0700 (PDT)
From: Jan Jaeger <pa3efu AT yahoo DOT com>
Subject: setvbuf/setlinebuf issue
To: cygwin AT cygwin DOT com
MIME-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019