summaryrefslogtreecommitdiff
path: root/libc/test/UnitTest/ExecuteFunctionUnix.cpp
diff options
context:
space:
mode:
authorShreeyash Pandey <shreeyash335@gmail.com>2025-11-15 00:07:37 +0530
committerGitHub <noreply@github.com>2025-11-14 13:37:37 -0500
commitb9c769bae5af7e8087835c3a0587daf725a17a39 (patch)
tree48b500aabd0eea2a31afcbdca80b1a8238d6c4b1 /libc/test/UnitTest/ExecuteFunctionUnix.cpp
parent17789e9fa8e1417dacd4cf4fe1ef732a78530730 (diff)
[libc] fix EXPECT_EXIT suspend/timeout for darwin (#166065)
Fixes: https://github.com/llvm/llvm-project/issues/166059 --------- Signed-off-by: Shreeyash Pandey <shreeyash335@gmail.com>
Diffstat (limited to 'libc/test/UnitTest/ExecuteFunctionUnix.cpp')
-rw-r--r--libc/test/UnitTest/ExecuteFunctionUnix.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/libc/test/UnitTest/ExecuteFunctionUnix.cpp b/libc/test/UnitTest/ExecuteFunctionUnix.cpp
index c0e85c214400..7c2eb7c6e887 100644
--- a/libc/test/UnitTest/ExecuteFunctionUnix.cpp
+++ b/libc/test/UnitTest/ExecuteFunctionUnix.cpp
@@ -57,9 +57,7 @@ ProcessStatus invoke_in_subprocess(FunctionCaller *func, int timeout_ms) {
}
::close(pipe_fds[1]);
- struct pollfd poll_fd {
- pipe_fds[0], 0, 0
- };
+ struct pollfd poll_fd{pipe_fds[0], POLLIN, 0};
// No events requested so this call will only return after the timeout or if
// the pipes peer was closed, signaling the process exited.
if (::poll(&poll_fd, 1, timeout_ms) == -1) {