From dab296544bece1e88f3d3ce78ff6aa50e58b5e71 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Mon, 27 Jan 2025 17:44:30 -0800 Subject: Revert "libbinder: stopProcess: directly stop process" This reverts commit 21eb774dcb7df4a63e9080b4e5f9cd7a4b55a08e. Reason for revert: b/390572524 Change-Id: I9efba529674e99f0058274aef0010295b5e9dc04 --- libs/binder/IPCThreadState.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libs/binder/IPCThreadState.cpp') diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp index f191b97e5f..cdc53ff3e7 100644 --- a/libs/binder/IPCThreadState.cpp +++ b/libs/binder/IPCThreadState.cpp @@ -853,8 +853,12 @@ status_t IPCThreadState::handlePolledCommands() void IPCThreadState::stopProcess(bool /*immediate*/) { - ALOGI("IPCThreadState::stopProcess() (deprecated) called. Exiting process."); - exit(0); + //ALOGI("**** STOPPING PROCESS"); + (void)flushCommands(); + int fd = mProcess->mDriverFD; + mProcess->mDriverFD = -1; + close(fd); + //kill(getpid(), SIGKILL); } status_t IPCThreadState::transact(int32_t handle, -- cgit v1.2.3-59-g8ed1b