setvbuf/setlinebuf issue

Jan Jaeger pa3efu@yahoo.com
Tue Sep 16 19:18:00 GMT 2003


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/



More information about the Cygwin mailing list