diff options
author | dyson <dyson@FreeBSD.org> | 1997-04-13 01:48:35 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1997-04-13 01:48:35 +0000 |
commit | 61955ab83033e59cfabb8590ba5ccbf0669d9a47 (patch) | |
tree | 8d2081b02ed11701596e498b2013cf9f5a5625dd /sys/kern/kern_exec.c | |
parent | 438bdd8a9c9d390f13a4b05980c19b18e974d16c (diff) | |
download | FreeBSD-src-61955ab83033e59cfabb8590ba5ccbf0669d9a47.zip FreeBSD-src-61955ab83033e59cfabb8590ba5ccbf0669d9a47.tar.gz |
Fully implement vfork. Vfork is now much much faster than even our
fork. (On my machine, fork is about 240usecs, vfork is 78usecs.)
Implement rfork(!RFPROC !RFMEM), which allows a thread to divorce its memory
from the other threads of a group.
Implement rfork(!RFPROC RFCFDG), which closes all file descriptors, eliminating
possible existing shares with other threads/processes.
Implement rfork(!RFPROC RFFDG), which divorces the file descriptors for a
thread from the rest of the group.
Fix the case where a thread does an exec. It is almost nonsense for a thread
to modify the other threads address space by an exec, so we
now automatically divorce the address space before modifying it.
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 8c88134..9c6f111 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_exec.c,v 1.58 1997/04/11 23:37:23 dyson Exp $ + * $Id: kern_exec.c,v 1.59 1997/04/12 04:07:50 dyson Exp $ */ #include <sys/param.h> @@ -58,6 +58,8 @@ #include <vm/vm_kern.h> #include <vm/vm_extern.h> +#include <sys/user.h> + #include <machine/reg.h> static int *exec_copyout_strings __P((struct image_params *)); |