freebsd-skq/sys/compat
John Baldwin c4f16b69e1 Add a new 'void closefrom(int lowfd)' system call. When called, it closes
any open file descriptors >= 'lowfd'.  It is largely identical to the same
function on other operating systems such as Solaris, DFly, NetBSD, and
OpenBSD.  One difference from other *BSD is that this closefrom() does not
fail with any errors.  In practice, while the manpages for NetBSD and
OpenBSD claim that they return EINTR, they ignore internal errors from
close() and never return EINTR.  DFly does return EINTR, but for the common
use case (closing fd's prior to execve()), the caller really wants all
fd's closed and returning EINTR just forces callers to call closefrom() in
a loop until it stops failing.

Note that this implementation of closefrom(2) does not make any effort to
resolve userland races with open(2) in other threads.  As such, it is not
multithread safe.

Submitted by:	rwatson (initial version)
Reviewed by:	rwatson
MFC after:	2 weeks
2009-06-15 20:38:55 +00:00
..
freebsd32 Add a new 'void closefrom(int lowfd)' system call. When called, it closes 2009-06-15 20:38:55 +00:00
ia32 Fix KBI breakage by r190520 which affects older linux.ko binaries: 2009-04-05 09:27:19 +00:00
linprocfs Get vnets from creds instead of threads where they're available, and from 2009-06-15 19:01:53 +00:00
linsysfs
linux Get vnets from creds instead of threads where they're available, and from 2009-06-15 19:01:53 +00:00
ndis s/usb2_/usb_|usbd_/ on all function names for the USB stack. 2009-06-15 01:02:43 +00:00
netbsd
svr4 Add counterparts to getcredhostname: 2009-06-13 00:12:02 +00:00