Merge "Use _Fork()." into main am: 0fee60a79a
am: 28c35296cc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2983920 Change-Id: I2bcf6e2ae9d62014729ab7ef03a482459c8377b4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
01c06bbb86
1 changed files with 1 additions and 5 deletions
|
@ -275,10 +275,6 @@ static void raise_caps() {
|
|||
}
|
||||
}
|
||||
|
||||
static pid_t __fork() {
|
||||
return clone(nullptr, nullptr, 0, nullptr);
|
||||
}
|
||||
|
||||
// Double-clone, with CLONE_FILES to share the file descriptor table for kcmp validation.
|
||||
// Returns 0 in the orphaned child, the pid of the orphan in the original process, or -1 on failure.
|
||||
static void create_vm_process() {
|
||||
|
@ -426,7 +422,7 @@ static int debuggerd_dispatch_pseudothread(void* arg) {
|
|||
}
|
||||
|
||||
// Don't use fork(2) to avoid calling pthread_atfork handlers.
|
||||
pid_t crash_dump_pid = __fork();
|
||||
pid_t crash_dump_pid = _Fork();
|
||||
if (crash_dump_pid == -1) {
|
||||
async_safe_format_log(ANDROID_LOG_FATAL, "libc",
|
||||
"failed to fork in debuggerd signal handler: %s", strerror(errno));
|
||||
|
|
Loading…
Reference in a new issue