MCPcopy Create free account
hub / github.com/F-Stack/f-stack / proc_clear_orphan

Function proc_clear_orphan

freebsd/kern/kern_exit.c:169–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169void
170proc_clear_orphan(struct proc *p)
171{
172 struct proc *p1;
173
174 sx_assert(&proctree_lock, SA_XLOCKED);
175 if ((p->p_treeflag & P_TREE_ORPHANED) == 0)
176 return;
177 if ((p->p_treeflag & P_TREE_FIRST_ORPHAN) != 0) {
178 p1 = LIST_NEXT(p, p_orphan);
179 if (p1 != NULL)
180 p1->p_treeflag |= P_TREE_FIRST_ORPHAN;
181 p->p_treeflag &= ~P_TREE_FIRST_ORPHAN;
182 }
183 LIST_REMOVE(p, p_orphan);
184 p->p_treeflag &= ~P_TREE_ORPHANED;
185}
186
187/*
188 * exit -- death of process.

Callers 4

exit1Function · 0.85
proc_reapFunction · 0.85
proc_reparentFunction · 0.85
procdesc_closeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected