Lines Matching refs:parent

156 static int reap_child_locked(proc_t parent, proc_t child, int deadparent, int reparentedtoinit, int locked, int droplock);
242 * to zombie, and unlink proc from allproc and parent's lists. Save exit
420 * If parent is waiting for us to exit or exec,
421 * P_LPPWAIT is set; we will wakeup the parent below.
659 panic("parent child linkage broken");
805 * Notify parent that we're gone.
812 * If the parent is ignoring SIGCHLD, then POSIX requires
813 * us to not add the resource usage to the parent process -
820 * Add child resource usage to parent before giving
851 * no one except parent (reaping ) can look at this.
852 * The write is to an int and is coherent. Also parent is
866 /* and now wakeup the parent */
871 /* should be fine as parent proc would be initproc */
874 * no one except parent (reaping ) can look at this.
875 * The write is to an int and is coherent. Also parent is
923 * parent, else recover all resources remaining associated
926 * Parameters: proc_t parent Parent of process being reaped
934 reap_child_locked(proc_t parent, proc_t child, int deadparent, int reparentedtoinit, int locked, int droplock)
936 proc_t trace_parent = PROC_NULL; /* Traced parent process, if tracing */
943 * we need to give it back to the old parent.
979 /* resend knote to original parent (and others) after reparenting */
995 * If we can't reparent (e.g. the original parent exited while child was being debugged, or
996 * original parent is the same as the debugger currently exiting), we still need to satisfy
1012 proc_lock(parent);
1015 * If the parent is ignoring SIGCHLD, then POSIX requires
1016 * us to not add the resource usage to the parent process -
1021 if (!(parent->p_flag & P_NOCLDWAIT))
1023 ruadd(&parent->p_stats->p_cru, child->p_ru);
1024 proc_unlock(parent);
1064 parent->p_childrencnt--;
1066 /* If there are no more children wakeup parent */
1067 if ((deadparent != 0) && (LIST_EMPTY(&parent->p_children)))
1068 wakeup((caddr_t)parent); /* with list lock held */
1556 * make process 'parent' the new parent of process 'child'.
1559 proc_reparentlocked(proc_t child, proc_t parent, int cansignal, int locked)
1563 if (child->p_pptr == parent)
1572 panic("proc_reparent: process %p does not have a parent\n", child);
1585 LIST_INSERT_HEAD(&parent->p_children, child, p_sibling);
1586 parent->p_childrencnt++;
1587 child->p_pptr = parent;
1588 child->p_ppid = parent->p_pid;
1592 if ((cansignal != 0) && (initproc == parent) && (child->p_stat == SZOMB))
1600 * to zombie, and unlink proc from allproc and parent's lists. Save exit
1631 * This happens when a parent exits/killed and vfork is in progress
1642 * parent of a vfork child has already called exit() and the
1797 panic("parent child linkage broken");
1941 * Notify parent that we're gone.
1960 * no one except parent (reaping ) can look at this.
1961 * The write is to an int and is coherent. Also parent is
1968 /* and now wakeup the parent */