Home
last modified time | relevance | path

Searched refs:lowfd (Results 1 – 10 of 10) sorted by relevance

/glibc-2.36/io/
Dtst-close_range.c44 int lowfd = support_open_dev_null_range (NFDS, O_RDONLY, 0600); in close_range_test_max_upper_limit() local
47 int r = close_range (lowfd, ~0U, 0); in close_range_test_max_upper_limit()
58 close_range_test_common (int lowfd, unsigned int flags) in close_range_test_common() argument
60 const int maximum_fd = lowfd + NFDS - 1; in close_range_test_common()
61 const int half_fd = lowfd + NFDS / 2; in close_range_test_common()
65 TEST_COMPARE (close_range (lowfd, half_fd, flags), 0); in close_range_test_common()
66 for (int i = lowfd; i <= half_fd; i++) in close_range_test_common()
75 xclose (lowfd + 57); in close_range_test_common()
76 xclose (lowfd + 78); in close_range_test_common()
77 xclose (lowfd + 81); in close_range_test_common()
[all …]
Dtst-closefrom.c38 int lowfd = support_open_dev_null_range (NFDS, O_RDONLY, 0600); in closefrom_test() local
40 const int maximum_fd = lowfd + NFDS - 1; in closefrom_test()
41 const int half_fd = lowfd + NFDS / 2; in closefrom_test()
42 const int gap = lowfd + NFDS / 4; in closefrom_test()
52 for (int i = lowfd; i < half_fd; i++) in closefrom_test()
56 xclose (lowfd + 35); in closefrom_test()
57 xclose (lowfd + 38); in closefrom_test()
58 xclose (lowfd + 42); in closefrom_test()
59 xclose (lowfd + 46); in closefrom_test()
68 for (int i = lowfd; i < gap; i++) in closefrom_test()
[all …]
Dclosefrom.c25 __closefrom (int lowfd) in __closefrom() argument
27 int l = MAX (0, lowfd); in __closefrom()
/glibc-2.36/posix/
Dtst-spawn5.c66 int lowfd = parse_fd (argv[0]); in handle_restart() local
105 if (fd < lowfd || fd == dirfd (dirp)) in handle_restart()
132 spawn_closefrom_test (posix_spawn_file_actions_t *fa, int lowfd, int highfd, in spawn_closefrom_test() argument
153 args[argc++] = xasprintf ("%d", lowfd); in spawn_closefrom_test()
155 for (int i = lowfd; i < highfd; i++) in spawn_closefrom_test()
177 int lowfd = support_open_dev_null_range (NFDS, O_RDONLY, 0600); in do_test_closefrom() local
178 const int half_fd = lowfd + NFDS / 2; in do_test_closefrom()
191 spawn_closefrom_test (&fa, lowfd, half_fd, NULL, 0); in do_test_closefrom()
197 xclose (lowfd + 57); in do_test_closefrom()
198 xclose (lowfd + 78); in do_test_closefrom()
[all …]
/glibc-2.36/support/
Dsupport-open-dev-null-range.c57 int lowfd; member
77 range_add (struct range_list *r, int lowfd, size_t len) in range_add() argument
84 r->ranges[r->used].lowfd = lowfd; in range_add()
94 int minfd = r->ranges[i].lowfd; in range_close()
95 int maxfd = r->ranges[i].lowfd + r->ranges[i].len; in range_close()
110 int lowfd = open_dev_null (flags, mode); in support_open_dev_null_range() local
111 int prevfd = lowfd; in support_open_dev_null_range()
118 if (fd != lowfd + i) in support_open_dev_null_range()
120 range_add (&rl, lowfd, prevfd - lowfd + 1); in support_open_dev_null_range()
122 prevfd = lowfd = fd; in support_open_dev_null_range()
[all …]
Dtst-support-open-dev-null-range.c96 int lowfd = support_open_dev_null_range (nfds1, O_RDONLY, 0600); in do_test() local
99 TEST_VERIFY (fcntl (lowfd + i, F_GETFL) > -1); in do_test()
100 check_path (lowfd + i); in do_test()
104 xclose (lowfd + 1); in do_test()
105 xclose (lowfd + 5); in do_test()
106 xclose (lowfd + 6); in do_test()
/glibc-2.36/sysdeps/unix/sysv/linux/
Dspawni.c266 int lowfd = action->action.closefrom_action.from; in __spawni_child() local
267 int r = INLINE_SYSCALL_CALL (close_range, lowfd, ~0U, 0); in __spawni_child()
268 if (r != 0 && !__closefrom_fallback (lowfd, false)) in __spawni_child()
/glibc-2.36/include/bits/
Dunistd_ext.h4 extern int __close_range (unsigned int lowfd, unsigned int highfd, int flags);
/glibc-2.36/sysdeps/mach/hurd/
Dspawni.c509 error_t do_closefrom (int lowfd) in __spawni()
511 while ((unsigned int) lowfd < dtablesize) in __spawni()
513 error_t err = do_close (lowfd); in __spawni()
516 lowfd++; in __spawni()
/glibc-2.36/manual/
Dllio.texi287 @deftypefun int close_range (unsigned int @var{lowfd}, unsigned int @var{maxfd}, int @var{flags})
293 The function @code{close_range} closes the file descriptor from @var{lowfd}
318 The @var{lowfd} value is larger than @var{maxfd} or an unsupported @var{flags}
337 @deftypefun void closefrom (int @var{lowfd})
342 to @var{lowfd}. This function is similar to calling
343 @code{close} for all open file descriptors not less than @var{lowfd}.