diff options
Diffstat (limited to 'posix/tst-spawn5.c')
-rw-r--r-- | posix/tst-spawn5.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/posix/tst-spawn5.c b/posix/tst-spawn5.c index ac66738004..a95199af6b 100644 --- a/posix/tst-spawn5.c +++ b/posix/tst-spawn5.c @@ -48,17 +48,6 @@ static int initial_argv_count; #define NFDS 100 static int -open_multiple_temp_files (void) -{ - /* Check if the temporary file descriptor has no no gaps. */ - int lowfd = xopen ("/dev/null", O_RDONLY, 0600); - for (int i = 1; i <= NFDS; i++) - TEST_COMPARE (xopen ("/dev/null", O_RDONLY, 0600), - lowfd + i); - return lowfd; -} - -static int parse_fd (const char *str) { char *endptr; @@ -185,7 +174,7 @@ spawn_closefrom_test (posix_spawn_file_actions_t *fa, int lowfd, int highfd, static void do_test_closefrom (void) { - int lowfd = open_multiple_temp_files (); + int lowfd = support_open_dev_null_range (NFDS, O_RDONLY, 0600); const int half_fd = lowfd + NFDS / 2; /* Close half of the descriptors and check result. */ |