[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>
This commit is contained in:
Shreeyash Pandey
2025-11-15 00:07:37 +05:30
committed by GitHub
parent 17789e9fa8
commit b9c769bae5

View File

@@ -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) {