freebsd-skq/include
kevans 6371039d47 Implement a close_range(2) syscall
close_range(min, max, flags) allows for a range of descriptors to be
closed. The Python folk have indicated that they would much prefer this
interface to closefrom(2), as the case may be that they/someone have special
fds dup'd to higher in the range and they can't necessarily closefrom(min)
because they don't want to hit the upper range, but relocating them to lower
isn't necessarily feasible.

sys_closefrom has been rewritten to use kern_close_range() using ~0U to
indicate closing to the end of the range. This was chosen rather than
requiring callers of kern_close_range() to hold FILEDESC_SLOCK across the
call to kern_close_range for simplicity.

The flags argument of close_range(2) is currently unused, so any flags set
is currently EINVAL. It was added to the interface in Linux so that future
flags could be added for, e.g., "halt on first error" and things of this
nature.

This patch is based on a syscall of the same design that is expected to be
merged into Linux.

Reviewed by:	kib, markj, vangyzen (all slightly earlier revisions)
Differential Revision:	https://reviews.freebsd.org/D21627
2020-04-12 21:23:19 +00:00
..
arpa
gssapi
protocols Clean up global variable declarations in the dump and restore 2020-04-04 00:56:56 +00:00
rpc
rpcsvc Increase YPMAXRECORD to 16M to be compatible with Linux. 2019-08-12 20:27:33 +00:00
xlocale
_ctype.h
a.out.h
ar.h
assert.h
bitstring.h
complex.h
cpio.h
ctype.h
db.h
dirent.h
dlfcn.h Revert r343093 until I can address the issues raised by kib@. 2019-01-17 16:50:50 +00:00
elf-hints.h
elf.h
err.h
fmtmsg.h
fnmatch.h
fstab.h
fts.h
ftw.h
getopt.h
glob.h
grp.h
gssapi.h
hesiod.h
iconv.h
ieeefp.h
ifaddrs.h
inttypes.h
iso646.h
kenv.h
langinfo.h
libgen.h
limits.h Reduce NL_ARGMAX to 4096 to match Linux. 2018-10-04 21:55:58 +00:00
link.h
locale.h
Makefile Introduce nexthop objects and new routing KPI. 2020-04-12 14:30:00 +00:00
Makefile.depend
malloc_np.h
malloc.h
memory.h
mk-osreldate.sh Move to using newvers -c instead of VARS_ONLY=1 2019-05-23 17:19:05 +00:00
monetary.h
mpool.h
mqueue.h
ndbm.h
netconfig.h
netdb.h Fix mismatch from r342379. 2018-12-23 20:51:13 +00:00
nl_types.h
nlist.h
nss.h
nsswitch.h
paths.h
printf.h
proc_service.h
pthread_np.h Add pthread_peekjoin_np(3). 2020-02-15 23:25:39 +00:00
pthread.h POSIX compliance improvements in the pthread(3) functions. 2018-08-18 01:05:38 +00:00
pwd.h
ranlib.h
readpassphrase.h
regex.h
res_update.h
resolv.h
runetype.h
search.h
semaphore.h
setjmp.h
signal.h Add sigsetop extensions commonly found in musl libc and glibc 2019-12-12 01:41:55 +00:00
spawn.h
stab.h
stdalign.h
stdbool.h
stddef.h
stdio.h libc: provide fputc_unlocked 2020-02-02 19:45:12 +00:00
stdlib.h rand(3): Replace implementation with one backed by random(3) algorithm 2020-02-01 20:33:23 +00:00
stdnoreturn.h
string.h
stringlist.h
strings.h
sysexits.h
tar.h
termios.h
tgmath.h
time.h Correctly check for C++17 and higher when declaring timespec_get() 2019-12-09 19:17:56 +00:00
timeconv.h
timers.h
ttyent.h
uchar.h
ulimit.h
unistd.h Implement a close_range(2) syscall 2020-04-12 21:23:19 +00:00
unwind.h
utime.h
utmpx.h
uuid.h
varargs.h
wchar.h
wctype.h
wordexp.h
xlocale.h