Giter Club home page Giter Club logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 17, 2024
stderr is not buffered by default on any system that I know.  fflush(stderr) 
should be unnecessary.  Are you doing something unusual in your setup, perhaps? 
 Or does cygwin?  I don't see any mention of it on a quick web search.

Anyway, no harm in adding it, I suppose.  Feel free to draw up a patch.

Original comment by [email protected] on 20 May 2011 at 6:15

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 17, 2024
I've had a bit of a dig, and it turns out that the rxvt terminal emulator that 
ships with Cygwin buffers stderr. The reason for this seems to be that rxvt 
needs a pty I/O layer that simply doesn't exist on Windows, so it's emulated 
with pipes, which introduces the buffering. Given there's no harm adding it, 
I'll draw up a patch to work around this. Thanks.

Original comment by alastair.maw on 31 May 2011 at 9:34

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 17, 2024
I just released a new version of gflags, and decided not to fix this for that.  
stderr is standardized to flush, and I think it's just confusing to add code to 
flush it anyway.  Presumably cygwin/rxvt users are used to dealing with 
problems of this sort?

You're right it's just one line of code, and easy to fix, so I can still be 
convinced to do it. :-)  I'm leaving the bug open.

Original comment by [email protected] on 30 Jul 2011 at 2:50

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 17, 2024
} stderr is standardized to flush, and I think it's just confusing to add code 
to flush it anyway.

Wouldn't it be clear enough if you simply comment the code properly?

// flush stderr before exiting as at least cygwin/rxvt buffers stderr
fflush (stderr);

This would make your library more reliable and such commented line of code 
couldn't be confusing to anyone who is digging into the code of it.

Original comment by [email protected] on 11 Aug 2011 at 4:47

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 17, 2024
OK, I'm convinced. :-)  It'll be in the next release.

Original comment by [email protected] on 26 Aug 2011 at 12:00

  • Changed state: Started

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 17, 2024
This should be fixed in gflags 1.7, just released

Original comment by [email protected] on 21 Dec 2011 at 4:26

  • Changed state: Fixed

from gflags.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.