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/i386/linux/imgact_linux.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/i386/linux/imgact_linux.c')
-rw-r--r-- | sys/i386/linux/imgact_linux.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/i386/linux/imgact_linux.c b/sys/i386/linux/imgact_linux.c index 2351c84..4aae9f5 100644 --- a/sys/i386/linux/imgact_linux.c +++ b/sys/i386/linux/imgact_linux.c @@ -28,7 +28,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: imgact_linux.c,v 1.20 1997/02/22 09:38:18 peter Exp $ + * $Id: imgact_linux.c,v 1.21 1997/04/01 08:39:05 bde Exp $ */ #ifndef LKM @@ -65,7 +65,7 @@ exec_linux_imgact(imgp) struct image_params *imgp; { const struct exec *a_out = (const struct exec *) imgp->image_header; - struct vmspace *vmspace = imgp->proc->p_vmspace; + struct vmspace *vmspace; vm_offset_t vmaddr; unsigned long virtual_offset, file_offset; vm_offset_t buffer; @@ -122,6 +122,7 @@ exec_linux_imgact(imgp) * Destroy old process VM and create a new one (with a new stack) */ exec_new_vmspace(imgp); + vmspace = imgp->proc->p_vmspace; /* * Check if file_offset page aligned,. |