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

Function filt_procdetach

freebsd/kern/kern_event.c:481–487  ·  view source on GitHub ↗

* The knote may be attached to a different process, which may exit, * leaving nothing for the knote to be attached to. So when the process * exits, the knote is marked as DETACHED and also flagged as ONESHOT so * it will be deleted when read out. However, as part of the knote deletion, * this routine is called, so a check is needed to avoid actually performing * a detach, because the origin

Source from the content-addressed store, hash-verified

479 */
480/* XXX - move to kern_proc.c? */
481static void
482filt_procdetach(struct knote *kn)
483{
484
485 knlist_remove(kn->kn_knlist, kn, 0);
486 kn->kn_ptr.p_proc = NULL;
487}
488
489/* XXX - move to kern_proc.c? */
490static int

Callers

nothing calls this directly

Calls 1

knlist_removeFunction · 0.85

Tested by

no test coverage detected