Following r297661, disable dup workaround to disable duplicate STDOUT fd closing and instead directly prevent closing of STD* file descriptors.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
LGTM
lib/Support/raw_ostream.cpp | ||
---|---|---|
500 ↗ | (On Diff #93521) | Needs a comment explaining why we don't close them and preferably also why using dup "doesn't work" (i.e., it would still have stdout open in the end). |
llvm/trunk/lib/Support/raw_ostream.cpp | ||
---|---|---|
467–469 | The reason I didn't do this change previously was because of this comment, which implies that the ability to close stdout etc is desired. Of course, in neither case is stdout really closed. This comment should be modified to reflect the new behaviour. |
This change left behind a great number of stale comments proclaiming the virtues of closing stdout. I think I agree, closing stdout was never worth it. Asking for tool output on stdout is asking for it to get mixed up with remark outputs, -fdump-record-layouts, and all uses of outs() in clang. We still need to clean things up.
I updated the comments I tripped over in rL310016, but I should check the programmers manual...
The reason I didn't do this change previously was because of this comment, which implies that the ability to close stdout etc is desired. Of course, in neither case is stdout really closed. This comment should be modified to reflect the new behaviour.