summaryrefslogtreecommitdiff
path: root/libs/androidfw/PosixUtils.cpp
AgeCommit message (Collapse)Author
2024-08-12Remove unnecessary std::move Yi Kong
Moving a temporary object prevents copy elision, and could reduce performance. This fixes -Wpessimizing-move compiler warning. Test: presubmit Bug: 154270751 Change-Id: I4c769b174bb2a1fab2928c4887dcb70d82f264fa
2022-09-29Clean up some resources code Yurii Zubrytskyi
More moves and fewer allocations Bug: 237583012 Test: unit tests Change-Id: I5cf43c8af0743c0e4d96808f1e55ceb4f02d7021
2021-08-17Rename ProcResult stdout and stderr fields Colin Cross
stdout and stderr are macros in musl, which causes build failures when they are used as field names. Rename the fields to stdout_str and stderr_str. Test: builds Change-Id: I04770d2d6e82ca8393308ab12a304838a80f0ae5
2021-04-15Fix two problems in the ExecuteBinary function. Peter Collingbourne
- If the process exits abnormally then we will leak the stdout and stderr FDs. Fix it by closing the FDs before returning. - If another child process exits then we will incorrectly return the result from that process instead of waiting for our child. Fix it by using waitpid instead of wait. Change-Id: I8974d5e4bd33f264cd2d364f55a60f1f5cb7eb1a
2019-07-01Set idmap2 binary uid and gid after forking Ryan Mitchell
The file permissions of the idmap2 binary are currently not set correctly when the system forks and execs the idmap binary during zygote. This chnages sets the uid and gid after forking to the same uid and gid of the parent process. Bug: 134897503 Test: device boots and generates idmap Change-Id: Ic7fac49e5982f3c47713603b905c3a6be117a05b
2018-10-04libandroidfw: introduce ExecuteBinary (POSIX only) MÃ¥rten Kongstad
Introduce a wrapper around fork and exec. Test: make libandroidfw_tests Change-Id: Iff0de5319bb6bb101a3fbef6413dfb4e77198f11