From: Michael Kerrisk Date: Wed, 14 Oct 2020 05:28:40 +0000 (+0200) Subject: seccomp_user_notif.2: Note when notification FD indicates as writable by select/poll... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1682050d4eec8c4a88264647ddf7794d159496eb;p=thirdparty%2Fman-pages.git seccomp_user_notif.2: Note when notification FD indicates as writable by select/poll/epoll Reported-by: Tycho Andersen Signed-off-by: Michael Kerrisk --- diff --git a/man2/seccomp_user_notif.2 b/man2/seccomp_user_notif.2 index 11e3ab05a3..29ed25eb20 100644 --- a/man2/seccomp_user_notif.2 +++ b/man2/seccomp_user_notif.2 @@ -579,6 +579,7 @@ or the target has terminated. .\" whether the target thread has picked up the response yet .RE .SH NOTES +.SS select()/poll()/epoll semantics The file descriptor returned when .BR seccomp (2) is employed with the @@ -588,6 +589,8 @@ flag can be monitored using .BR epoll (7), and .BR select (2). +These interfaces indicate that the file descriptor is ready as follows: +.IP \(bu 2 When a notification is pending, these interfaces indicate that the file descriptor is readable. Following such an indication, a subsequent @@ -598,10 +601,17 @@ or else failing with the error .B EINTR if the target has been killed by a signal or its system call has been interrupted by a signal handler. +.IP \(bu +After the notification has been received (i.e., by the +.B SECCOMP_IOCTL_NOTIF_RECV +.BR ioctl (2) +operation), these interfaces indicate that the file descriptor is writable, +meaning that a notification response can be sent using the +.B SECCOMP_IOCTL_NOTIF_SEND +.BR ioctl (2) +operation. .\" FIXME -.\" Interestingly, after the event had been received, the file -.\" descriptor indicates as writable (verified from the source -.\" code and by experiment). How is this useful? +.\" But (how) is the writable/(E)POLLOUT useful? .SH BUGS If a .BR SECCOMP_IOCTL_NOTIF_RECV