Comments (6)
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.
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.
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.
} 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.
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.
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)
- Add ability to have options that can be specified multiple times. HOT 2
- Please put the label 'google' on this project HOT 5
- Warnings in Visual Studio 2010 and unable to compile unit test HOT 10
- Can't locate auto/Autom4te/XFile/msg.al in @INC HOT 2
- How to set kRootDir for FlagValue::CleanName
- Support NuGet package generation for Windows users HOT 1
- @GFLAGS_IS_A_DLL@ expands to empty string in gflags_declare.h HOT 6
- Set INTERFACE_COMPILE_DEFINITIONS of imported gflags library targets to define GFLAGS_DLL_DECL HOT 2
- Google glog fails to compile against gflags HOT 5
- Google glog fails to find gflags/gflags.h when using google namespace HOT 4
- Compilation error on Windows when trying to use the library. HOT 2
- Add library versioning (soname) HOT 6
- Import symbols into google namespace to maintain backwards compatibility HOT 10
- Flags always have default value HOT 1
- Bad soname version in current git master HOT 10
- Incorrect makefile generation with cmake HOT 1
- compile problem HOT 5
- Support uint32 as flag type
- ReloadNonCommandFlags needed HOT 2
- FindThreadsCXX error when cross-compiling HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gflags.