summaryrefslogtreecommitdiff
path: root/libs/binder/UtilsHost.cpp
AgeCommit message (Collapse)Author
2023-11-17Binder unique_fd Tomasz Wasilczyk
Test: mma Bug: 302723053 Change-Id: I52f14cadb027b3f854946d5315dce3d23aa21b19
2023-11-03Don't depend on libbase result.h Tomasz Wasilczyk
Test: mma Bug: 302723053 Change-Id: Iea797d6af825d58543ba899f6e712b27e48d859a
2021-09-14Fix frameworks/native compiling against musl Colin Cross
stdout is a macro in musl, don't use it as an identifier. Bug: 190084016 Test: m USE_HOST_MUSL=true Change-Id: I470f329573cdee607abedf0f1a6448cad2b5151e
2021-07-19binder: don't dereference NULL George Burgess IV
Simply forming a reference to NULL results in undefined behavior regardless of how the reference is used. Since `outPollFd` and `errPollFd` are potentially NULL, we should pass them as pointers here. Caught by clang's static analyzer: > frameworks/native/libs/binder/UtilsHost.cpp:145:14: warning: Forming reference to null pointer [clang-analyzer-core.NonNullParamChecker] > frameworks/native/libs/binder/UtilsHost.cpp:147:14: warning: Forming reference to null pointer [clang-analyzer-core.NonNullParamChecker] Bug: None Test: TreeHugger Change-Id: Idf8c8291bde0ce0624085afd143096c357246673
2021-06-17binder: Add execute() to host utils. Yifan Hong
Add utility for executing commands. This function assumes that, when a given predicate |end| finishes, the child process does not emit any other messages. If this is not the case, caller to execute() must handle these I/O in the pipes in the returned CommandResult object. Otherwise the child program may hang on I/O. Test: binderUtilsTest Bug: 190233850 Change-Id: Ib8be5db140af04a286ccbb2283cb032390aff5ac