Date: Mon, 15 Jun 2009 19:23:05 -0400 From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r194262 - in head: include lib/libc/sys sys/compat/freebsd32 sys/kern tools/regression/file/closefrom Message-ID: <4A36D7D9.8050100@FreeBSD.org> In-Reply-To: <200906152038.n5FKctaR001026@svn.freebsd.org> References: <200906152038.n5FKctaR001026@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote: > Author: jhb > Date: Mon Jun 15 20:38:55 2009 > New Revision: 194262 > URL: http://svn.freebsd.org/changeset/base/194262 > > Log: > 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 Sorry about the userland build breakage. It looks like Kerberos is fixed already. I expect OpenSSH to also be broken due to its local version of closefrom(). I am kicking off a full world build now to fix any remaining issues (unless someone else beats me to it first). -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A36D7D9.8050100>