Skip to content

Commit b9c769b

Browse files
authored
[libc] fix EXPECT_EXIT suspend/timeout for darwin (#166065)
Fixes: llvm/llvm-project#166059 --------- Signed-off-by: Shreeyash Pandey <[email protected]>
1 parent 17789e9 commit b9c769b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

libc/test/UnitTest/ExecuteFunctionUnix.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ ProcessStatus invoke_in_subprocess(FunctionCaller *func, int timeout_ms) {
5757
}
5858
::close(pipe_fds[1]);
5959

60-
struct pollfd poll_fd {
61-
pipe_fds[0], 0, 0
62-
};
60+
struct pollfd poll_fd{pipe_fds[0], POLLIN, 0};
6361
// No events requested so this call will only return after the timeout or if
6462
// the pipes peer was closed, signaling the process exited.
6563
if (::poll(&poll_fd, 1, timeout_ms) == -1) {

0 commit comments

Comments
 (0)