From: Daan De Meyer Date: Fri, 20 Mar 2026 21:11:15 +0000 (+0100) Subject: test-fd-util: Replace dup() with fcntl() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=84d51e252db0390b448930cfab49d47ec989d8ef;p=thirdparty%2Fsystemd.git test-fd-util: Replace dup() with fcntl() Last remaining use of dup() in the codebase, let's get rid of it. --- diff --git a/src/test/test-fd-util.c b/src/test/test-fd-util.c index e99d7d04726..338bbc29d07 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); }