Merge "sharedmem.cpp: replace dup() with fcntl(F_DUPFD_CLOEXEC)"

am: 98546b23b9

Change-Id: I39830b8b61e82fa395f39f45398176fc45c7febb
This commit is contained in:
Nick Kralevich
2019-01-14 19:48:14 -08:00
committed by android-build-merger

View File

@@ -71,7 +71,7 @@ int ASharedMemory_dupFromJava(JNIEnv* env, jobject javaSharedMemory) {
}
int fd = env->CallIntMethod(javaSharedMemory, sSharedMemory.getFd);
if (fd != -1) {
fd = dup(fd);
fd = fcntl(fd, F_DUPFD_CLOEXEC, 0);
}
return fd;
}