mirror of
https://github.com/darlinghq/darling-libkqueue.git
synced 2024-11-23 03:39:51 +00:00
update manpage
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@339 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
parent
6011110130
commit
8f668e4445
101
kqueue.2
101
kqueue.2
@ -1,4 +1,5 @@
|
|||||||
.\" $FreeBSD: Revision: 197243$
|
.\" $FreeBSD: Revision: 197243$
|
||||||
|
.\" Copyright (c) 2010 Mark Heily
|
||||||
.\" Copyright (c) 2000 Jonathan Lemon
|
.\" Copyright (c) 2000 Jonathan Lemon
|
||||||
.\" All rights reserved.
|
.\" All rights reserved.
|
||||||
.\"
|
.\"
|
||||||
@ -25,15 +26,13 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd September 15, 2009
|
.Dd September 17, 2010
|
||||||
.Dt KQUEUE 2
|
.Dt KQUEUE 2
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm kqueue ,
|
.Nm kqueue ,
|
||||||
.Nm kevent
|
.Nm kevent
|
||||||
.Nd kernel event notification mechanism
|
.Nd kernel event notification mechanism
|
||||||
.Sh LIBRARY
|
|
||||||
.Lb libc
|
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.In sys/types.h
|
.In sys/types.h
|
||||||
.In sys/event.h
|
.In sys/event.h
|
||||||
@ -319,26 +318,6 @@ Note that this filter is not supported for vnodes or BPF devices.
|
|||||||
.Pp
|
.Pp
|
||||||
For sockets, the low water mark and socket error handling is
|
For sockets, the low water mark and socket error handling is
|
||||||
identical to the EVFILT_READ case.
|
identical to the EVFILT_READ case.
|
||||||
.It EVFILT_AIO
|
|
||||||
The sigevent portion of the AIO request is filled in, with
|
|
||||||
.Va sigev_notify_kqueue
|
|
||||||
containing the descriptor of the kqueue that the event should
|
|
||||||
be attached to,
|
|
||||||
.Va sigev_value
|
|
||||||
containing the udata value, and
|
|
||||||
.Va sigev_notify
|
|
||||||
set to SIGEV_KEVENT.
|
|
||||||
When the
|
|
||||||
.Fn aio_*
|
|
||||||
system call is made, the event will be registered
|
|
||||||
with the specified kqueue, and the
|
|
||||||
.Va ident
|
|
||||||
argument set to the
|
|
||||||
.Fa struct aiocb
|
|
||||||
returned by the
|
|
||||||
.Fn aio_*
|
|
||||||
system call.
|
|
||||||
The filter returns under the same conditions as aio_error.
|
|
||||||
.It EVFILT_VNODE
|
.It EVFILT_VNODE
|
||||||
Takes a file descriptor as the identifier and the events to watch for in
|
Takes a file descriptor as the identifier and the events to watch for in
|
||||||
.Va fflags ,
|
.Va fflags ,
|
||||||
@ -360,47 +339,6 @@ The file referenced by the descriptor had its attributes changed.
|
|||||||
The link count on the file changed.
|
The link count on the file changed.
|
||||||
.It NOTE_RENAME
|
.It NOTE_RENAME
|
||||||
The file referenced by the descriptor was renamed.
|
The file referenced by the descriptor was renamed.
|
||||||
.It NOTE_REVOKE
|
|
||||||
Access to the file was revoked via
|
|
||||||
.Xr revoke 2
|
|
||||||
or the underlying file system was unmounted.
|
|
||||||
.El
|
|
||||||
.Pp
|
|
||||||
On return,
|
|
||||||
.Va fflags
|
|
||||||
contains the events which triggered the filter.
|
|
||||||
.It EVFILT_PROC
|
|
||||||
Takes the process ID to monitor as the identifier and the events to watch for
|
|
||||||
in
|
|
||||||
.Va fflags ,
|
|
||||||
and returns when the process performs one or more of the requested events.
|
|
||||||
If a process can normally see another process, it can attach an event to it.
|
|
||||||
The events to monitor are:
|
|
||||||
.Bl -tag -width XXNOTE_TRACKERR
|
|
||||||
.It NOTE_EXIT
|
|
||||||
The process has exited.
|
|
||||||
The exit status will be stored in
|
|
||||||
.Va data .
|
|
||||||
.It NOTE_FORK
|
|
||||||
The process has called
|
|
||||||
.Fn fork .
|
|
||||||
.It NOTE_EXEC
|
|
||||||
The process has executed a new process via
|
|
||||||
.Xr execve 2
|
|
||||||
or similar call.
|
|
||||||
.It NOTE_TRACK
|
|
||||||
Follow a process across
|
|
||||||
.Fn fork
|
|
||||||
calls.
|
|
||||||
The parent process will return with NOTE_TRACK set in the
|
|
||||||
.Va fflags
|
|
||||||
field, while the child process will return with NOTE_CHILD set in
|
|
||||||
.Va fflags
|
|
||||||
and the parent PID in
|
|
||||||
.Va data .
|
|
||||||
.It NOTE_TRACKERR
|
|
||||||
This flag is returned if the system was unable to attach an event to
|
|
||||||
the child process, usually due to resource limitations.
|
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
On return,
|
On return,
|
||||||
@ -409,16 +347,14 @@ contains the events which triggered the filter.
|
|||||||
.It EVFILT_SIGNAL
|
.It EVFILT_SIGNAL
|
||||||
Takes the signal number to monitor as the identifier and returns
|
Takes the signal number to monitor as the identifier and returns
|
||||||
when the given signal is delivered to the process.
|
when the given signal is delivered to the process.
|
||||||
This coexists with the
|
This overrides the
|
||||||
.Fn signal
|
.Fn signal
|
||||||
and
|
and
|
||||||
.Fn sigaction
|
.Fn sigaction
|
||||||
facilities, and has a lower precedence.
|
facilities, and has a higher precedence.
|
||||||
The filter will record
|
The filter will record
|
||||||
all attempts to deliver a signal to a process, even if the signal has
|
all attempts to deliver a signal to a process, even if the signal has
|
||||||
been marked as SIG_IGN.
|
been marked as SIG_IGN.
|
||||||
Event notification happens after normal
|
|
||||||
signal delivery processing.
|
|
||||||
.Va data
|
.Va data
|
||||||
returns the number of times the signal has occurred since the last call to
|
returns the number of times the signal has occurred since the last call to
|
||||||
.Fn kevent .
|
.Fn kevent .
|
||||||
@ -439,23 +375,6 @@ There is a system wide limit on the number of timers
|
|||||||
which is controlled by the
|
which is controlled by the
|
||||||
.Va kern.kq_calloutmax
|
.Va kern.kq_calloutmax
|
||||||
sysctl.
|
sysctl.
|
||||||
.It Dv EVFILT_NETDEV
|
|
||||||
Takes a descriptor to a network interface as the identifier, and the events to watch for in
|
|
||||||
.Va fflags .
|
|
||||||
It returns, when one or more of the requested events occur on the descriptor.
|
|
||||||
The events to monitor are:
|
|
||||||
.Bl -tag -width XXNOTE_LINKDOWN
|
|
||||||
.It Dv NOTE_LINKUP
|
|
||||||
The link is up.
|
|
||||||
.It Dv NOTE_LINKDOWN
|
|
||||||
The link is down.
|
|
||||||
.It Dv NOTE_LINKINV
|
|
||||||
The link state is invalid.
|
|
||||||
.El
|
|
||||||
.Pp
|
|
||||||
On return,
|
|
||||||
.Va fflags
|
|
||||||
contains the events which triggered the filter.
|
|
||||||
.It Dv EVFILT_USER
|
.It Dv EVFILT_USER
|
||||||
Establishes a user event identified by
|
Establishes a user event identified by
|
||||||
.Va ident
|
.Va ident
|
||||||
@ -594,15 +513,3 @@ The
|
|||||||
.Fn kqueue
|
.Fn kqueue
|
||||||
system and this manual page were written by
|
system and this manual page were written by
|
||||||
.An Jonathan Lemon Aq jlemon@FreeBSD.org .
|
.An Jonathan Lemon Aq jlemon@FreeBSD.org .
|
||||||
.Sh BUGS
|
|
||||||
The
|
|
||||||
.Dv EVFILT_NETDEV
|
|
||||||
filter is currently only implemented for devices that use the
|
|
||||||
.Xr miibus 4
|
|
||||||
driver for LINKUP and LINKDOWN operations.
|
|
||||||
Therefore, it will not work with many non-ethernet devices.
|
|
||||||
.Pp
|
|
||||||
The
|
|
||||||
.Fa timeout
|
|
||||||
value is limited to 24 hours; longer timeouts will be silently
|
|
||||||
reinterpreted as 24 hours.
|
|
||||||
|
Loading…
Reference in New Issue
Block a user