[Lldb-commits] [PATCH] Use CloseOnExec in Platform::PutFile

Pavel Labath labath at google.com
Tue Feb 17 08:09:56 PST 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7694

Files:
  lldb/trunk/source/Target/Platform.cpp

Index: lldb/trunk/source/Target/Platform.cpp
===================================================================
--- lldb/trunk/source/Target/Platform.cpp
+++ lldb/trunk/source/Target/Platform.cpp
@@ -1351,7 +1351,7 @@
     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 @@
     lldb::user_id_t dest_file = OpenFile (destination,
                                           File::eOpenOptionCanCreate |
                                           File::eOpenOptionWrite |
-                                          File::eOpenOptionTruncate,
+                                          File::eOpenOptionTruncate |
+                                          File::eOpenOptionCloseOnExec,
                                           permissions,
                                           error);
     if (log)

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7694.20088.patch
Type: text/x-patch
Size: 1145 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150217/94e5b1ef/attachment.bin>


More information about the lldb-commits mailing list