summaryrefslogtreecommitdiff
path: root/runtime/native/dalvik_system_VMDebug.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/native/dalvik_system_VMDebug.cc')
-rw-r--r--runtime/native/dalvik_system_VMDebug.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/native/dalvik_system_VMDebug.cc b/runtime/native/dalvik_system_VMDebug.cc
index 6f98a6d381..96f15ded2a 100644
--- a/runtime/native/dalvik_system_VMDebug.cc
+++ b/runtime/native/dalvik_system_VMDebug.cc
@@ -23,6 +23,7 @@
#include "nativehelper/jni_macros.h"
+#include "base/file_utils.h"
#include "base/histogram-inl.h"
#include "base/time_utils.h"
#include "class_linker.h"
@@ -113,7 +114,7 @@ static void VMDebug_startMethodTracingFd(JNIEnv* env,
return;
}
- int fd = dup(originalFd);
+ int fd = DupCloexec(originalFd);
if (fd < 0) {
ScopedObjectAccess soa(env);
soa.Self()->ThrowNewExceptionF("Ljava/lang/RuntimeException;",