From 84d51e252db0390b448930cfab49d47ec989d8ef Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 20 Mar 2026 22:11:15 +0100 Subject: [PATCH] test-fd-util: Replace dup() with fcntl() Last remaining use of dup() in the codebase, let's get rid of it. --- src/test/test-fd-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test-fd-util.c b/src/test/test-fd-util.c index e99d7d0472..338bbc29d0 100644 --- a/src/test/test-fd-util.c +++ b/src/test/test-fd-util.c @@ -151,7 +151,7 @@ TEST(fd_move_above_stdio) { new_fd = fd_move_above_stdio(new_fd); assert_se(new_fd >= 3); - assert_se(dup(original_stdin) == 0); + assert_se(fcntl(original_stdin, F_DUPFD, 0) == 0); assert_se(close_nointr(original_stdin) != EBADF); assert_se(close_nointr(new_fd) != EBADF); }