[SERVER-15484] mongoshim does not flush stdout after writing results Created: 01/Oct/14  Updated: 02/Oct/14  Resolved: 01/Oct/14

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: 2.7.6
Fix Version/s: 2.7.7

Type: Bug Priority: Minor - P4
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

RHEL55


Issue Links:
Depends
depends on SERVER-15096 Create standalone tool to read/write ... Closed
Operating System: Linux
Participants:

 Description   

Shim::doRun() needs to call std::ostream::flush() on cout before returning

This seems to be an issue under RHEL55 but not newer versions of Linux.



 Comments   
Comment by Githook User [ 01/Oct/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-15484 flush stdout before exiting Shim::doRun()
Branch: master
https://github.com/mongodb/mongo/commit/f9ead899683b5baa7822b448defd0fbdd88c4e1b

Comment by Eric Milkie [ 01/Oct/14 ]

After discussion, we are going to flush the C++ stream prior to flushing the underlying C RTL buffer for stdout. While this doesn't seem necessary, it may help RHEL 5.5 avoid losing buffered terminal data.

Comment by Eric Milkie [ 01/Oct/14 ]

Seems dubious. After doRun() returns, we already call fflush(stdout).

Generated at Thu Feb 08 03:38:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.