diff options
Diffstat (limited to 'lib/libsys/kqueue.2')
-rw-r--r-- | lib/libsys/kqueue.2 | 58 |
1 files changed, 57 insertions, 1 deletions
diff --git a/lib/libsys/kqueue.2 b/lib/libsys/kqueue.2 index d6e949baa24c..e413f7d4fbca 100644 --- a/lib/libsys/kqueue.2 +++ b/lib/libsys/kqueue.2 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 26, 2023 +.Dd September 4, 2025 .Dt KQUEUE 2 .Os .Sh NAME @@ -593,6 +593,62 @@ returns the number of times the signal has occurred since the last call to This filter automatically sets the .Dv EV_CLEAR flag internally. +.It Dv EVFILT_JAIL +Takes the jail ID to monitor as the identifier and the events to watch for +in +.Va fflags , +and returns when the jail performs one or more of the requested events. +If a process can normally see a jail, it can attach an event to it. +An identifier of zero will watch the process's own jail. +The events to monitor are: +.Bl -tag -width "Dv NOTE_JAIL_ATTACH" +.It Dv NOTE_JAIL_SET +The jail has been changed via +.Xr jail_set 2 . +.It Dv NOTE_JAIL_ATTACH +A process has attached to the jail via +.Xr jail_attach 2 +or a similar call. +The process ID will be stored in +.Va data . +If more than one process has attached since the last call to +.Fn kevent , +.Va data +will contain the most recently attached process ID, +with +.Dv NOTE_JAIL_ATTACH_MULTI +set in +.Va fflags . +.It Dv NOTE_JAIL_REMOVE +The jail has been removed. +.It Dv NOTE_JAIL_CHILD +A child of the watched jail has been created. +.It Dv NOTE_TRACK +Follow child jails created under this jail. +Register a new kevent to monitor the child jail using the same +.Va fflags +as the original event. +The child jail will signal an event with +.Dv NOTE_CHILD +set in +.Va fflags +and the parent JID in +.Va data . +.Pp +If registering a new kevent fails +.Pq usually due to resource limitations , +it will signal an event with +.Dv NOTE_TRACKERR +set in +.Va fflags , +and the child jail will not signal a +.Dv NOTE_CHILD +event. +.El +.Pp +On return, +.Va fflags +contains the events which triggered the filter. .It Dv EVFILT_TIMER Establishes an arbitrary timer identified by .Va ident . |