Merge "sharedmem.cpp: replace dup() with fcntl(F_DUPFD_CLOEXEC)"
This commit is contained in:
@@ -71,7 +71,7 @@ int ASharedMemory_dupFromJava(JNIEnv* env, jobject javaSharedMemory) {
|
|||||||
}
|
}
|
||||||
int fd = env->CallIntMethod(javaSharedMemory, sSharedMemory.getFd);
|
int fd = env->CallIntMethod(javaSharedMemory, sSharedMemory.getFd);
|
||||||
if (fd != -1) {
|
if (fd != -1) {
|
||||||
fd = dup(fd);
|
fd = fcntl(fd, F_DUPFD_CLOEXEC, 0);
|
||||||
}
|
}
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user