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/ibcs2 | |
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/ibcs2')
-rw-r--r-- | sys/i386/ibcs2/imgact_coff.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c index 7cbe5d4..3012603 100644 --- a/sys/i386/ibcs2/imgact_coff.c +++ b/sys/i386/ibcs2/imgact_coff.c @@ -26,7 +26,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_coff.c,v 1.22 1997/03/23 03:34:09 bde Exp $ + * $Id: imgact_coff.c,v 1.23 1997/04/01 08:39:01 bde Exp $ */ #include <sys/param.h> @@ -299,7 +299,7 @@ exec_coff_imgact(imgp) const struct aouthdr *ahdr; const struct scnhdr *scns; int i; - struct vmspace *vmspace = imgp->proc->p_vmspace; + struct vmspace *vmspace; int nscns; int error; unsigned long text_offset = 0, text_address = 0, text_size = 0; @@ -339,6 +339,7 @@ exec_coff_imgact(imgp) } exec_new_vmspace(imgp); + vmspace = imgp->proc->p_vmspace; for (i = 0; i < nscns; i++) { |