diff options
author | 2022-07-05 16:09:05 +0100 | |
---|---|---|
committer | 2022-07-07 20:33:11 +0000 | |
commit | 99bd8dd2bf8eac1a60bf65e442462753ed7f2147 (patch) | |
tree | db0b4b0ea88841a9f032d3a6abb941372bfad25b /artd/file_utils_test.cc | |
parent | e4feb40fc359d353f2a9c61d9a53e02df30a88d8 (diff) |
Fix ExecUtils.WaitChildWithTimeoutFallback by adding a fallback.
`WaitChildWithTimeout` didn't work with old Linux kernels because it
uses a syscall `pidfd_open`, which was added in Linux 5.4.
This change adds a fallback implementation of `WaitChildWithTimeout`
that creates a thread to wait instead of relying on `pidfd_open`.
Also:
- Use android::base::unique_fd to hold pidfd so that the fd is
guaranteed to be closed.
- Allow timeout_sec to be negative, in which case it blocks until the
subprocess exits.
Bug: 229268202
Test: m test-art-host-gtest-art_runtime_tests
Ignore-AOSP-First: Will cherry-pick later.
Change-Id: Iec3f21db135d9a8a3a915372253f1ff3e285e5cf
Diffstat (limited to 'artd/file_utils_test.cc')
0 files changed, 0 insertions, 0 deletions