glibc/sysdeps/mach/hurd/bits
Sergey Bugaev f2c996597d hurd: Implement close_range and closefrom
The close_range () function implements the same API as the Linux and
FreeBSD syscalls. It operates atomically and reliably. The specified
upper bound is clamped to the actual size of the file descriptor table;
it is expected that the most common use case is with last = UINT_MAX.

Like in the Linux syscall, it is also possible to pass the
CLOSE_RANGE_CLOEXEC flag to mark the file descriptors in the range
cloexec instead of acually closing them.

Also, add a Hurd version of the closefrom () function. Since unlike on
Linux, close_range () cannot fail due to being unuspported by the
running kernel, a fallback implementation is never necessary.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20211106153524.82700-1-bugaevc@gmail.com>
2021-11-07 16:16:11 +01:00
..
types Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
errno.h hurd: Fix errno* generation 2018-10-31 10:32:39 +01:00
fcntl.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ioctls.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
local_lim.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
param.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
posix_opt.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
signum-arch.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
socket.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stat.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
statfs.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
statvfs.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sysmacros.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
typesizes.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
unistd_ext.h hurd: Implement close_range and closefrom 2021-11-07 16:16:11 +01:00