[Lldb-commits] [lldb] r229506 - Use CloseOnExec in Platform::PutFile
Pavel Labath
labath at google.com
Tue Feb 17 08:07:52 PST 2015
Author: labath
Date: Tue Feb 17 10:07:52 2015
New Revision: 229506
URL: http://llvm.org/viewvc/llvm-project?rev=229506&view=rev
Log:
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
Modified:
lldb/trunk/source/Target/Platform.cpp
Modified: lldb/trunk/source/Target/Platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=229506&r1=229505&r2=229506&view=diff
==============================================================================
--- lldb/trunk/source/Target/Platform.cpp (original)
+++ lldb/trunk/source/Target/Platform.cpp Tue Feb 17 10:07:52 2015
@@ -1351,7 +1351,7 @@ Platform::PutFile (const FileSpec& sourc
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& sourc
lldb::user_id_t dest_file = OpenFile (destination,
File::eOpenOptionCanCreate |
File::eOpenOptionWrite |
- File::eOpenOptionTruncate,
+ File::eOpenOptionTruncate |
+ File::eOpenOptionCloseOnExec,
permissions,
error);
if (log)
More information about the lldb-commits
mailing list