aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-10-16 11:55:37 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-10-16 11:55:37 +0000
commitc78bf115248f62fa355e7a9b2b9532b37e693085 (patch)
treee3a06795d6c37eae40cf3416922ad0b3dae6795b /src
parentf7c7aad1351a0ed58f458e485968af498d542b5b (diff)
* Enable buffering of stderr in C++.
Diffstat (limited to 'src')
-rw-r--r--src/shared.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shared.cc b/src/shared.cc
index 32e891617..dcda0b50a 100644
--- a/src/shared.cc
+++ b/src/shared.cc
@@ -53,6 +53,10 @@ int main(int argc, char * * argv)
ATerm bottomOfStack;
ATinit(argc, argv, &bottomOfStack);
+ /* Turn on buffering for cerr. */
+ char buf[1024];
+ cerr.rdbuf()->pubsetbuf(buf, sizeof(buf));
+
try {
initAndRun(argc, argv);
} catch (UsageError & e) {