aboutsummaryrefslogtreecommitdiff
path: root/libc/bionic/fork.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/bionic/fork.cpp')
-rw-r--r--libc/bionic/fork.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libc/bionic/fork.cpp b/libc/bionic/fork.cpp
index 3814ed0ac..d432c6db7 100644
--- a/libc/bionic/fork.cpp
+++ b/libc/bionic/fork.cpp
@@ -31,9 +31,10 @@
#include <android/fdsan.h>
#include "private/bionic_defs.h"
+#include "private/bionic_fdtrack.h"
#include "pthread_internal.h"
-__BIONIC_WEAK_FOR_NATIVE_BRIDGE
+__BIONIC_WEAK_FOR_NATIVE_BRIDGE_INLINE
int __clone_for_fork() {
pthread_internal_t* self = __get_thread();
@@ -55,9 +56,10 @@ int fork() {
int result = __clone_for_fork();
if (result == 0) {
- // Disable fdsan post-fork, so we don't falsely trigger on processes that
- // fork, close all of their fds blindly, and then exec.
+ // Disable fdsan and fdtrack post-fork, so we don't falsely trigger on processes that
+ // fork, close all of their fds, and then exec.
android_fdsan_set_error_level(ANDROID_FDSAN_ERROR_LEVEL_DISABLED);
+ android_fdtrack_set_globally_enabled(false);
// Reset the stack_and_tls VMA name so it doesn't end with a tid from the
// parent process.