Drop trailing whitespace, and some mdoc fixes and improvements.
This commit is contained in:
parent
5dbdce59f0
commit
968f39c890
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: kqueue.2,v 1.5 2002/09/24 11:38:16 jdolecek Exp $
|
||||
.\" $NetBSD: kqueue.2,v 1.6 2002/09/25 00:55:16 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2000 Jonathan Lemon
|
||||
.\" All rights reserved.
|
||||
|
@ -42,9 +42,9 @@
|
|||
.Sh LIBRARY
|
||||
.Lb libc
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <sys/types.h>
|
||||
.Fd #include <sys/event.h>
|
||||
.Fd #include <sys/time.h>
|
||||
.Fd #include \*[Lt]sys/types.h\*[Gt]
|
||||
.Fd #include \*[Lt]sys/event.h\*[Gt]
|
||||
.Fd #include \*[Lt]sys/time.h\*[Gt]
|
||||
.Ft int
|
||||
.Fn kqueue "void"
|
||||
.Ft int
|
||||
|
@ -111,14 +111,20 @@ determines the size of
|
|||
.Fa eventlist .
|
||||
If
|
||||
.Fa timeout
|
||||
is a non-NULL pointer, it specifies a maximum interval to wait
|
||||
is a
|
||||
.No non- Ns Dv NULL
|
||||
pointer, it specifies a maximum interval to wait
|
||||
for an event, which will be interpreted as a struct timespec. If
|
||||
.Fa timeout
|
||||
is a NULL pointer,
|
||||
is a
|
||||
.Dv NULL
|
||||
pointer,
|
||||
.Fn kevent
|
||||
waits indefinitely. To effect a poll, the
|
||||
.Fa timeout
|
||||
argument should be non-NULL, pointing to a zero-valued
|
||||
argument should be
|
||||
.No non- Ns Dv NULL ,
|
||||
pointing to a zero-valued
|
||||
.Va timespec
|
||||
structure. The same array may be used for the
|
||||
.Fa changelist
|
||||
|
@ -202,9 +208,7 @@ See
|
|||
.Sx RETURN VALUES
|
||||
below.
|
||||
.El
|
||||
.Pp
|
||||
.Ss Filters
|
||||
.Pp
|
||||
Filters are identified by a number.
|
||||
There are two types of filters; pre-defined filters which
|
||||
are described below, and third-party filters that may be added with
|
||||
|
@ -214,7 +218,7 @@ kernel modules.
|
|||
.Pp
|
||||
As a third-party filter is referenced by a well-known name instead
|
||||
of a statically assigned number, two
|
||||
.Xr ioctl 2 s
|
||||
.Xr ioctl 2 Ns s
|
||||
are supported on the file descriptor returned by
|
||||
.Fn kqueue
|
||||
to map a filter name to a filter number, and vice-versa (passing
|
||||
|
@ -311,7 +315,7 @@ returning.
|
|||
.It EVFILT_WRITE
|
||||
Takes a descriptor as the identifier, and returns whenever
|
||||
it is possible to write to the descriptor. For sockets, pipes,
|
||||
fifos and ttys,
|
||||
fifos, and ttys,
|
||||
.Va data
|
||||
will contain the amount of space remaining in the write buffer.
|
||||
The filter will set EV_EOF when the reader disconnects, and for
|
||||
|
@ -429,7 +433,7 @@ This filter automatically sets the EV_CLEAR flag internally.
|
|||
.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
|
||||
If there was an error creating the kernel event queue, a value of \-1 is
|
||||
returned and errno set.
|
||||
.Pp
|
||||
.Fn kevent
|
||||
|
@ -450,7 +454,7 @@ set in
|
|||
and the system error in
|
||||
.Va data .
|
||||
Otherwise,
|
||||
.Dv -1
|
||||
.Dv \-1
|
||||
will be returned, and
|
||||
.Dv errno
|
||||
will be set to indicate the error condition.
|
||||
|
@ -505,8 +509,8 @@ The specified process to attach to does not exist.
|
|||
.Xr sigaction 2 ,
|
||||
.Xr write 2 ,
|
||||
.Xr signal 3 ,
|
||||
.Xr kfilter_register 9 .
|
||||
.Xr knote 9 .
|
||||
.Xr kfilter_register 9 ,
|
||||
.Xr knote 9
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Fn kqueue
|
||||
|
|
Loading…
Reference in New Issue