Safe Haskell | None |
---|
This module contains a low-level binding to the kqueue interface.
It stays close to the C API, changing the types to more native
Haskell types, but not significantly changing it.
See the kqueue man page or the examples in examples/
for usage
information.
For a higher-level binding, see System.KQueue.HighLevel.
- data KQueue
- kqueue :: IO KQueue
- data KEvent = KEvent {}
- data Filter
- = EvfiltRead
- | EvfiltWrite
- | EvfiltAio
- | EvfiltVnode
- | EvfiltProc
- | EvfiltSignal
- | EvfiltTimer
- data Flag
- data FFlag
- = NoteDelete
- | NoteWrite
- | NoteExtend
- | NoteAttrib
- | NoteLink
- | NoteRename
- | NoteRevoke
- | NoteExit
- | NoteFork
- | NoteExec
- | NoteSignal
- | NoteReap
- kevent :: KQueue -> [KEvent] -> Int -> Maybe NominalDiffTime -> IO [KEvent]
- data KQueueException
Documentation
A kernel event.
KEvent | |
|
The types of kernel events.
The actions to perform on the event.
The filter specific flags.
:: KQueue | The kernel queue to operate on. |
-> [KEvent] | The list of events to start monitoring, or changes to retrieve. |
-> Int | The maximum number of events to retrieve. |
-> Maybe NominalDiffTime | Timeout. When nothing, blocks until an event has occurred. |
-> IO [KEvent] | A list of events that have occurred. |
Add events to monitor, or retrieve events from the kqueue. If an
error occurs, will throw a KQueueException
if there is no room in
the returned event list. Otherwise, will set EvError
on the event
and add it to the returned event list.