From e7db040b796df5e7bda5226492038a3af34803ef Mon Sep 17 00:00:00 2001 From: Shreeyash Pandey Date: Fri, 14 Nov 2025 23:57:32 +0530 Subject: [libc][test] split exit tests into two separate tests (#166355) _Exit(3) is a fairly simple syscall wrapper whereas exit(3) calls atexit-registered functions + whole lot of stuff that require support for sync primitives. Splitting the tests allows testing the former easily (especially for new port projects) --------- Signed-off-by: Shreeyash Pandey --- libc/test/UnitTest/ExecuteFunctionUnix.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libc/test/UnitTest/ExecuteFunctionUnix.cpp') diff --git a/libc/test/UnitTest/ExecuteFunctionUnix.cpp b/libc/test/UnitTest/ExecuteFunctionUnix.cpp index c0e85c214400..ab18f7a2ebf5 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 - }; + 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) { -- cgit v1.2.3