summaryrefslogtreecommitdiff
path: root/libc/test/UnitTest/ExecuteFunctionUnix.cpp
diff options
context:
space:
mode:
authorShreeyash Pandey <shreeyash335@gmail.com>2025-11-14 23:57:32 +0530
committerGitHub <noreply@github.com>2025-11-14 13:27:32 -0500
commite7db040b796df5e7bda5226492038a3af34803ef (patch)
tree9a288aefbc7d093e606533ce3c0c71dad714c716 /libc/test/UnitTest/ExecuteFunctionUnix.cpp
parentac6daa8181894e34b8cf8e5c3e065f64035fcd36 (diff)
[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 <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..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) {