summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nick Kralevich <nnk@google.com> 2019-01-14 15:08:58 -0800
committer android-build-merger <android-build-merger@google.com> 2019-01-14 15:08:58 -0800
commit53c4f1837fc783d241bfb9cbafd0b79da6059d3a (patch)
treeb5f93b0f5d5b374e005053bbf75d1c82060a8386
parenta8ead388837af0922889b1ba5e32a8c76e3ecc65 (diff)
parent7c68c0c93e8a80e066d78e66db1ccb980bdf1779 (diff)
Merge "replace dup() with fcntl(F_DUPFD_CLOEXEC)" am: a6fc0b7242
am: 7c68c0c93e Change-Id: Icf3f4f91defa32f6d05691b1b7eccb7a12b8db39
-rw-r--r--core/jni/android_os_Parcel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/android_os_Parcel.cpp b/core/jni/android_os_Parcel.cpp
index 7ef06dc54945..3b59321024fd 100644
--- a/core/jni/android_os_Parcel.cpp
+++ b/core/jni/android_os_Parcel.cpp
@@ -473,7 +473,7 @@ static jobject android_os_Parcel_readFileDescriptor(JNIEnv* env, jclass clazz, j
if (parcel != NULL) {
int fd = parcel->readFileDescriptor();
if (fd < 0) return NULL;
- fd = dup(fd);
+ fd = fcntl(fd, F_DUPFD_CLOEXEC, 0);
if (fd < 0) return NULL;
return jniCreateFileDescriptor(env, fd);
}