diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-10-16 11:55:37 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-10-16 11:55:37 +0000 |
commit | c78bf115248f62fa355e7a9b2b9532b37e693085 (patch) | |
tree | e3a06795d6c37eae40cf3416922ad0b3dae6795b | |
parent | f7c7aad1351a0ed58f458e485968af498d542b5b (diff) |
* Enable buffering of stderr in C++.
-rw-r--r-- | src/shared.cc | 4 |
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) { |