Merge ~freddie-akeroyd/epics-base:msi_close_file into ~epics-core/epics-base/+git/epics-base:3.15
Proposed by
Freddie Akeroyd
Status: | Merged | ||||
---|---|---|---|---|---|
Merge reported by: | mdavidsaver | ||||
Merged at revision: | f537096b8f405392fe54208bcaf4f78c93911b0b | ||||
Proposed branch: | ~freddie-akeroyd/epics-base:msi_close_file | ||||
Merge into: | ~epics-core/epics-base/+git/epics-base:3.15 | ||||
Diff against target: |
12 lines (+1/-0) 1 file modified
src/ioc/dbtemplate/msi.cpp (+1/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Johnson | Approve | ||
Martin Konrad (community) | Approve | ||
Review via email: mp+369763@code.launchpad.net |
Commit message
Fix for truncation of MSI output on WIN32 as described in LP: #1835525
Description of the change
On WIN32 the reopened stdout file stream needs to be closed on program exit otherwise the output file is occasionally truncated.
To post a comment you must log in.
This does match the MS documentation, though I'm not clear what is going on here. Does freopen() really return a different non-NULL pointer? Does "fprint(stdout, ..." still work afterwards?
https:/ /docs.microsoft .com/en- us/cpp/ c-runtime- library/ reference/ freopen- wfreopen? view=vs- 2019
Despite my confusion, I don't think this would have any adverse effects if "outFP==stdout". The bug I can imagine would be somehow closing stdout twice on exit, which probably wouldn't be noticed.