kern_fork.c (27067774dce3388702a4cf744d7096c6fb71b688) | kern_fork.c (e5574e096619bfaceff8d1a394c76c598a8885c4) |
---|---|
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. --- 1060 unchanged lines hidden (view full) --- 1069 sx_xlock(&proctree_lock); 1070 PROC_LOCK(p); 1071 if (p->p_pptr->p_ptevents & PTRACE_FORK) { 1072 /* 1073 * If debugger still wants auto-attach for the 1074 * parent's children, do it now. 1075 */ 1076 dbg = p->p_pptr->p_pptr; | 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. --- 1060 unchanged lines hidden (view full) --- 1069 sx_xlock(&proctree_lock); 1070 PROC_LOCK(p); 1071 if (p->p_pptr->p_ptevents & PTRACE_FORK) { 1072 /* 1073 * If debugger still wants auto-attach for the 1074 * parent's children, do it now. 1075 */ 1076 dbg = p->p_pptr->p_pptr; |
1077 proc_set_traced(p); | 1077 proc_set_traced(p, true); |
1078 CTR2(KTR_PTRACE, 1079 "fork_return: attaching to new child pid %d: oppid %d", 1080 p->p_pid, p->p_oppid); 1081 proc_reparent(p, dbg); 1082 sx_xunlock(&proctree_lock); 1083 td->td_dbgflags |= TDB_CHILD | TDB_SCX | TDB_FSTP; 1084 ptracestop(td, SIGSTOP); 1085 td->td_dbgflags &= ~(TDB_CHILD | TDB_SCX); --- 31 unchanged lines hidden --- | 1078 CTR2(KTR_PTRACE, 1079 "fork_return: attaching to new child pid %d: oppid %d", 1080 p->p_pid, p->p_oppid); 1081 proc_reparent(p, dbg); 1082 sx_xunlock(&proctree_lock); 1083 td->td_dbgflags |= TDB_CHILD | TDB_SCX | TDB_FSTP; 1084 ptracestop(td, SIGSTOP); 1085 td->td_dbgflags &= ~(TDB_CHILD | TDB_SCX); --- 31 unchanged lines hidden --- |