aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/sys/kqueue.2
diff options
context:
space:
mode:
authorJohn-Mark Gurney <jmg@FreeBSD.org>2000-05-24 04:29:57 +0000
committerJohn-Mark Gurney <jmg@FreeBSD.org>2000-05-24 04:29:57 +0000
commitaf7b56f4507aa622dc667ae0de08e57458afc61e (patch)
tree3a75a415b8ac160e53bb8a04b1edc1919bad5bba /lib/libc/sys/kqueue.2
parent255c925eefa1c53c8ed4c76c1c30678e26eec165 (diff)
downloadsrc-af7b56f4507aa622dc667ae0de08e57458afc61e.tar.gz
src-af7b56f4507aa622dc667ae0de08e57458afc61e.zip
Notes
Diffstat (limited to 'lib/libc/sys/kqueue.2')
-rw-r--r--lib/libc/sys/kqueue.221
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2
index 9d3f6bf04aff..413e418966c9 100644
--- a/lib/libc/sys/kqueue.2
+++ b/lib/libc/sys/kqueue.2
@@ -68,6 +68,10 @@ on a file descriptor will remove any kevents that reference the descriptor.
.Pp
.Fn kqueue
creates a new kernel event queue and returns a descriptor.
+The queue is not inherited by a child created with
+.Xr fork 2 .
+However, you can perform a rfork() and share the descriptor table,
+which will allow sharing of the kqueue between two processes.
.Pp
.Fn kevent
is used to register events with the queue, and return any pending
@@ -331,6 +335,11 @@ returns the number of times the signal has occurred since the last call to
This filter automatically sets the EV_CLEAR flag internally.
.El
.Sh RETURN VALUES
+.Fn kqueue
+creates a new kernel event queue and returns a file descriptor.
+If there was an error creating the kernel event queue, a value of -1 is
+returned and errno set.
+.Pp
.Fn kevent
returns the number of events placed in the
.Ar eventlist ,
@@ -358,6 +367,18 @@ If the time limit expires, then
returns 0.
.Sh ERRORS
The
+.Fn kqueue
+function fails if:
+.Bl -tag -width Er
+.It Bq Er ENOMEM
+The kernel failed to allocate enough memory for the kernel queue.
+.It Bq Er EMFILE
+The per-process descriptor table is full.
+.It Bq Er ENFILE
+The system file table is full.
+.El
+.Pp
+The
.Fn kevent
function fails if:
.Bl -tag -width Er