aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>2002-06-17 02:21:17 +0000
committerGarrett Wollman <wollman@FreeBSD.org>2002-06-17 02:21:17 +0000
commit50d0eead10dd6b461d55b339974ac82ba04d3bc6 (patch)
treed7d8d1998ea276334f6916d0c84ac13d1d6b2622
parent8466ae90331446c30cd29d11ac03a58b334cd2d7 (diff)
downloadsrc-50d0eead10dd6b461d55b339974ac82ba04d3bc6.tar.gz
src-50d0eead10dd6b461d55b339974ac82ba04d3bc6.zip
Actually document pselect(3) so that Bruce can mention it in the release
notes. :-)
Notes
Notes: svn path=/head/; revision=98315
-rw-r--r--lib/libc/gen/Makefile.inc2
-rw-r--r--lib/libc/gen/pselect.3122
2 files changed, 123 insertions, 1 deletions
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
index 0b0eac1a544d..fbd93e938819 100644
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -50,7 +50,7 @@ MAN+= alarm.3 arc4random.3 \
getttyent.3 getusershell.3 getvfsbyname.3 getvfsent.3 \
glob.3 initgroups.3 isinf.3 \
ldexp.3 lockf.3 modf.3 msgctl.3 msgget.3 msgrcv.3 msgsnd.3 \
- nice.3 nlist.3 pause.3 popen.3 psignal.3 pwcache.3 \
+ nice.3 nlist.3 pause.3 popen.3 pselect.3 psignal.3 pwcache.3 \
raise.3 rand48.3 readpassphrase.3 rfork_thread.3 \
scandir.3 setjmp.3 setmode.3 setproctitle.3 shm_open.3 \
siginterrupt.3 signal.3 sigsetops.3 sleep.3 stringlist.3 \
diff --git a/lib/libc/gen/pselect.3 b/lib/libc/gen/pselect.3
new file mode 100644
index 000000000000..6abb95205957
--- /dev/null
+++ b/lib/libc/gen/pselect.3
@@ -0,0 +1,122 @@
+.\"
+.\" Copyright 2002 Massachusetts Institute of Technology
+.\"
+.\" Permission to use, copy, modify, and distribute this software and
+.\" its documentation for any purpose and without fee is hereby
+.\" granted, provided that both the above copyright notice and this
+.\" permission notice appear in all copies, that both the above
+.\" copyright notice and this permission notice appear in all
+.\" supporting documentation, and that the name of M.I.T. not be used
+.\" in advertising or publicity pertaining to distribution of the
+.\" software without specific, written prior permission. M.I.T. makes
+.\" no representations about the suitability of this software for any
+.\" purpose. It is provided "as is" without express or implied
+.\" warranty.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
+.\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
+.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+.\" SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 16, 2002
+.Dt PSELECT 3
+.Os
+.Sh NAME
+.Nm pselect
+.Nd synchronous I/O multiplexing a la POSIX.1g
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In sys/select.h
+.Ft int
+.Fn pselect "int nfds" "fd_set *readfds" "fd_set *writefds" "fd_set *exceptfds" "const struct timespec *timeout" "const sigset_t *newsigmask"
+.Sh DESCRIPTION
+The
+.Fn pselect
+function was introduced by
+.St -p1003.1g-2000
+as a slightly stronger version of
+.Xr select 2 .
+The
+.Fa nfds ,
+.Fa readfds ,
+.Fa writefds ,
+and
+.Fa exceptfds
+arguments are all identical to the analogous arguments of
+.Fn select .
+The
+.Fa timeout
+argument in
+.Fn pselect
+points to a
+.Vt "const struct timespec"
+rather than the (modifiable)
+.Vt "struct timeval"
+used by
+.Fn select ;
+as in
+.Fn select ,
+a null pointer may be passed to indicate that
+.Fn pselect
+should wait indefinitely.
+Finally,
+.Fa newsigmask
+specifies a signal mask which is set while waiting for input.
+When
+.Fn pselect
+returns, the original signal mask is restored.
+.Pp
+See
+.Xr select 2
+for a more detailed discussion of the semantics of this interface, and
+for macros used to manipulate the
+.Vt "fd_set"
+data type.
+.Sh IMPLEMENTATION NOTES
+The
+.Fn pselect
+function is implemented in the C library as a wrapper around
+.Fn select .
+.Sh RETURN VALUES
+The
+.Fn pselect
+function returns the same values and under the same conditions as
+.Fn select .
+.Sh ERRORS
+The
+.Fn pselect
+function may fail for any of the reasons documented for
+.Xr select 2
+and (if a signal mask is provided)
+.Xr sigprocmask 2 .
+.Sh SEE ALSO
+.Xr kqueue 2 ,
+.Xr poll 2 ,
+.Xr select 2 ,
+.Xr sigprocmask 2
+.Sh STANDARDS
+The
+.Fn pselect
+function conforms to
+.St -p1003.1-2001 .
+.Sh HISTORY
+The
+.Nm
+function first appeared in
+.Fx 5.0 .
+.Sh AUTHORS
+The
+.Nm
+function and this manual page were written by
+.An Garrett Wollman Aq wollman@FreeBSD.org .