diff options
author | 2021-05-24 23:22:08 +0000 | |
---|---|---|
committer | 2021-05-25 02:42:07 +0000 | |
commit | af4ca715bd1820616e04fcc63ad4e64d64df4024 (patch) | |
tree | c58f18b6142f954877e8486e2430b5cff15363c1 /libs/binder/RpcState.cpp | |
parent | f51742734f476e7f9478f7cb56c18b9215ecad43 (diff) |
binderRpcTest: use waitpid
Actually reap child processes. This gives us stronger guarantees (that
everything can shut down) and it avoids 'kill'.
Bug: 186661301
Test: binderRpcTest
Change-Id: If10f00de845eb8097813b4edbf8e2b8ffdc90c5f
Diffstat (limited to 'libs/binder/RpcState.cpp')
-rw-r--r-- | libs/binder/RpcState.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp index d40fef6f09..1111b822c4 100644 --- a/libs/binder/RpcState.cpp +++ b/libs/binder/RpcState.cpp @@ -239,8 +239,11 @@ bool RpcState::rpcRec(const base::unique_fd& fd, const sp<RpcSession>& session, if (status_t status = session->mShutdownTrigger->interruptableReadFully(fd.get(), data, size); status != OK) { - ALOGE("Failed to read %s (%zu bytes) on fd %d, error: %s", what, size, fd.get(), - statusToString(status).c_str()); + if (status != -ECANCELED) { + ALOGE("Failed to read %s (%zu bytes) on fd %d, error: %s", what, size, fd.get(), + statusToString(status).c_str()); + } + return false; } |