summaryrefslogtreecommitdiff
path: root/lldb/source/API/SBStream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBStream.cpp')
-rw-r--r--lldb/source/API/SBStream.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/API/SBStream.cpp b/lldb/source/API/SBStream.cpp
index fc8f09a7bb9a..2fc5fcfa8b0c 100644
--- a/lldb/source/API/SBStream.cpp
+++ b/lldb/source/API/SBStream.cpp
@@ -116,7 +116,8 @@ void SBStream::RedirectToFile(const char *path, bool append) {
void SBStream::RedirectToFileHandle(FILE *fh, bool transfer_fh_ownership) {
LLDB_INSTRUMENT_VA(this, fh, transfer_fh_ownership);
- FileSP file = std::make_unique<NativeFile>(fh, transfer_fh_ownership);
+ FileSP file = std::make_unique<NativeFile>(fh, File::eOpenOptionReadWrite,
+ transfer_fh_ownership);
return RedirectToFile(file);
}