diff options
Diffstat (limited to 'lib/libsys')
| -rw-r--r-- | lib/libsys/clock_gettime.2 | 3 | ||||
| -rw-r--r-- | lib/libsys/kqueue.2 | 29 |
2 files changed, 29 insertions, 3 deletions
diff --git a/lib/libsys/clock_gettime.2 b/lib/libsys/clock_gettime.2 index 89551d0f720b..841673648dfc 100644 --- a/lib/libsys/clock_gettime.2 +++ b/lib/libsys/clock_gettime.2 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 10, 2024 +.Dd October 15, 2025 .Dt CLOCK_GETTIME 2 .Os .Sh NAME @@ -80,7 +80,6 @@ Behavior during a leap second is not defined by and POSIX standard. Increments in SI seconds, even while the system is suspended. Its epoch is unspecified. The count is not adjusted by leap seconds. -.Fx implements .It Dv CLOCK_UPTIME .It Dv CLOCK_UPTIME_PRECISE .It Dv CLOCK_UPTIME_FAST diff --git a/lib/libsys/kqueue.2 b/lib/libsys/kqueue.2 index 96c9b0222a37..a8ebabf02cf7 100644 --- a/lib/libsys/kqueue.2 +++ b/lib/libsys/kqueue.2 @@ -97,10 +97,37 @@ system call also creates a new kernel event queue, and additionally takes a .Fa flags argument, which is a bitwise-inclusive OR of the following flags: -.Bl -tag -width "KQUEUE_CLOEXEC" +.Bl -tag -width "KQUEUE_CPONFORK" .It Dv KQUEUE_CLOEXEC The returned file descriptor is automatically closed on .Xr execve 2 +.It Dv KQUEUE_CPONFORK +When this flag is set, the created kqueue is copied into +the child process on +.Xr fork 2 +calls. +The kqueue descriptor index of the new kqueue will be inherited by the child, +that is, the numeric value of the descriptor will remain the same. +.Pp +Copying is deep, that is, each registered event in the original kqueue is +copied (and not shared) into the new kqueue. +This is contrary to how other descriptor types are handled upon +.Xr fork 2 , +where the copied file descriptor references the same file object +as the source descriptor (shallow copy). +.Pp +By default, in other words, when the flag is not set, kqueues from +the parent are not copied on fork to the child process. +The corresponding file descriptor indeces are unused in the child. +.Pp +Registered events that reference file descriptors which are not +duplicated on fork, are not copied into the new kqueue. +For instance, if the event references a file descriptor opened with the +.Dv O_CLOEXEC +flag set, it is not copied. +Similarly, if event references a kqueue opened without the +.Dv KQUEUE_CPONFORK +flag, the event is not copied. .El .Pp The |
