1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
|
.\" Copyright (c) 2002 Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein. The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Japanese Version Copyright (c) 2003 Yuichi SATO
.\" all rights reserved.
.\" Translated 2003-02-16, Yuichi SATO <ysato444@yahoo.co.jp>
.\" Updated 2006-07-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
.\" Updated 2008-08-07, Akihiro MOTOKI, LDP v3.05
.\"
.\"WORD: pending ԵǤ
.\"
.TH SIGWAITINFO 2 2008-10-04 "Linux" "Linux Programmer's Manual"
.SH ̾
sigwaitinfo, sigtimedwait \- 塼줿ʥƱԤ
.SH
.nf
.B #include <signal.h>
.sp
.BI "int sigwaitinfo(const sigset_t *" set ", siginfo_t *" info ");"
.sp
.BI "int sigtimedwait(const sigset_t *" set ", siginfo_t *" info ", "
.BI " const struct timespec *" timeout ");"
.fi
.sp
.in -4n
glibc εǽޥ
.RB ( feature_test_macros (7)
):
.in
.sp
.BR sigwaitinfo (),
.BR sigtimedwait ():
_POSIX_C_SOURCE\ >=\ 199309L
.SH
.BR sigwaitinfo ()
.I set
ΤΤɤ줫Υʥ뤬ޤǡ
ƤӽФåɤμ¹Ԥߤ
(ƤӽФåɤФ
.I set
ΤΤɤ줫Υʥ뤬Ե (pending) Ǥ硢
.BR sigwaitinfo ()
ϤΥʥξ֤Ƥ)
.PP
.BR sigwaitinfo ()
줿ʥԵΥʥν礫
ؿη̤Ȥƥʥֹ֤
.I info
NULL Ǥʤ硢줿ʥξä
.I siginfo_t
.RB ( sigaction (2)
) ι¤Τ֤
.PP
.BR sigwaitinfo ()
֤륷ʥϡ̾ν֤롣
ܺ٤
.BR signal (7)
Ȥ뤳ȡ
.PP
.BR sigtimedwait ()
ϡ
.BR sigwaitinfo ()
ȼƱ褦ư롣
δؿˤϤ⤦ 1 Ĥΰ
.I timeout
ꡢåɤߤ֤ξ¤뤳ȤǤ롣
ΰηϰʲΤȤǤ:
.sp
.in +4n
.nf
struct timespec {
long tv_sec; /* */
long tv_nsec; /* ʥ */
}
.fi
.in
.sp
ι¤Τ 2 ĤΥեɤȤ 0 ξ硢ݡԤ:
.BR sigtimedwait ()
ϡƤӽФ¦ץФ
ԵƤ륷ʥξ֤뤫
.I set
ΤΤɤΥʥԵƤʤϥ顼֤롣
.SH ֤
硢
.BR sigwaitinfo ()
.BR sigtimedwait ()
ϥʥֹ (ʤ 0 礭) ֤
Ԥ硢2 Ĥδؿ \-1 ֤
.I errno
ϥ顼ɽͤꤵ롣
.SH 顼
.TP
.B EAGAIN
.I set
ΤΤɤΥʥ
.BR sigtimedwait ()
˻ꤵ줿
.I timeout
δʤä
.TP
.B EINTR
ʥԤʥϥɥˤä (interrupt) 줿
(Υϥɥ
.I set
ˤ륷ʥʳΤΤǤ)
.BR signal (7)
ȡ
.TP
.B EINVAL
.I timeout
Ǥ롣
.SH
POSIX.1-2001.
.SH
̾λˡǤϡƤӽФ¦ץϤδؿ
.BR sigprocmask (2)
θƤӽФȤˤ
.I set
˴ޤޤ륷ʥ֥å
(ΤˤΥʥ뤬θ³
.BR sigwaitinfo ()
.BR sigtimedwait ()
θƤӽФδ֤줿ˤϡ
ǥեȤ֤ϹԤ줺)
ΥʥФϥɥꤷʤ
ޥåɥץǤϡ
.BR sigwaitinfo ()
.BR sigtimedwait ()
ƤӽФåɰʳΥåɤˤΥʥ뤬ʤ褦ˡ
ƤΥåɤdzʥ֥å٤Ǥ롣
ꤵ줿åɤФԤΥʥνϡ
ΥåɼΰƤνԤΥʥ뽸ȡץΰƤ
ԤΥʥ뽸碌ΤǤ
.RB ( signal (7)
)
ĤΥץʣΥåɤ
.BR sigwaitinfo ()
.BR sigtimedwait ()
ƱʥԤäߤ硢
ץΰƤΥʥ뤬ȡʣΥåɤΤĤ
ºݤˤΥʥ뤳Ȥˤʤ롣
ɤΥåɤʥ뤫ϷޤäƤʤ
POSIX Ǥ
.BR sigtimedwait ()
ΰ
.I timeout
ͤ NULL ˤΰ̣̤ȤƤ롣
.BR sigwaitinfo ()
ƤӽФΤƱ̣ȤƤ褤ȤˤʤäƤꡢ
º Linux ǤϤΤ褦ư롣
Linux Ǥϡ
.BR sigwaitinfo ()
.BR sigtimedwait ()
ѤƼ줿饤֥ؿǤ롣
.SH Ϣ
.BR kill (2),
.BR sigaction (2),
.BR signal (2),
.BR signalfd (2),
.BR sigpending (2),
.BR sigprocmask (2),
.BR sigqueue (2),
.BR sigsetops (3),
.BR sigwait (3),
.BR signal (7),
.BR time (7)
|