From: Christopher Faylor <cgf-rcm@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: setvbuf/setlinebuf issue
Date: Tue, 16 Sep 2003 20:04:00 -0000 [thread overview]
Message-ID: <20030916200400.GI23057@redhat.com> (raw)
In-Reply-To: <20030916191331.85685.qmail@web40017.mail.yahoo.com>
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 <stdio.h>
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/
next prev parent reply other threads:[~2003-09-16 20:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-16 19:18 Jan Jaeger
2003-09-16 20:04 ` Christopher Faylor [this message]
2003-09-17 17:57 Jan Jaeger
2003-09-17 18:39 Brian Ford
2003-09-17 21:39 ` Christopher Faylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030916200400.GI23057@redhat.com \
--to=cgf-rcm@cygwin.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).