| Safe Haskell | None |
|---|
System.Posix.IO.Select
Description
Interface to select(2). The arguments to the functions exposed
here must fulfill the same requirements as the arguments for
select itself; see the man page.
If the select call made by any of these functions is interrupted
(select returning -1 and errno being EINTR) before the
given time has elapsed, the call will be retried. If the specified
amount of time has passed and select is still being interrupted,
the functions below will make one last attempt with timeout
zero. If that call too is interrupted, behavior will be as if
select returned an error.
Documentation
select' :: [Fd] -> [Fd] -> [Fd] -> Timeout -> IO (Maybe ([Fd], [Fd], [Fd]))Source
A simpler version of select that uses file descriptor lists
instead of FdSets. Nothing is returned in case select gives
an error, otherwise is returned, where
Just (rfds, wfds, efds)rfds, wfds and efds are lists of ready file descriptors (they
may be empty, such as in the case of select timing out).