From bd98e0f0ffd0b48f4e0089723edf6fa447161486 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Thu, 14 Oct 2021 14:24:15 -0700 Subject: libbinder: use after fork aborts This is a separate CL, since the warning is independently useful, even if this needs to be reverted. Fixes: 202289725 Test: binderLibTest Change-Id: Ifb046f01cee047d1908a69c075a66ecb0bc68a78 --- libs/binder/ProcessState.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libs/binder/ProcessState.cpp') diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index e2ab515649..4f21cda4a1 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -93,9 +93,7 @@ sp ProcessState::selfOrNull() [[clang::no_destroy]] static std::mutex gProcessMutex; static void verifyNotForked(bool forked) { - if (forked) { - ALOGE("libbinder does not support being forked"); - } + LOG_ALWAYS_FATAL_IF(forked, "libbinder ProcessState can not be used after fork"); } sp ProcessState::init(const char *driver, bool requireDefault) -- cgit v1.2.3-59-g8ed1b