diff options
author | 2022-07-05 16:09:05 +0100 | |
---|---|---|
committer | 2022-07-11 12:23:56 +0000 | |
commit | 42adb66b843a6fdb23979f53ee9eaf28723be518 (patch) | |
tree | 6331002e218015f4d83c68aa2e4ea6bb23d8b5f2 /compiler/optimizing/code_generator.cc | |
parent | a9f772730fb493c5c3fa412fc0b91f2e9b8dbe17 (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
Change-Id: Iec3f21db135d9a8a3a915372253f1ff3e285e5cf
Merged-In: Iec3f21db135d9a8a3a915372253f1ff3e285e5cf
(cherry picked from commit 99bd8dd2bf8eac1a60bf65e442462753ed7f2147)
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
0 files changed, 0 insertions, 0 deletions