Skip to content

Commit 9a5455d

Browse files
committed
[libc] fix EXPECT_EXIT suspend/timeout for darwin
Fixes: #166059 Signed-off-by: Shreeyash Pandey <[email protected]>
1 parent ab85f49 commit 9a5455d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libc/test/UnitTest/ExecuteFunctionUnix.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <poll.h>
1414
#include <signal.h>
1515
#include <stdio.h>
16+
#include <errno.h>
1617
#include <stdlib.h>
1718
#include <string.h>
1819
#include <sys/wait.h>
@@ -58,7 +59,7 @@ ProcessStatus invoke_in_subprocess(FunctionCaller *func, int timeout_ms) {
5859
::close(pipe_fds[1]);
5960

6061
struct pollfd poll_fd {
61-
pipe_fds[0], 0, 0
62+
pipe_fds[0], POLLIN, 0
6263
};
6364
// No events requested so this call will only return after the timeout or if
6465
// the pipes peer was closed, signaling the process exited.

0 commit comments

Comments
 (0)