FreeBSD src
Go to file
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
bin Avoid leaving unnecessary waiting shells in many forms of sh -c COMMAND. 2009-06-13 21:17:45 +00:00
cddl Fix lockstat breakage to arm/powerpc buildworld. 2009-05-27 22:41:28 +00:00
contrib - Remove semicolon that should not have been there. 2009-06-12 16:37:53 +00:00
crypto Merge OpenSSL 0.9.8k into head. 2009-06-14 19:45:16 +00:00
etc Remove the note about using vt220, which makes no sense at all. 2009-06-14 22:35:33 +00:00
games Misc fixed to fortunes 2009-06-05 07:57:10 +00:00
gnu Don't set $PATH - if the caller doesn't have /bin and /usr/bin in their 2009-06-14 06:09:33 +00:00
include Add a new 'void closefrom(int lowfd)' system call. When called, it closes 2009-06-15 20:38:55 +00:00
kerberos5 Add strndup(3) prototype to string.h. 2008-12-08 21:04:24 +00:00
lib Add a new 'void closefrom(int lowfd)' system call. When called, it closes 2009-06-15 20:38:55 +00:00
libexec Increase the size of the static TLS area slightly (required for the NVidia's 2009-05-27 18:54:31 +00:00
release Add cas(4). 2009-06-15 18:25:10 +00:00
rescue Add zfs/zpool to rescue programs 2009-05-23 00:47:23 +00:00
sbin Remove redundant code from runshutdown() now tcsetsid(3) works reliably. 2009-06-15 19:24:47 +00:00
secure Regenerate manual pages for OpenSSL 0.9.8k. 2009-06-14 19:51:05 +00:00
share Long long time ago, several utilities in base used to parse %c output and 2009-06-15 18:49:06 +00:00
sys Add a new 'void closefrom(int lowfd)' system call. When called, it closes 2009-06-15 20:38:55 +00:00
tools Add a new 'void closefrom(int lowfd)' system call. When called, it closes 2009-06-15 20:38:55 +00:00
usr.bin Add volatile to sig_atomic_t where it was missing. 2009-06-14 21:39:52 +00:00
usr.sbin Add cas(4). 2009-06-15 18:27:27 +00:00
COPYRIGHT Bump the odometer of the years. A little early this year for 7.1R. 2008-12-30 04:46:25 +00:00
LOCKS
MAINTAINERS Replace anholt with myself as drm maintainer. 2009-03-20 18:51:13 +00:00
Makefile Add a new world named 'mips' to our universe. 2009-04-01 17:11:50 +00:00
Makefile.inc1 Allow "make update" work with SVN, if you take the time to set up your 2009-06-14 15:16:24 +00:00
ObsoleteFiles.inc Remove clists from the kernel. 2009-06-05 15:31:38 +00:00
README
UPDATING note abi change for IEEE80211_IOC_STA_INFO 2009-06-13 23:44:56 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html