summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/kqueue.2
diff options
context:
space:
mode:
authorjmg <jmg@FreeBSD.org>2000-05-24 04:29:57 +0000
committerjmg <jmg@FreeBSD.org>2000-05-24 04:29:57 +0000
commit877050064de35ace52498445e132c41e5786b724 (patch)
tree09012aaa8d52d476d4a90f43f0e513496f519eed /lib/libc/sys/kqueue.2
parent28218f546c7ba8b4fba010c0b0a1af5867aba192 (diff)
downloadFreeBSD-src-877050064de35ace52498445e132c41e5786b724.zip
FreeBSD-src-877050064de35ace52498445e132c41e5786b724.tar.gz
fix up the kqueue documentation... comment some things that were left
out that really needed to be here... Reviewed-by: jlemon
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 9d3f6bf..413e418 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
OpenPOWER on IntegriCloud