1 .\" $NetBSD: sigtimedwait.2,v 1.7 2010/05/31 11:02:24 drochner Exp $
3 .\" Copyright (c) 2003 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Jaromir Dolecek.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
37 .Nd wait for queued signals
43 .Fn sigtimedwait "const sigset_t * restrict set" "siginfo_t * restrict info" "const struct timespec * restrict timeout"
45 .Fn sigwaitinfo "const sigset_t * restrict set" "siginfo_t * restrict info"
47 .Fn sigwait "const sigset_t * restrict set" "int * restrict sig"
52 return the first pending signal from the set specified by
54 Should multiple signals from
56 be pending, the lowest numbered one is returned.
57 The selection order between realtime and non-realtime signals is unspecified.
58 If there is no signal from
60 pending at the time of the call, the calling thread
61 is suspended until one of the specified signals is generated.
68 specifies the maximum time interval for which the calling thread will
72 is zero (tv_sec == tv_nsec == 0),
74 only checks the currently pending signals and returns immediately.
84 If several threads are waiting for a given signal, exactly one of them
85 returns from the signal wait when the signal is generated.
87 Behaviour of these functions is unspecified if any of the signals in
89 are unblocked at the time these functions are called.
91 Upon successful completion of
96 is updated with signal information, and the function returns the signal number.
97 Otherwise, \-1 is returned and the global variable
100 Upon successful completion of
103 is updated with ihe signal number, and the function returns 0.
104 Otherwise, a non-zero error code is returned,
114 pointer will remain unchanged if:
117 No signal specified in
119 was generated in the specified
132 This error is only checked if no signal from
134 is pending and it would be necessary to wait.
153 functions appeared in