1/*- 2 * Copyright (c) 1982, 1986, 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/kern_fork.c 191816 2009-05-05 10:56:12Z zec $"); |
39 40#include "opt_kdtrace.h" 41#include "opt_ktrace.h" 42#include "opt_mac.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/sysproto.h> --- 16 unchanged lines hidden (view full) --- 63#include <sys/vnode.h> 64#include <sys/acct.h> 65#include <sys/ktr.h> 66#include <sys/ktrace.h> 67#include <sys/unistd.h> 68#include <sys/sdt.h> 69#include <sys/sx.h> 70#include <sys/signalvar.h> |
71#include <sys/vimage.h> |
72 73#include <security/audit/audit.h> 74#include <security/mac/mac_framework.h> 75 76#include <vm/vm.h> 77#include <vm/pmap.h> 78#include <vm/vm_map.h> 79#include <vm/vm_extern.h> --- 439 unchanged lines hidden (view full) --- 519 bcopy(&td->td_startcopy, &td2->td_startcopy, 520 __rangeof(struct thread, td_startcopy, td_endcopy)); 521 522 bcopy(&p2->p_comm, &td2->td_name, sizeof(td2->td_name)); 523 td2->td_sigstk = td->td_sigstk; 524 td2->td_sigmask = td->td_sigmask; 525 td2->td_flags = TDF_INMEM; 526 |
527#ifdef VIMAGE 528 td2->td_vnet = NULL; 529 td2->td_vnet_lpush = NULL; 530#endif 531 |
532 /* 533 * Duplicate sub-structures as needed. 534 * Increase reference counts on shared objects. 535 */ 536 p2->p_flag = P_INMEM; 537 p2->p_swtick = ticks; 538 if (p1->p_flag & P_PROFIL) 539 startprofclock(p2); --- 322 unchanged lines hidden --- |