diff options
author | Pavel Labath <labath@google.com> | 2015-02-17 16:07:52 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2015-02-17 16:07:52 +0000 |
commit | 646b064543271e839c35e70275e340f147071eb0 (patch) | |
tree | e8df779ce4f63e5b0c1f80e717f56117d8f3e805 /lldb/source/Target/Platform.cpp | |
parent | caf3114245cff258ecf7cfa1ffbb868efd02665f (diff) | |
download | bcm5719-llvm-646b064543271e839c35e70275e340f147071eb0.tar.gz bcm5719-llvm-646b064543271e839c35e70275e340f147071eb0.zip |
Use CloseOnExec in Platform::PutFile
Summary:
This does not fix any outstanding issue that I know of, but there is no reason these files should
_not_ have CloseOnExec.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D7694
llvm-svn: 229506
Diffstat (limited to 'lldb/source/Target/Platform.cpp')
-rw-r--r-- | lldb/source/Target/Platform.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp index 97be08490e4..6b98ab89f11 100644 --- a/lldb/source/Target/Platform.cpp +++ b/lldb/source/Target/Platform.cpp @@ -1351,7 +1351,7 @@ Platform::PutFile (const FileSpec& source, if (log) log->Printf("[PutFile] Using block by block transfer....\n"); - uint32_t source_open_options = File::eOpenOptionRead; + uint32_t source_open_options = File::eOpenOptionRead | File::eOpenOptionCloseOnExec; if (source.GetFileType() == FileSpec::eFileTypeSymbolicLink) source_open_options |= File::eOpenoptionDontFollowSymlinks; @@ -1366,7 +1366,8 @@ Platform::PutFile (const FileSpec& source, lldb::user_id_t dest_file = OpenFile (destination, File::eOpenOptionCanCreate | File::eOpenOptionWrite | - File::eOpenOptionTruncate, + File::eOpenOptionTruncate | + File::eOpenOptionCloseOnExec, permissions, error); if (log) |