kern_fork.c (ac2e4153278a07773d0ca8f9f5f5c1b41a3696b8) kern_fork.c (a5881ea55a2c554fd584cf985d99e92ad1db8737)
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.

--- 612 unchanged lines hidden (view full) ---

621
622 callout_init(&p2->p_itcallout, 0);
623
624#ifdef KTRACE
625 /*
626 * Copy traceflag and tracefile if enabled.
627 */
628 mtx_lock(&ktrace_mtx);
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.

--- 612 unchanged lines hidden (view full) ---

621
622 callout_init(&p2->p_itcallout, 0);
623
624#ifdef KTRACE
625 /*
626 * Copy traceflag and tracefile if enabled.
627 */
628 mtx_lock(&ktrace_mtx);
629 KASSERT(p2->p_tracep == NULL, ("new process has a ktrace vnode"));
629 KASSERT(p2->p_tracevp == NULL, ("new process has a ktrace vnode"));
630 if (p1->p_traceflag & KTRFAC_INHERIT) {
631 p2->p_traceflag = p1->p_traceflag;
630 if (p1->p_traceflag & KTRFAC_INHERIT) {
631 p2->p_traceflag = p1->p_traceflag;
632 if ((p2->p_tracep = p1->p_tracep) != NULL)
633 VREF(p2->p_tracep);
632 if ((p2->p_tracevp = p1->p_tracevp) != NULL) {
633 VREF(p2->p_tracevp);
634 KASSERT(p1->p_tracecred != NULL,
635 ("ktrace vnode with no cred"));
636 p2->p_tracecred = crhold(p1->p_tracecred);
637 }
634 }
635 mtx_unlock(&ktrace_mtx);
636#endif
637
638 /*
639 * If PF_FORK is set, the child process inherits the
640 * procfs ioctl flags from its parent.
641 */

--- 269 unchanged lines hidden ---
638 }
639 mtx_unlock(&ktrace_mtx);
640#endif
641
642 /*
643 * If PF_FORK is set, the child process inherits the
644 * procfs ioctl flags from its parent.
645 */

--- 269 unchanged lines hidden ---