OSDN Git Service

ae8f43a9cd03dd9efc7af8583804f4b302f3dec9
[linuxjm/LDP_man-pages.git] / po4a / signal / po / signal.pot
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2012-04-25 05:36+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=CHARSET\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: build/C/man3/bsd_signal.3:23
21 #, no-wrap
22 msgid "BSD_SIGNAL"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man3/bsd_signal.3:23 build/C/man2/getitimer.2:7
27 #, no-wrap
28 msgid "2009-03-15"
29 msgstr ""
30
31 #. type: TH
32 #: build/C/man3/bsd_signal.3:23 build/C/man2/eventfd.2:21 build/C/man2/getitimer.2:7 build/C/man3/gsignal.3:25 build/C/man2/kill.2:44 build/C/man2/killpg.2:40 build/C/man2/pause.2:30 build/C/man2/prctl.2:46 build/C/man3/profil.3:28 build/C/man3/psignal.3:28 build/C/man3/raise.3:27 build/C/man2/rt_sigqueueinfo.2:23 build/C/man2/sgetmask.2:24 build/C/man2/sigaction.2:45 build/C/man2/sigaltstack.2:25 build/C/man7/sigevent.7:24 build/C/man3/siginterrupt.3:29 build/C/man2/signal.2:34 build/C/man7/signal.7:44 build/C/man2/signalfd.2:19 build/C/man3/sigpause.3:23 build/C/man2/sigpending.2:27 build/C/man2/sigprocmask.2:27 build/C/man3/sigqueue.3:26 build/C/man2/sigreturn.2:27 build/C/man3/sigset.3:24 build/C/man3/sigsetops.3:29 build/C/man2/sigsuspend.2:27 build/C/man3/sigvec.3:24 build/C/man3/sigwait.3:24 build/C/man2/sigwaitinfo.2:23 build/C/man3/sysv_signal.3:23 build/C/man2/timer_create.2:29 build/C/man2/timer_delete.2:23 build/C/man2/timer_getoverrun.2:23 build/C/man2/timer_settime.2:23 build/C/man2/timerfd_create.2:20 build/C/man2/tkill.2:29 build/C/man2/wait.2:50 build/C/man2/wait4.2:34
33 #, no-wrap
34 msgid "Linux Programmer's Manual"
35 msgstr ""
36
37 #. type: SH
38 #: build/C/man3/bsd_signal.3:24 build/C/man2/eventfd.2:22 build/C/man2/getitimer.2:8 build/C/man3/gsignal.3:26 build/C/man2/kill.2:45 build/C/man2/killpg.2:41 build/C/man2/pause.2:31 build/C/man2/prctl.2:47 build/C/man3/profil.3:29 build/C/man3/psignal.3:29 build/C/man3/raise.3:28 build/C/man2/rt_sigqueueinfo.2:24 build/C/man2/sgetmask.2:25 build/C/man2/sigaction.2:46 build/C/man2/sigaltstack.2:26 build/C/man7/sigevent.7:25 build/C/man3/siginterrupt.3:30 build/C/man2/signal.2:35 build/C/man7/signal.7:45 build/C/man2/signalfd.2:20 build/C/man3/sigpause.3:24 build/C/man2/sigpending.2:28 build/C/man2/sigprocmask.2:28 build/C/man3/sigqueue.3:27 build/C/man2/sigreturn.2:28 build/C/man3/sigset.3:25 build/C/man3/sigsetops.3:30 build/C/man2/sigsuspend.2:28 build/C/man3/sigvec.3:25 build/C/man3/sigwait.3:25 build/C/man2/sigwaitinfo.2:24 build/C/man3/sysv_signal.3:24 build/C/man2/timer_create.2:30 build/C/man2/timer_delete.2:24 build/C/man2/timer_getoverrun.2:24 build/C/man2/timer_settime.2:24 build/C/man2/timerfd_create.2:21 build/C/man2/tkill.2:30 build/C/man2/wait.2:51 build/C/man2/wait4.2:35
39 #, no-wrap
40 msgid "NAME"
41 msgstr ""
42
43 #. type: Plain text
44 #: build/C/man3/bsd_signal.3:26
45 msgid "bsd_signal - signal handling with BSD semantics"
46 msgstr ""
47
48 #. type: SH
49 #: build/C/man3/bsd_signal.3:26 build/C/man2/eventfd.2:24 build/C/man2/getitimer.2:10 build/C/man3/gsignal.3:28 build/C/man2/kill.2:47 build/C/man2/killpg.2:43 build/C/man2/pause.2:33 build/C/man2/prctl.2:49 build/C/man3/profil.3:31 build/C/man3/psignal.3:31 build/C/man3/raise.3:30 build/C/man2/rt_sigqueueinfo.2:26 build/C/man2/sgetmask.2:27 build/C/man2/sigaction.2:48 build/C/man2/sigaltstack.2:28 build/C/man7/sigevent.7:27 build/C/man3/siginterrupt.3:32 build/C/man2/signal.2:37 build/C/man2/signalfd.2:22 build/C/man3/sigpause.3:26 build/C/man2/sigpending.2:30 build/C/man2/sigprocmask.2:30 build/C/man3/sigqueue.3:29 build/C/man2/sigreturn.2:30 build/C/man3/sigset.3:27 build/C/man3/sigsetops.3:33 build/C/man2/sigsuspend.2:30 build/C/man3/sigvec.3:27 build/C/man3/sigwait.3:27 build/C/man2/sigwaitinfo.2:26 build/C/man3/sysv_signal.3:26 build/C/man2/timer_create.2:32 build/C/man2/timer_delete.2:26 build/C/man2/timer_getoverrun.2:26 build/C/man2/timer_settime.2:27 build/C/man2/timerfd_create.2:24 build/C/man2/tkill.2:32 build/C/man2/wait.2:53 build/C/man2/wait4.2:37
50 #, no-wrap
51 msgid "SYNOPSIS"
52 msgstr ""
53
54 #. type: Plain text
55 #: build/C/man3/bsd_signal.3:28
56 msgid "B<#define _XOPEN_SOURCE> /* See feature_test_macros(7) */"
57 msgstr ""
58
59 #. type: Plain text
60 #: build/C/man3/bsd_signal.3:30 build/C/man2/killpg.2:45 build/C/man2/sigaltstack.2:30 build/C/man2/signal.2:39 build/C/man2/sigpending.2:32 build/C/man2/sigprocmask.2:32 build/C/man3/sigqueue.3:31 build/C/man3/sigset.3:29 build/C/man3/sigsetops.3:35 build/C/man2/sigsuspend.2:32 build/C/man3/sigvec.3:29 build/C/man3/sysv_signal.3:30
61 msgid "B<#include E<lt>signal.hE<gt>>"
62 msgstr ""
63
64 #. type: Plain text
65 #: build/C/man3/bsd_signal.3:32 build/C/man2/signal.2:41 build/C/man3/sigset.3:31 build/C/man3/sysv_signal.3:32
66 msgid "B<typedef void (*sighandler_t)(int);>"
67 msgstr ""
68
69 #. type: Plain text
70 #: build/C/man3/bsd_signal.3:34
71 msgid "B<sighandler_t bsd_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
72 msgstr ""
73
74 #. type: SH
75 #: build/C/man3/bsd_signal.3:34 build/C/man2/eventfd.2:28 build/C/man2/getitimer.2:19 build/C/man3/gsignal.3:47 build/C/man2/kill.2:65 build/C/man2/killpg.2:59 build/C/man2/pause.2:37 build/C/man2/prctl.2:56 build/C/man3/profil.3:44 build/C/man3/psignal.3:54 build/C/man3/raise.3:36 build/C/man2/rt_sigqueueinfo.2:33 build/C/man2/sgetmask.2:31 build/C/man2/sigaction.2:65 build/C/man2/sigaltstack.2:49 build/C/man7/sigevent.7:50 build/C/man3/siginterrupt.3:53 build/C/man2/signal.2:43 build/C/man7/signal.7:47 build/C/man2/signalfd.2:26 build/C/man3/sigpause.3:34 build/C/man2/sigpending.2:44 build/C/man2/sigprocmask.2:45 build/C/man3/sigqueue.3:41 build/C/man2/sigreturn.2:32 build/C/man3/sigset.3:56 build/C/man3/sigsetops.3:61 build/C/man2/sigsuspend.2:44 build/C/man3/sigvec.3:47 build/C/man3/sigwait.3:43 build/C/man2/sigwaitinfo.2:44 build/C/man3/sysv_signal.3:34 build/C/man2/timer_create.2:50 build/C/man2/timer_delete.2:42 build/C/man2/timer_getoverrun.2:42 build/C/man2/timer_settime.2:47 build/C/man2/timerfd_create.2:36 build/C/man2/tkill.2:38 build/C/man2/wait.2:82 build/C/man2/wait4.2:68
76 #, no-wrap
77 msgid "DESCRIPTION"
78 msgstr ""
79
80 #. type: Plain text
81 #: build/C/man3/bsd_signal.3:39
82 msgid ""
83 "The B<bsd_signal>()  function takes the same arguments, and performs the "
84 "same task, as B<signal>(2)."
85 msgstr ""
86
87 #. type: Plain text
88 #: build/C/man3/bsd_signal.3:52
89 msgid ""
90 "The difference between the two is that B<bsd_signal>()  is guaranteed to "
91 "provide reliable signal semantics, that is: a) the disposition of the signal "
92 "is not reset to the default when the handler is invoked; b) delivery of "
93 "further instances of the signal is blocked while the signal handler is "
94 "executing; and c) if the handler interrupts a blocking system call, then the "
95 "system call is automatically restarted.  A portable application cannot rely "
96 "on B<signal>(2)  to provide these guarantees."
97 msgstr ""
98
99 #. type: SH
100 #: build/C/man3/bsd_signal.3:52 build/C/man2/eventfd.2:222 build/C/man2/getitimer.2:117 build/C/man2/kill.2:99 build/C/man2/killpg.2:88 build/C/man2/pause.2:42 build/C/man2/prctl.2:515 build/C/man3/profil.3:66 build/C/man3/psignal.3:87 build/C/man3/raise.3:59 build/C/man2/rt_sigqueueinfo.2:124 build/C/man2/sgetmask.2:54 build/C/man2/sigaction.2:658 build/C/man2/sigaltstack.2:131 build/C/man3/siginterrupt.3:71 build/C/man2/signal.2:95 build/C/man2/signalfd.2:248 build/C/man3/sigpause.3:46 build/C/man2/sigpending.2:51 build/C/man2/sigprocmask.2:91 build/C/man3/sigqueue.3:81 build/C/man2/sigreturn.2:51 build/C/man3/sigset.3:127 build/C/man3/sigsetops.3:105 build/C/man2/sigsuspend.2:68 build/C/man3/sigvec.3:197 build/C/man3/sigwait.3:66 build/C/man2/sigwaitinfo.2:98 build/C/man3/sysv_signal.3:49 build/C/man2/timer_create.2:165 build/C/man2/timer_delete.2:50 build/C/man2/timer_getoverrun.2:79 build/C/man2/timer_settime.2:169 build/C/man2/timerfd_create.2:286 build/C/man2/tkill.2:69 build/C/man2/wait.2:354 build/C/man2/wait4.2:127
101 #, no-wrap
102 msgid "RETURN VALUE"
103 msgstr ""
104
105 #. type: Plain text
106 #: build/C/man3/bsd_signal.3:58
107 msgid ""
108 "The B<bsd_signal>()  function returns the previous value of the signal "
109 "handler, or B<SIG_ERR> on error."
110 msgstr ""
111
112 #. type: SH
113 #: build/C/man3/bsd_signal.3:58 build/C/man2/eventfd.2:229 build/C/man2/getitimer.2:122 build/C/man2/kill.2:104 build/C/man2/killpg.2:93 build/C/man2/pause.2:53 build/C/man2/prctl.2:532 build/C/man2/rt_sigqueueinfo.2:129 build/C/man2/sgetmask.2:59 build/C/man2/sigaction.2:661 build/C/man2/sigaltstack.2:135 build/C/man3/siginterrupt.3:76 build/C/man2/signal.2:100 build/C/man2/signalfd.2:262 build/C/man2/sigpending.2:54 build/C/man2/sigprocmask.2:94 build/C/man3/sigqueue.3:89 build/C/man3/sigset.3:152 build/C/man3/sigsetops.3:121 build/C/man2/sigsuspend.2:72 build/C/man3/sigvec.3:214 build/C/man3/sigwait.3:71 build/C/man2/sigwaitinfo.2:107 build/C/man3/sysv_signal.3:55 build/C/man2/timer_create.2:173 build/C/man2/timer_delete.2:57 build/C/man2/timer_getoverrun.2:87 build/C/man2/timer_settime.2:178 build/C/man2/timerfd_create.2:301 build/C/man2/tkill.2:73 build/C/man2/wait.2:383 build/C/man2/wait4.2:130
114 #, no-wrap
115 msgid "ERRORS"
116 msgstr ""
117
118 #. type: Plain text
119 #: build/C/man3/bsd_signal.3:61 build/C/man3/sysv_signal.3:58
120 msgid "As for B<signal>(2)."
121 msgstr ""
122
123 #. type: SH
124 #: build/C/man3/bsd_signal.3:61 build/C/man2/eventfd.2:266 build/C/man2/getitimer.2:143 build/C/man3/gsignal.3:93 build/C/man2/kill.2:120 build/C/man2/killpg.2:110 build/C/man2/pause.2:57 build/C/man2/prctl.2:694 build/C/man3/profil.3:68 build/C/man3/psignal.3:97 build/C/man3/raise.3:62 build/C/man2/rt_sigqueueinfo.2:171 build/C/man2/sgetmask.2:61 build/C/man2/sigaction.2:673 build/C/man2/sigaltstack.2:154 build/C/man7/sigevent.7:128 build/C/man3/siginterrupt.3:80 build/C/man2/signal.2:105 build/C/man7/signal.7:834 build/C/man2/signalfd.2:304 build/C/man3/sigpause.3:54 build/C/man2/sigpending.2:59 build/C/man2/sigprocmask.2:107 build/C/man3/sigqueue.3:112 build/C/man2/sigreturn.2:58 build/C/man3/sigset.3:171 build/C/man3/sigsetops.3:126 build/C/man2/sigsuspend.2:80 build/C/man3/sigvec.3:219 build/C/man3/sigwait.3:77 build/C/man2/sigwaitinfo.2:126 build/C/man3/sysv_signal.3:58 build/C/man2/timer_create.2:191 build/C/man2/timer_delete.2:64 build/C/man2/timer_getoverrun.2:94 build/C/man2/timer_settime.2:203 build/C/man2/timerfd_create.2:370 build/C/man2/tkill.2:90 build/C/man2/wait.2:421 build/C/man2/wait4.2:133
125 #, no-wrap
126 msgid "CONFORMING TO"
127 msgstr ""
128
129 #. type: Plain text
130 #: build/C/man3/bsd_signal.3:68
131 msgid ""
132 "4.2BSD, POSIX.1-2001.  POSIX.1-2008 removes the specification of "
133 "B<bsd_signal>(), recommending the use of B<sigaction>(2)  instead."
134 msgstr ""
135
136 #. type: SH
137 #: build/C/man3/bsd_signal.3:68 build/C/man2/eventfd.2:271 build/C/man2/getitimer.2:153 build/C/man2/kill.2:122 build/C/man2/killpg.2:114 build/C/man2/rt_sigqueueinfo.2:173 build/C/man2/sgetmask.2:63 build/C/man2/sigaction.2:676 build/C/man2/sigaltstack.2:156 build/C/man2/signal.2:107 build/C/man2/signalfd.2:309 build/C/man3/sigpause.3:58 build/C/man2/sigpending.2:61 build/C/man2/sigprocmask.2:109 build/C/man3/sigqueue.3:114 build/C/man2/sigreturn.2:62 build/C/man3/sigset.3:188 build/C/man3/sigsetops.3:128 build/C/man2/sigsuspend.2:82 build/C/man3/sigvec.3:225 build/C/man3/sigwait.3:79 build/C/man2/sigwaitinfo.2:128 build/C/man3/sysv_signal.3:60 build/C/man2/timer_create.2:193 build/C/man2/timer_getoverrun.2:96 build/C/man2/tkill.2:96 build/C/man2/wait.2:423 build/C/man2/wait4.2:135
138 #, no-wrap
139 msgid "NOTES"
140 msgstr ""
141
142 #. type: Plain text
143 #: build/C/man3/bsd_signal.3:74
144 msgid "Use of B<bsd_signal>()  should be avoided; use B<sigaction>(2)  instead."
145 msgstr ""
146
147 #. type: Plain text
148 #: build/C/man3/bsd_signal.3:85
149 msgid ""
150 "On modern Linux systems, B<bsd_signal>()  and B<signal>(2)  are equivalent.  "
151 "But on older systems, B<signal>(2)  provided unreliable signal semantics; "
152 "see B<signal>(2)  for details."
153 msgstr ""
154
155 #. type: Plain text
156 #: build/C/man3/bsd_signal.3:92 build/C/man3/sysv_signal.3:85
157 msgid ""
158 "The use of I<sighandler_t> is a GNU extension; this type is only defined if "
159 "the B<_GNU_SOURCE> feature test macro is defined."
160 msgstr ""
161
162 #. type: SH
163 #: build/C/man3/bsd_signal.3:92 build/C/man2/eventfd.2:417 build/C/man2/getitimer.2:219 build/C/man3/gsignal.3:101 build/C/man2/kill.2:170 build/C/man2/killpg.2:133 build/C/man2/pause.2:59 build/C/man2/prctl.2:708 build/C/man3/profil.3:79 build/C/man3/psignal.3:111 build/C/man3/raise.3:64 build/C/man2/rt_sigqueueinfo.2:183 build/C/man2/sgetmask.2:74 build/C/man2/sigaction.2:789 build/C/man2/sigaltstack.2:230 build/C/man7/sigevent.7:130 build/C/man3/siginterrupt.3:89 build/C/man2/signal.2:259 build/C/man7/signal.7:845 build/C/man2/signalfd.2:430 build/C/man3/sigpause.3:96 build/C/man2/sigpending.2:82 build/C/man2/sigprocmask.2:139 build/C/man3/sigqueue.3:147 build/C/man2/sigreturn.2:72 build/C/man3/sigset.3:264 build/C/man3/sigsetops.3:166 build/C/man2/sigsuspend.2:104 build/C/man3/sigvec.3:250 build/C/man3/sigwait.3:86 build/C/man2/sigwaitinfo.2:179 build/C/man3/sysv_signal.3:85 build/C/man2/timer_create.2:397 build/C/man2/timer_delete.2:66 build/C/man2/timer_getoverrun.2:128 build/C/man2/timer_settime.2:208 build/C/man2/timerfd_create.2:540 build/C/man2/tkill.2:105 build/C/man2/wait.2:605 build/C/man2/wait4.2:153
164 #, no-wrap
165 msgid "SEE ALSO"
166 msgstr ""
167
168 #. type: Plain text
169 #: build/C/man3/bsd_signal.3:96
170 msgid "B<sigaction>(2), B<signal>(2), B<sysv_signal>(3), B<signal>(7)"
171 msgstr ""
172
173 #. type: TH
174 #: build/C/man2/eventfd.2:21
175 #, no-wrap
176 msgid "EVENTFD"
177 msgstr ""
178
179 #. type: TH
180 #: build/C/man2/eventfd.2:21
181 #, no-wrap
182 msgid "2010-08-30"
183 msgstr ""
184
185 #. type: TH
186 #: build/C/man2/eventfd.2:21 build/C/man2/getitimer.2:7 build/C/man2/kill.2:44 build/C/man2/killpg.2:40 build/C/man2/pause.2:30 build/C/man2/prctl.2:46 build/C/man3/profil.3:28 build/C/man2/rt_sigqueueinfo.2:23 build/C/man2/sgetmask.2:24 build/C/man2/sigaction.2:45 build/C/man2/sigaltstack.2:25 build/C/man2/signal.2:34 build/C/man7/signal.7:44 build/C/man2/signalfd.2:19 build/C/man3/sigpause.3:23 build/C/man2/sigpending.2:27 build/C/man2/sigprocmask.2:27 build/C/man3/sigqueue.3:26 build/C/man2/sigreturn.2:27 build/C/man3/sigset.3:24 build/C/man3/sigsetops.3:29 build/C/man2/sigsuspend.2:27 build/C/man3/sigvec.3:24 build/C/man3/sigwait.3:24 build/C/man2/sigwaitinfo.2:23 build/C/man2/timer_create.2:29 build/C/man2/timer_delete.2:23 build/C/man2/timer_getoverrun.2:23 build/C/man2/timer_settime.2:23 build/C/man2/timerfd_create.2:20 build/C/man2/tkill.2:29 build/C/man2/wait.2:50 build/C/man2/wait4.2:34
187 #, no-wrap
188 msgid "Linux"
189 msgstr ""
190
191 #. type: Plain text
192 #: build/C/man2/eventfd.2:24
193 msgid "eventfd - create a file descriptor for event notification"
194 msgstr ""
195
196 #. type: Plain text
197 #: build/C/man2/eventfd.2:26
198 msgid "B<#include E<lt>sys/eventfd.hE<gt>>"
199 msgstr ""
200
201 #. type: Plain text
202 #: build/C/man2/eventfd.2:28
203 msgid "B<int eventfd(unsigned int >I<initval>B<, int >I<flags>B<);>"
204 msgstr ""
205
206 #. type: Plain text
207 #: build/C/man2/eventfd.2:38
208 msgid ""
209 "B<eventfd>()  creates an \"eventfd object\" that can be used as an event "
210 "wait/notify mechanism by userspace applications, and by the kernel to notify "
211 "userspace applications of events.  The object contains an unsigned 64-bit "
212 "integer (I<uint64_t>)  counter that is maintained by the kernel.  This "
213 "counter is initialized with the value specified in the argument I<initval>."
214 msgstr ""
215
216 #. type: Plain text
217 #: build/C/man2/eventfd.2:43
218 msgid ""
219 "The following values may be bitwise ORed in I<flags> to change the behaviour "
220 "of B<eventfd>():"
221 msgstr ""
222
223 #. type: TP
224 #: build/C/man2/eventfd.2:43
225 #, no-wrap
226 msgid "B<EFD_CLOEXEC> (since Linux 2.6.27)"
227 msgstr ""
228
229 #. type: Plain text
230 #: build/C/man2/eventfd.2:53 build/C/man2/signalfd.2:94 build/C/man2/timerfd_create.2:102
231 msgid ""
232 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See "
233 "the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this "
234 "may be useful."
235 msgstr ""
236
237 #. type: TP
238 #: build/C/man2/eventfd.2:53
239 #, no-wrap
240 msgid "B<EFD_NONBLOCK> (since Linux 2.6.27)"
241 msgstr ""
242
243 #. type: Plain text
244 #: build/C/man2/eventfd.2:61 build/C/man2/signalfd.2:84 build/C/man2/timerfd_create.2:92
245 msgid ""
246 "Set the B<O_NONBLOCK> file status flag on the new open file description.  "
247 "Using this flag saves extra calls to B<fcntl>(2)  to achieve the same "
248 "result."
249 msgstr ""
250
251 #. type: TP
252 #: build/C/man2/eventfd.2:61
253 #, no-wrap
254 msgid "B<EFD_SEMAPHORE> (since Linux 2.6.30)"
255 msgstr ""
256
257 #. type: Plain text
258 #: build/C/man2/eventfd.2:65
259 msgid ""
260 "Provide semaphore-like semantics for reads from the new file descriptor.  "
261 "See below."
262 msgstr ""
263
264 #. type: Plain text
265 #: build/C/man2/eventfd.2:69 build/C/man2/signalfd.2:98
266 msgid ""
267 "In Linux up to version 2.6.26, the I<flags> argument is unused, and must be "
268 "specified as zero."
269 msgstr ""
270
271 #. type: Plain text
272 #: build/C/man2/eventfd.2:75
273 msgid ""
274 "As its return value, B<eventfd>()  returns a new file descriptor that can be "
275 "used to refer to the eventfd object.  The following operations can be "
276 "performed on the file descriptor:"
277 msgstr ""
278
279 #. type: TP
280 #: build/C/man2/eventfd.2:75 build/C/man2/signalfd.2:101 build/C/man2/timerfd_create.2:210
281 #, no-wrap
282 msgid "B<read>(2)"
283 msgstr ""
284
285 #. type: Plain text
286 #: build/C/man2/eventfd.2:85
287 msgid ""
288 "Each successful B<read>(2)  returns an 8-byte integer.  A B<read>(2)  will "
289 "fail with the error B<EINVAL> if the size of the supplied buffer is less "
290 "than 8 bytes."
291 msgstr ""
292
293 #. type: Plain text
294 #: build/C/man2/eventfd.2:90
295 msgid ""
296 "The value returned by B<read>(2)  is in host byte order, i.e., the native "
297 "byte order for integers on the host machine."
298 msgstr ""
299
300 #. type: Plain text
301 #: build/C/man2/eventfd.2:97
302 msgid ""
303 "The semantics of B<read>(2)  depend on whether the eventfd counter currently "
304 "has a nonzero value and whether the B<EFD_SEMAPHORE> flag was specified when "
305 "creating the eventfd file descriptor:"
306 msgstr ""
307
308 #. type: IP
309 #: build/C/man2/eventfd.2:98 build/C/man2/eventfd.2:105 build/C/man2/eventfd.2:112 build/C/man2/eventfd.2:157 build/C/man2/eventfd.2:167 build/C/man2/eventfd.2:177 build/C/man2/prctl.2:575 build/C/man2/prctl.2:580 build/C/man2/prctl.2:585 build/C/man2/prctl.2:595 build/C/man3/psignal.3:103 build/C/man3/psignal.3:107 build/C/man2/sigaction.2:294 build/C/man2/sigaction.2:309 build/C/man2/sigaction.2:325 build/C/man2/sigaction.2:340 build/C/man2/sigaction.2:387 build/C/man2/sigaction.2:423 build/C/man2/signal.2:66 build/C/man2/signal.2:71 build/C/man2/signal.2:78 build/C/man2/signal.2:205 build/C/man2/signal.2:209 build/C/man2/signal.2:248 build/C/man7/signal.7:147 build/C/man7/signal.7:155 build/C/man7/signal.7:611 build/C/man7/signal.7:613 build/C/man7/signal.7:634 build/C/man7/signal.7:649 build/C/man7/signal.7:653 build/C/man7/signal.7:660 build/C/man7/signal.7:676 build/C/man7/signal.7:682 build/C/man7/signal.7:689 build/C/man7/signal.7:694 build/C/man7/signal.7:713 build/C/man7/signal.7:732 build/C/man7/signal.7:739 build/C/man7/signal.7:748 build/C/man7/signal.7:756 build/C/man7/signal.7:762 build/C/man7/signal.7:767 build/C/man7/signal.7:787 build/C/man7/signal.7:806 build/C/man7/signal.7:809 build/C/man7/signal.7:812 build/C/man7/signal.7:815 build/C/man7/signal.7:820 build/C/man7/signal.7:826 build/C/man7/signal.7:830 build/C/man3/sigwait.3:59 build/C/man3/sigwait.3:64 build/C/man2/timer_create.2:214 build/C/man2/timer_create.2:217 build/C/man2/timer_create.2:220 build/C/man2/timer_create.2:224 build/C/man2/timer_create.2:227 build/C/man2/timer_create.2:233 build/C/man2/timer_create.2:237
310 #, no-wrap
311 msgid "*"
312 msgstr ""
313
314 #. type: Plain text
315 #: build/C/man2/eventfd.2:105
316 msgid ""
317 "If B<EFD_SEMAPHORE> was not specified and the eventfd counter has a nonzero "
318 "value, then a B<read>(2)  returns 8 bytes containing that value, and the "
319 "counter's value is reset to zero."
320 msgstr ""
321
322 #. type: Plain text
323 #: build/C/man2/eventfd.2:112
324 msgid ""
325 "If B<EFD_SEMAPHORE> was specified and the eventfd counter has a nonzero "
326 "value, then a B<read>(2)  returns 8 bytes containing the value 1, and the "
327 "counter's value is decremented by 1."
328 msgstr ""
329
330 #. type: Plain text
331 #: build/C/man2/eventfd.2:122
332 msgid ""
333 "If the eventfd counter is zero at the time of the call to B<read>(2), then "
334 "the call either blocks until the counter becomes nonzero (at which time, the "
335 "B<read>(2)  proceeds as described above)  or fails with the error B<EAGAIN> "
336 "if the file descriptor has been made nonblocking."
337 msgstr ""
338
339 #. type: TP
340 #: build/C/man2/eventfd.2:123
341 #, no-wrap
342 msgid "B<write>(2)"
343 msgstr ""
344
345 #. type: Plain text
346 #: build/C/man2/eventfd.2:140
347 msgid ""
348 "A B<write>(2)  call adds the 8-byte integer value supplied in its buffer to "
349 "the counter.  The maximum value that may be stored in the counter is the "
350 "largest unsigned 64-bit value minus 1 (i.e., 0xfffffffffffffffe).  If the "
351 "addition would cause the counter's value to exceed the maximum, then the "
352 "B<write>(2)  either blocks until a B<read>(2)  is performed on the file "
353 "descriptor, or fails with the error B<EAGAIN> if the file descriptor has "
354 "been made nonblocking."
355 msgstr ""
356
357 #. type: Plain text
358 #: build/C/man2/eventfd.2:147
359 msgid ""
360 "A B<write>(2)  will fail with the error B<EINVAL> if the size of the "
361 "supplied buffer is less than 8 bytes, or if an attempt is made to write the "
362 "value 0xffffffffffffffff."
363 msgstr ""
364
365 #. type: TP
366 #: build/C/man2/eventfd.2:147 build/C/man2/signalfd.2:139 build/C/man2/timerfd_create.2:243
367 #, no-wrap
368 msgid "B<poll>(2), B<select>(2) (and similar)"
369 msgstr ""
370
371 #. type: Plain text
372 #: build/C/man2/eventfd.2:156
373 msgid ""
374 "The returned file descriptor supports B<poll>(2)  (and analogously "
375 "B<epoll>(7))  and B<select>(2), as follows:"
376 msgstr ""
377
378 #. type: Plain text
379 #: build/C/man2/eventfd.2:167
380 msgid ""
381 "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the "
382 "B<poll>(2)  B<POLLIN> flag)  if the counter has a value greater than 0."
383 msgstr ""
384
385 #. type: Plain text
386 #: build/C/man2/eventfd.2:177
387 msgid ""
388 "The file descriptor is writable (the B<select>(2)  I<writefds> argument; the "
389 "B<poll>(2)  B<POLLOUT> flag)  if it is possible to write a value of at least "
390 "\"1\" without blocking."
391 msgstr ""
392
393 #. type: Plain text
394 #: build/C/man2/eventfd.2:197
395 msgid ""
396 "If an overflow of the counter value was detected, then B<select>(2)  "
397 "indicates the file descriptor as being both readable and writable, and "
398 "B<poll>(2)  returns a B<POLLERR> event.  As noted above, B<write>(2)  can "
399 "never overflow the counter.  However an overflow can occur if 2^64 eventfd "
400 "\"signal posts\" were performed by the KAIO subsystem (theoretically "
401 "possible, but practically unlikely).  If an overflow has occurred, then "
402 "B<read>(2)  will return that maximum I<uint64_t> value (i.e., "
403 "0xffffffffffffffff)."
404 msgstr ""
405
406 #. type: Plain text
407 #: build/C/man2/eventfd.2:205
408 msgid ""
409 "The eventfd file descriptor also supports the other file-descriptor "
410 "multiplexing APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
411 msgstr ""
412
413 #. type: TP
414 #: build/C/man2/eventfd.2:205 build/C/man2/signalfd.2:159 build/C/man2/timerfd_create.2:261
415 #, no-wrap
416 msgid "B<close>(2)"
417 msgstr ""
418
419 #. type: Plain text
420 #: build/C/man2/eventfd.2:210
421 msgid ""
422 "When the file descriptor is no longer required it should be closed.  When "
423 "all file descriptors associated with the same eventfd object have been "
424 "closed, the resources for object are freed by the kernel."
425 msgstr ""
426
427 #. type: Plain text
428 #: build/C/man2/eventfd.2:222
429 msgid ""
430 "A copy of the file descriptor created by B<eventfd>()  is inherited by the "
431 "child produced by B<fork>(2).  The duplicate file descriptor is associated "
432 "with the same eventfd object.  File descriptors created by B<eventfd>()  are "
433 "preserved across B<execve>(2), unless the close-on-exec flag has been set."
434 msgstr ""
435
436 #. type: Plain text
437 #: build/C/man2/eventfd.2:229
438 msgid ""
439 "On success, B<eventfd>()  returns a new eventfd file descriptor.  On error, "
440 "-1 is returned and I<errno> is set to indicate the error."
441 msgstr ""
442
443 #. type: TP
444 #: build/C/man2/eventfd.2:230 build/C/man2/getitimer.2:130 build/C/man2/kill.2:105 build/C/man2/killpg.2:94 build/C/man2/prctl.2:537 build/C/man2/prctl.2:542 build/C/man2/prctl.2:554 build/C/man2/prctl.2:559 build/C/man2/prctl.2:568 build/C/man2/rt_sigqueueinfo.2:136 build/C/man2/sigaction.2:666 build/C/man2/sigaltstack.2:140 build/C/man3/siginterrupt.3:77 build/C/man2/signal.2:101 build/C/man2/signalfd.2:268 build/C/man2/signalfd.2:276 build/C/man2/sigprocmask.2:102 build/C/man3/sigqueue.3:96 build/C/man3/sigsetops.3:122 build/C/man3/sigwait.3:72 build/C/man2/sigwaitinfo.2:122 build/C/man2/timer_create.2:177 build/C/man2/timer_delete.2:58 build/C/man2/timer_getoverrun.2:88 build/C/man2/timer_settime.2:187 build/C/man2/timer_settime.2:195 build/C/man2/timerfd_create.2:304 build/C/man2/timerfd_create.2:312 build/C/man2/timerfd_create.2:348 build/C/man2/timerfd_create.2:355 build/C/man2/timerfd_create.2:361 build/C/man2/tkill.2:74 build/C/man2/wait.2:416
445 #, no-wrap
446 msgid "B<EINVAL>"
447 msgstr ""
448
449 #. type: Plain text
450 #: build/C/man2/eventfd.2:234
451 msgid "An unsupported value was specified in I<flags>."
452 msgstr ""
453
454 #. type: TP
455 #: build/C/man2/eventfd.2:234 build/C/man2/signalfd.2:283 build/C/man2/timerfd_create.2:319
456 #, no-wrap
457 msgid "B<EMFILE>"
458 msgstr ""
459
460 #. type: Plain text
461 #: build/C/man2/eventfd.2:237
462 msgid "The per-process limit on open file descriptors has been reached."
463 msgstr ""
464
465 #. type: TP
466 #: build/C/man2/eventfd.2:237 build/C/man2/signalfd.2:286 build/C/man2/timerfd_create.2:322
467 #, no-wrap
468 msgid "B<ENFILE>"
469 msgstr ""
470
471 #. type: Plain text
472 #: build/C/man2/eventfd.2:241 build/C/man2/signalfd.2:290 build/C/man2/timerfd_create.2:326
473 msgid "The system-wide limit on the total number of open files has been reached."
474 msgstr ""
475
476 #. type: TP
477 #: build/C/man2/eventfd.2:241 build/C/man2/signalfd.2:290 build/C/man2/timerfd_create.2:326
478 #, no-wrap
479 msgid "B<ENODEV>"
480 msgstr ""
481
482 #. type: Plain text
483 #: build/C/man2/eventfd.2:249 build/C/man2/signalfd.2:293 build/C/man2/timerfd_create.2:329
484 msgid "Could not mount (internal) anonymous inode device."
485 msgstr ""
486
487 #. type: TP
488 #: build/C/man2/eventfd.2:249 build/C/man2/sigaltstack.2:145 build/C/man2/signalfd.2:293 build/C/man2/timer_create.2:185 build/C/man2/timerfd_create.2:329
489 #, no-wrap
490 msgid "B<ENOMEM>"
491 msgstr ""
492
493 #. type: Plain text
494 #: build/C/man2/eventfd.2:253
495 msgid "There was insufficient memory to create a new eventfd file descriptor."
496 msgstr ""
497
498 #. type: SH
499 #: build/C/man2/eventfd.2:253 build/C/man2/prctl.2:689 build/C/man3/psignal.3:93 build/C/man2/rt_sigqueueinfo.2:164 build/C/man2/signalfd.2:296 build/C/man3/sigqueue.3:110 build/C/man2/timer_create.2:189 build/C/man2/timer_delete.2:62 build/C/man2/timer_getoverrun.2:92 build/C/man2/timer_settime.2:201 build/C/man2/timerfd_create.2:367 build/C/man2/tkill.2:85
500 #, no-wrap
501 msgid "VERSIONS"
502 msgstr ""
503
504 #.  eventfd() is in glibc 2.7, but reportedly does not build
505 #. type: Plain text
506 #: build/C/man2/eventfd.2:266
507 msgid ""
508 "B<eventfd>()  is available on Linux since kernel 2.6.22.  Working support is "
509 "provided in glibc since version 2.8.  The B<eventfd2>()  system call (see "
510 "NOTES) is available on Linux since kernel 2.6.27.  Since version 2.9, the "
511 "glibc B<eventfd>()  wrapper will employ the B<eventfd2>()  system call, if "
512 "it is supported by the kernel."
513 msgstr ""
514
515 #. type: Plain text
516 #: build/C/man2/eventfd.2:271
517 msgid "B<eventfd>()  and B<eventfd2>()  are Linux-specific."
518 msgstr ""
519
520 #. type: Plain text
521 #: build/C/man2/eventfd.2:279
522 msgid ""
523 "Applications can use an eventfd file descriptor instead of a pipe (see "
524 "B<pipe>(2))  in all cases where a pipe is used simply to signal events.  The "
525 "kernel overhead of an eventfd file descriptor is much lower than that of a "
526 "pipe, and only one file descriptor is required (versus the two required for "
527 "a pipe)."
528 msgstr ""
529
530 #.  or eventually syslets/threadlets
531 #. type: Plain text
532 #: build/C/man2/eventfd.2:285
533 msgid ""
534 "When used in the kernel, an eventfd file descriptor can provide a "
535 "kernel-userspace bridge allowing, for example, functionalities like KAIO "
536 "(kernel AIO)  to signal to a file descriptor that some operation is "
537 "complete."
538 msgstr ""
539
540 #. type: Plain text
541 #: build/C/man2/eventfd.2:302
542 msgid ""
543 "A key point about an eventfd file descriptor is that it can be monitored "
544 "just like any other file descriptor using B<select>(2), B<poll>(2), or "
545 "B<epoll>(7).  This means that an application can simultaneously monitor the "
546 "readiness of \"traditional\" files and the readiness of other kernel "
547 "mechanisms that support the eventfd interface.  (Without the B<eventfd>()  "
548 "interface, these mechanisms could not be multiplexed via B<select>(2), "
549 "B<poll>(2), or B<epoll>(7).)"
550 msgstr ""
551
552 #. type: SS
553 #: build/C/man2/eventfd.2:302 build/C/man2/signalfd.2:333
554 #, no-wrap
555 msgid "Underlying Linux system calls"
556 msgstr ""
557
558 #. type: Plain text
559 #: build/C/man2/eventfd.2:316
560 msgid ""
561 "There are two underlying Linux system calls: B<eventfd>()  and the more "
562 "recent B<eventfd2>().  The former system call does not implement a I<flags> "
563 "argument.  The latter system call implements the I<flags> values described "
564 "above.  The glibc wrapper function will use B<eventfd2>()  where it is "
565 "available."
566 msgstr ""
567
568 #. type: SS
569 #: build/C/man2/eventfd.2:316
570 #, no-wrap
571 msgid "Additional glibc features"
572 msgstr ""
573
574 #. type: Plain text
575 #: build/C/man2/eventfd.2:320
576 msgid ""
577 "The GNU C library defines an additional type, and two functions that attempt "
578 "to abstract some of the details of reading and writing on an eventfd file "
579 "descriptor:"
580 msgstr ""
581
582 #. type: Plain text
583 #: build/C/man2/eventfd.2:324
584 #, no-wrap
585 msgid "typedef uint64_t eventfd_t;\n"
586 msgstr ""
587
588 #. type: Plain text
589 #: build/C/man2/eventfd.2:327
590 #, no-wrap
591 msgid ""
592 "int eventfd_read(int fd, eventfd_t *value);\n"
593 "int eventfd_write(int fd, eventfd_t value);\n"
594 msgstr ""
595
596 #. type: Plain text
597 #: build/C/man2/eventfd.2:334
598 msgid ""
599 "The functions perform the read and write operations on an eventfd file "
600 "descriptor, returning 0 if the correct number of bytes was transferred, or "
601 "-1 otherwise."
602 msgstr ""
603
604 #. type: SH
605 #: build/C/man2/eventfd.2:334 build/C/man2/sigaction.2:786 build/C/man2/sigaltstack.2:213 build/C/man2/signalfd.2:357 build/C/man3/sigwait.3:83 build/C/man2/timer_create.2:251 build/C/man2/timer_getoverrun.2:125 build/C/man2/timer_settime.2:205 build/C/man2/timerfd_create.2:372 build/C/man2/wait.2:522
606 #, no-wrap
607 msgid "EXAMPLE"
608 msgstr ""
609
610 #. type: Plain text
611 #: build/C/man2/eventfd.2:343
612 msgid ""
613 "The following program creates an eventfd file descriptor and then forks to "
614 "create a child process.  While the parent briefly sleeps, the child writes "
615 "each of the integers supplied in the program's command-line arguments to the "
616 "eventfd file descriptor.  When the parent has finished sleeping, it reads "
617 "from the eventfd file descriptor."
618 msgstr ""
619
620 #. type: Plain text
621 #: build/C/man2/eventfd.2:345
622 msgid "The following shell session shows a sample run of the program:"
623 msgstr ""
624
625 #. type: Plain text
626 #: build/C/man2/eventfd.2:357
627 #, no-wrap
628 msgid ""
629 "$B< ./a.out 1 2 4 7 14>\n"
630 "Child writing 1 to efd\n"
631 "Child writing 2 to efd\n"
632 "Child writing 4 to efd\n"
633 "Child writing 7 to efd\n"
634 "Child writing 14 to efd\n"
635 "Child completed write loop\n"
636 "Parent about to read\n"
637 "Parent read 28 (0x1c) from efd\n"
638 msgstr ""
639
640 #. type: SS
641 #: build/C/man2/eventfd.2:359 build/C/man2/signalfd.2:380 build/C/man2/timerfd_create.2:400 build/C/man2/wait.2:557
642 #, no-wrap
643 msgid "Program source"
644 msgstr ""
645
646 #. type: Plain text
647 #: build/C/man2/eventfd.2:367
648 #, no-wrap
649 msgid ""
650 "#include E<lt>sys/eventfd.hE<gt>\n"
651 "#include E<lt>unistd.hE<gt>\n"
652 "#include E<lt>stdlib.hE<gt>\n"
653 "#include E<lt>stdio.hE<gt>\n"
654 "#include E<lt>stdint.hE<gt>             /* Definition of uint64_t */\n"
655 msgstr ""
656
657 #. type: Plain text
658 #: build/C/man2/eventfd.2:370 build/C/man2/signalfd.2:391
659 #, no-wrap
660 msgid ""
661 "#define handle_error(msg) \\e\n"
662 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
663 msgstr ""
664
665 #. type: Plain text
666 #: build/C/man2/eventfd.2:377
667 #, no-wrap
668 msgid ""
669 "int\n"
670 "main(int argc, char *argv[])\n"
671 "{\n"
672 "    int efd, j;\n"
673 "    uint64_t u;\n"
674 "    ssize_t s;\n"
675 msgstr ""
676
677 #. type: Plain text
678 #: build/C/man2/eventfd.2:382
679 #, no-wrap
680 msgid ""
681 "    if (argc E<lt> 2) {\n"
682 "        fprintf(stderr, \"Usage: %s E<lt>numE<gt>...\\en\", argv[0]);\n"
683 "        exit(EXIT_FAILURE);\n"
684 "    }\n"
685 msgstr ""
686
687 #. type: Plain text
688 #: build/C/man2/eventfd.2:386
689 #, no-wrap
690 msgid ""
691 "    efd = eventfd(0, 0);\n"
692 "    if (efd == -1)\n"
693 "        handle_error(\"eventfd\");\n"
694 msgstr ""
695
696 #. type: Plain text
697 #: build/C/man2/eventfd.2:398
698 #, no-wrap
699 msgid ""
700 "    switch (fork()) {\n"
701 "    case 0:\n"
702 "        for (j = 1; j E<lt> argc; j++) {\n"
703 "            printf(\"Child writing %s to efd\\en\", argv[j]);\n"
704 "            u = strtoull(argv[j], NULL, 0);\n"
705 "                    /* strtoull() allows various bases */\n"
706 "            s = write(efd, &u, sizeof(uint64_t));\n"
707 "            if (s != sizeof(uint64_t))\n"
708 "                handle_error(\"write\");\n"
709 "        }\n"
710 "        printf(\"Child completed write loop\\en\");\n"
711 msgstr ""
712
713 #. type: Plain text
714 #: build/C/man2/eventfd.2:400
715 #, no-wrap
716 msgid "        exit(EXIT_SUCCESS);\n"
717 msgstr ""
718
719 #. type: Plain text
720 #: build/C/man2/eventfd.2:403
721 #, no-wrap
722 msgid ""
723 "    default:\n"
724 "        sleep(2);\n"
725 msgstr ""
726
727 #. type: Plain text
728 #: build/C/man2/eventfd.2:411
729 #, no-wrap
730 msgid ""
731 "        printf(\"Parent about to read\\en\");\n"
732 "        s = read(efd, &u, sizeof(uint64_t));\n"
733 "        if (s != sizeof(uint64_t))\n"
734 "            handle_error(\"read\");\n"
735 "        printf(\"Parent read %llu (0x%llx) from efd\\en\",\n"
736 "                (unsigned long long) u, (unsigned long long) u);\n"
737 "        exit(EXIT_SUCCESS);\n"
738 msgstr ""
739
740 #. type: Plain text
741 #: build/C/man2/eventfd.2:416
742 #, no-wrap
743 msgid ""
744 "    case -1:\n"
745 "        handle_error(\"fork\");\n"
746 "    }\n"
747 "}\n"
748 msgstr ""
749
750 #. type: Plain text
751 #: build/C/man2/eventfd.2:427
752 msgid ""
753 "B<futex>(2), B<pipe>(2), B<poll>(2), B<read>(2), B<select>(2), "
754 "B<signalfd>(2), B<timerfd_create>(2), B<write>(2), B<epoll>(7), "
755 "B<sem_overview>(7)"
756 msgstr ""
757
758 #. type: TH
759 #: build/C/man2/getitimer.2:7
760 #, no-wrap
761 msgid "GETITIMER"
762 msgstr ""
763
764 #. type: Plain text
765 #: build/C/man2/getitimer.2:10
766 msgid "getitimer, setitimer - get or set value of an interval timer"
767 msgstr ""
768
769 #. type: Plain text
770 #: build/C/man2/getitimer.2:13
771 #, no-wrap
772 msgid "B<#include E<lt>sys/time.hE<gt>>\n"
773 msgstr ""
774
775 #. type: Plain text
776 #: build/C/man2/getitimer.2:15
777 #, no-wrap
778 msgid "B<int getitimer(int >I<which>B<, struct itimerval *>I<curr_value>B<);>\n"
779 msgstr ""
780
781 #. type: Plain text
782 #: build/C/man2/getitimer.2:18
783 #, no-wrap
784 msgid ""
785 "B<int setitimer(int >I<which>B<, const struct itimerval *>I<new_value>B<,>\n"
786 "B<              struct itimerval *>I<old_value>B<);>\n"
787 msgstr ""
788
789 #. type: Plain text
790 #: build/C/man2/getitimer.2:24
791 msgid ""
792 "The system provides each process with three interval timers, each "
793 "decrementing in a distinct time domain.  When any timer expires, a signal is "
794 "sent to the process, and the timer (potentially) restarts."
795 msgstr ""
796
797 #. type: TP
798 #: build/C/man2/getitimer.2:24
799 #, no-wrap
800 msgid "B<ITIMER_REAL>"
801 msgstr ""
802
803 #. type: Plain text
804 #: build/C/man2/getitimer.2:29
805 msgid "decrements in real time, and delivers B<SIGALRM> upon expiration."
806 msgstr ""
807
808 #. type: TP
809 #: build/C/man2/getitimer.2:29
810 #, no-wrap
811 msgid "B<ITIMER_VIRTUAL>"
812 msgstr ""
813
814 #. type: Plain text
815 #: build/C/man2/getitimer.2:34
816 msgid ""
817 "decrements only when the process is executing, and delivers B<SIGVTALRM> "
818 "upon expiration."
819 msgstr ""
820
821 #. type: TP
822 #: build/C/man2/getitimer.2:34
823 #, no-wrap
824 msgid "B<ITIMER_PROF>"
825 msgstr ""
826
827 #. type: Plain text
828 #: build/C/man2/getitimer.2:44
829 msgid ""
830 "decrements both when the process executes and when the system is executing "
831 "on behalf of the process.  Coupled with B<ITIMER_VIRTUAL>, this timer is "
832 "usually used to profile the time spent by the application in user and kernel "
833 "space.  B<SIGPROF> is delivered upon expiration."
834 msgstr ""
835
836 #. type: Plain text
837 #: build/C/man2/getitimer.2:46
838 msgid "Timer values are defined by the following structures:"
839 msgstr ""
840
841 #. type: Plain text
842 #: build/C/man2/getitimer.2:54
843 #, no-wrap
844 msgid ""
845 "struct itimerval {\n"
846 "    struct timeval it_interval; /* next value */\n"
847 "    struct timeval it_value;    /* current value */\n"
848 "};\n"
849 msgstr ""
850
851 #. type: Plain text
852 #: build/C/man2/getitimer.2:59
853 #, no-wrap
854 msgid ""
855 "struct timeval {\n"
856 "    long tv_sec;                /* seconds */\n"
857 "    long tv_usec;               /* microseconds */\n"
858 "};\n"
859 msgstr ""
860
861 #. type: Plain text
862 #: build/C/man2/getitimer.2:81
863 msgid ""
864 "The function B<getitimer>()  fills the structure pointed to by I<curr_value> "
865 "with the current setting for the timer specified by I<which> (one of "
866 "B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, or B<ITIMER_PROF>).  The element "
867 "I<it_value> is set to the amount of time remaining on the timer, or zero if "
868 "the timer is disabled.  Similarly, I<it_interval> is set to the reset value."
869 msgstr ""
870
871 #. type: Plain text
872 #: build/C/man2/getitimer.2:89
873 msgid ""
874 "The function B<setitimer>()  sets the specified timer to the value in "
875 "I<new_value>.  If I<old_value> is non-NULL, the old value of the timer is "
876 "stored there."
877 msgstr ""
878
879 #. type: Plain text
880 #: build/C/man2/getitimer.2:99
881 msgid ""
882 "Timers decrement from I<it_value> to zero, generate a signal, and reset to "
883 "I<it_interval>.  A timer which is set to zero (I<it_value> is zero or the "
884 "timer expires and I<it_interval> is zero) stops."
885 msgstr ""
886
887 #. type: Plain text
888 #: build/C/man2/getitimer.2:105
889 msgid ""
890 "Both I<tv_sec> and I<tv_usec> are significant in determining the duration of "
891 "a timer."
892 msgstr ""
893
894 #. type: Plain text
895 #: build/C/man2/getitimer.2:117
896 msgid ""
897 "Timers will never expire before the requested time, but may expire some "
898 "(short) time afterward, which depends on the system timer resolution and on "
899 "the system load; see B<time>(7).  (But see BUGS below.)  Upon expiration, a "
900 "signal will be generated and the timer reset.  If the timer expires while "
901 "the process is active (always true for B<ITIMER_VIRTUAL>)  the signal will "
902 "be delivered immediately when generated.  Otherwise the delivery will be "
903 "offset by a small time dependent on the system loading."
904 msgstr ""
905
906 #. type: Plain text
907 #: build/C/man2/getitimer.2:122 build/C/man2/killpg.2:93 build/C/man2/tkill.2:73
908 msgid ""
909 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
910 "appropriately."
911 msgstr ""
912
913 #. type: TP
914 #: build/C/man2/getitimer.2:123 build/C/man2/prctl.2:533 build/C/man2/sigaction.2:662 build/C/man2/sigaltstack.2:136 build/C/man2/sigpending.2:55 build/C/man2/sigprocmask.2:95 build/C/man2/sigsuspend.2:73 build/C/man2/timer_settime.2:180 build/C/man2/timerfd_create.2:341
915 #, no-wrap
916 msgid "B<EFAULT>"
917 msgstr ""
918
919 #. type: Plain text
920 #: build/C/man2/getitimer.2:130 build/C/man2/timerfd_create.2:348
921 msgid "I<new_value>, I<old_value>, or I<curr_value> is not valid a pointer."
922 msgstr ""
923
924 #. type: Plain text
925 #: build/C/man2/getitimer.2:143
926 msgid ""
927 "I<which> is not one of B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, or B<ITIMER_PROF>; "
928 "or (since Linux 2.6.22) one of the I<tv_usec> fields in the structure "
929 "pointed to by I<new_value> contains a value outside the range 0 to 999999."
930 msgstr ""
931
932 #. type: Plain text
933 #: build/C/man2/getitimer.2:153
934 msgid ""
935 "POSIX.1-2001, SVr4, 4.4BSD (this call first appeared in 4.2BSD).  "
936 "POSIX.1-2008 marks B<getitimer>()  and B<setitimer>()  obsolete, "
937 "recommending the use of the POSIX timers API (B<timer_gettime>(2), "
938 "B<timer_settime>(2), etc.) instead."
939 msgstr ""
940
941 #. type: Plain text
942 #: build/C/man2/getitimer.2:159
943 msgid ""
944 "A child created via B<fork>(2)  does not inherit its parent's interval "
945 "timers.  Interval timers are preserved across an B<execve>(2)."
946 msgstr ""
947
948 #. type: Plain text
949 #: build/C/man2/getitimer.2:169
950 msgid ""
951 "POSIX.1 leaves the interaction between B<setitimer>()  and the three "
952 "interfaces B<alarm>(2), B<sleep>(3), and B<usleep>(3)  unspecified."
953 msgstr ""
954
955 #. type: SH
956 #: build/C/man2/getitimer.2:169 build/C/man2/kill.2:160 build/C/man3/profil.3:70 build/C/man3/psignal.3:99 build/C/man2/sigaction.2:777 build/C/man7/signal.7:836 build/C/man2/signalfd.2:349 build/C/man2/sigpending.2:76 build/C/man3/sigset.3:230 build/C/man2/timer_getoverrun.2:112 build/C/man2/timerfd_create.2:534
957 #, no-wrap
958 msgid "BUGS"
959 msgstr ""
960
961 #. type: Plain text
962 #: build/C/man2/getitimer.2:178
963 msgid ""
964 "The generation and delivery of a signal are distinct, and only one instance "
965 "of each of the signals listed above may be pending for a process.  Under "
966 "very heavy loading, an B<ITIMER_REAL> timer may expire before the signal "
967 "from a previous expiration has been delivered.  The second signal in such an "
968 "event will be lost."
969 msgstr ""
970
971 #. type: Plain text
972 #: build/C/man2/getitimer.2:193
973 msgid ""
974 "On Linux kernels before 2.6.16, timer values are represented in jiffies.  If "
975 "a request is made set a timer with a value whose jiffies representation "
976 "exceeds B<MAX_SEC_IN_JIFFIES> (defined in I<include/linux/jiffies.h>), then "
977 "the timer is silently truncated to this ceiling value.  On Linux/i386 "
978 "(where, since Linux 2.6.13, the default jiffy is 0.004 seconds), this means "
979 "that the ceiling value for a timer is approximately 99.42 days.  Since Linux "
980 "2.6.16, the kernel uses a different internal representation for times, and "
981 "this ceiling is removed."
982 msgstr ""
983
984 #.  4 Jul 2005: It looks like this bug may remain in 2.4.x.
985 #.      http://lkml.org/lkml/2005/7/1/165
986 #. type: Plain text
987 #: build/C/man2/getitimer.2:200
988 msgid ""
989 "On certain systems (including i386), Linux kernels before version 2.6.12 "
990 "have a bug which will produce premature timer expirations of up to one jiffy "
991 "under some circumstances.  This bug is fixed in kernel 2.6.12."
992 msgstr ""
993
994 #.  Bugzilla report 25 Apr 2006:
995 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6443
996 #.  "setitimer() should reject noncanonical arguments"
997 #. type: Plain text
998 #: build/C/man2/getitimer.2:219
999 msgid ""
1000 "POSIX.1-2001 says that B<setitimer>()  should fail if a I<tv_usec> value is "
1001 "specified that is outside of the range 0 to 999999.  However, in kernels up "
1002 "to and including 2.6.21, Linux does not give an error, but instead silently "
1003 "adjusts the corresponding seconds value for the timer.  From kernel 2.6.22 "
1004 "onward, this nonconformance has been repaired: an improper I<tv_usec> value "
1005 "results in an B<EINVAL> error."
1006 msgstr ""
1007
1008 #. type: Plain text
1009 #: build/C/man2/getitimer.2:225
1010 msgid ""
1011 "B<gettimeofday>(2), B<sigaction>(2), B<signal>(2), B<timer_create>(2), "
1012 "B<timerfd_create>(2), B<time>(7)"
1013 msgstr ""
1014
1015 #. type: TH
1016 #: build/C/man3/gsignal.3:25
1017 #, no-wrap
1018 msgid "GSIGNAL"
1019 msgstr ""
1020
1021 #. type: TH
1022 #: build/C/man3/gsignal.3:25 build/C/man3/profil.3:28 build/C/man3/sigvec.3:24
1023 #, no-wrap
1024 msgid "2007-07-26"
1025 msgstr ""
1026
1027 #. type: Plain text
1028 #: build/C/man3/gsignal.3:28
1029 msgid "gsignal, ssignal - software signal facility"
1030 msgstr ""
1031
1032 #. type: Plain text
1033 #: build/C/man3/gsignal.3:31 build/C/man2/kill.2:52 build/C/man3/psignal.3:34 build/C/man3/raise.3:33 build/C/man2/sigaction.2:51 build/C/man3/siginterrupt.3:35 build/C/man3/sigpause.3:29 build/C/man3/sigwait.3:30 build/C/man2/sigwaitinfo.2:29
1034 #, no-wrap
1035 msgid "B<#include E<lt>signal.hE<gt>>\n"
1036 msgstr ""
1037
1038 #. type: Plain text
1039 #: build/C/man3/gsignal.3:33
1040 #, no-wrap
1041 msgid "B<typedef void (*sighandler_t)(int);>\n"
1042 msgstr ""
1043
1044 #. type: Plain text
1045 #: build/C/man3/gsignal.3:35
1046 #, no-wrap
1047 msgid "B<int gsignal(int>I<signum>B<);>\n"
1048 msgstr ""
1049
1050 #. type: Plain text
1051 #: build/C/man3/gsignal.3:37
1052 #, no-wrap
1053 msgid "B<sighandler_t ssignal(int >I<signum>B<, sighandler_t >I<action>B<);>\n"
1054 msgstr ""
1055
1056 #. type: Plain text
1057 #: build/C/man3/gsignal.3:42 build/C/man2/kill.2:59 build/C/man2/killpg.2:51 build/C/man3/profil.3:40 build/C/man3/psignal.3:44 build/C/man2/sigaction.2:59 build/C/man2/sigaltstack.2:36 build/C/man3/siginterrupt.3:42 build/C/man2/sigpending.2:38 build/C/man2/sigprocmask.2:39 build/C/man3/sigqueue.3:37 build/C/man3/sigset.3:43 build/C/man3/sigsetops.3:49 build/C/man2/sigsuspend.2:38 build/C/man3/sigvec.3:43 build/C/man3/sigwait.3:37 build/C/man2/sigwaitinfo.2:39 build/C/man2/timer_create.2:46 build/C/man2/timer_delete.2:38 build/C/man2/timer_getoverrun.2:38 build/C/man2/timer_settime.2:42 build/C/man2/wait.2:68 build/C/man2/wait4.2:54
1058 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1059 msgstr ""
1060
1061 #. type: Plain text
1062 #: build/C/man3/gsignal.3:47
1063 msgid "B<gsignal>(), B<ssignal>(): _SVID_SOURCE"
1064 msgstr ""
1065
1066 #. type: Plain text
1067 #: build/C/man3/gsignal.3:55
1068 msgid ""
1069 "Don't use these functions under Linux.  Due to a historical mistake, under "
1070 "Linux these functions are aliases for B<raise>(3)  and B<signal>(2), "
1071 "respectively."
1072 msgstr ""
1073
1074 #. type: Plain text
1075 #: build/C/man3/gsignal.3:93
1076 msgid ""
1077 "Elsewhere, on System V-like systems, these functions implement software "
1078 "signaling, entirely independent of the classical B<signal>(2)  and "
1079 "B<kill>(2)  functions.  The function B<ssignal>()  defines the action to "
1080 "take when the software signal with number I<signum> is raised using the "
1081 "function B<gsignal>(), and returns the previous such action or B<SIG_DFL>.  "
1082 "The function B<gsignal>()  does the following: if no action (or the action "
1083 "B<SIG_DFL>)  was specified for I<signum>, then it does nothing and returns "
1084 "0.  If the action B<SIG_IGN> was specified for I<signum>, then it does "
1085 "nothing and returns 1.  Otherwise, it resets the action to B<SIG_DFL> and "
1086 "calls the action function with argument I<signum>, and returns the value "
1087 "returned by that function.  The range of possible values I<signum> varies "
1088 "(often 1-15 or 1-17)."
1089 msgstr ""
1090
1091 #. type: Plain text
1092 #: build/C/man3/gsignal.3:101
1093 msgid ""
1094 "These functions are available under AIX, DG/UX, HP-UX, SCO, Solaris, Tru64.  "
1095 "They are called obsolete under most of these systems, and are broken under "
1096 "Linux libc and glibc.  Some systems also have B<gsignal_r>()  and "
1097 "B<ssignal_r>()."
1098 msgstr ""
1099
1100 #. type: Plain text
1101 #: build/C/man3/gsignal.3:104
1102 msgid "B<kill>(2), B<signal>(2), B<raise>(3)"
1103 msgstr ""
1104
1105 #. type: TH
1106 #: build/C/man2/kill.2:44
1107 #, no-wrap
1108 msgid "KILL"
1109 msgstr ""
1110
1111 #. type: TH
1112 #: build/C/man2/kill.2:44
1113 #, no-wrap
1114 msgid "2009-09-15"
1115 msgstr ""
1116
1117 #. type: Plain text
1118 #: build/C/man2/kill.2:47
1119 msgid "kill - send signal to a process"
1120 msgstr ""
1121
1122 #. type: Plain text
1123 #: build/C/man2/kill.2:50
1124 #, no-wrap
1125 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
1126 msgstr ""
1127
1128 #. type: Plain text
1129 #: build/C/man2/kill.2:54
1130 #, no-wrap
1131 msgid "B<int kill(pid_t >I<pid>B<, int >I<sig>B<);>\n"
1132 msgstr ""
1133
1134 #. type: Plain text
1135 #: build/C/man2/kill.2:64
1136 msgid "B<kill>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
1137 msgstr ""
1138
1139 #. type: Plain text
1140 #: build/C/man2/kill.2:70
1141 msgid ""
1142 "The B<kill>()  system call can be used to send any signal to any process "
1143 "group or process."
1144 msgstr ""
1145
1146 #. type: Plain text
1147 #: build/C/man2/kill.2:73
1148 msgid ""
1149 "If I<pid> is positive, then signal I<sig> is sent to the process with the ID "
1150 "specified by I<pid>."
1151 msgstr ""
1152
1153 #. type: Plain text
1154 #: build/C/man2/kill.2:76
1155 msgid ""
1156 "If I<pid> equals 0, then I<sig> is sent to every process in the process "
1157 "group of the calling process."
1158 msgstr ""
1159
1160 #. type: Plain text
1161 #: build/C/man2/kill.2:80
1162 msgid ""
1163 "If I<pid> equals -1, then I<sig> is sent to every process for which the "
1164 "calling process has permission to send signals, except for process 1 "
1165 "(I<init>), but see below."
1166 msgstr ""
1167
1168 #. type: Plain text
1169 #: build/C/man2/kill.2:83
1170 msgid ""
1171 "If I<pid> is less than -1, then I<sig> is sent to every process in the "
1172 "process group whose ID is I<-pid>."
1173 msgstr ""
1174
1175 #. type: Plain text
1176 #: build/C/man2/kill.2:88
1177 msgid ""
1178 "If I<sig> is 0, then no signal is sent, but error checking is still "
1179 "performed; this can be used to check for the existence of a process ID or "
1180 "process group ID."
1181 msgstr ""
1182
1183 #. type: Plain text
1184 #: build/C/man2/kill.2:99 build/C/man2/killpg.2:88
1185 msgid ""
1186 "For a process to have permission to send a signal it must either be "
1187 "privileged (under Linux: have the B<CAP_KILL> capability), or the real or "
1188 "effective user ID of the sending process must equal the real or saved "
1189 "set-user-ID of the target process.  In the case of B<SIGCONT> it suffices "
1190 "when the sending and receiving processes belong to the same session."
1191 msgstr ""
1192
1193 #. type: Plain text
1194 #: build/C/man2/kill.2:104
1195 msgid ""
1196 "On success (at least one signal was sent), zero is returned.  On error, -1 "
1197 "is returned, and I<errno> is set appropriately."
1198 msgstr ""
1199
1200 #. type: Plain text
1201 #: build/C/man2/kill.2:108
1202 msgid "An invalid signal was specified."
1203 msgstr ""
1204
1205 #. type: TP
1206 #: build/C/man2/kill.2:108 build/C/man2/killpg.2:98 build/C/man2/prctl.2:608 build/C/man2/prctl.2:620 build/C/man2/prctl.2:630 build/C/man2/prctl.2:638 build/C/man2/rt_sigqueueinfo.2:143 build/C/man2/sigaltstack.2:149 build/C/man3/sigqueue.3:100 build/C/man2/tkill.2:77
1207 #, no-wrap
1208 msgid "B<EPERM>"
1209 msgstr ""
1210
1211 #. type: Plain text
1212 #: build/C/man2/kill.2:112 build/C/man2/killpg.2:102
1213 msgid ""
1214 "The process does not have permission to send the signal to any of the target "
1215 "processes."
1216 msgstr ""
1217
1218 #. type: TP
1219 #: build/C/man2/kill.2:112 build/C/man2/killpg.2:102 build/C/man2/killpg.2:106 build/C/man2/rt_sigqueueinfo.2:151 build/C/man3/sigqueue.3:106 build/C/man2/tkill.2:82
1220 #, no-wrap
1221 msgid "B<ESRCH>"
1222 msgstr ""
1223
1224 #. type: Plain text
1225 #: build/C/man2/kill.2:120
1226 msgid ""
1227 "The pid or process group does not exist.  Note that an existing process "
1228 "might be a zombie, a process which already committed termination, but has "
1229 "not yet been B<wait>(2)ed for."
1230 msgstr ""
1231
1232 #. type: Plain text
1233 #: build/C/man2/kill.2:122 build/C/man2/pause.2:59 build/C/man2/wait.2:423
1234 msgid "SVr4, 4.3BSD, POSIX.1-2001."
1235 msgstr ""
1236
1237 #. type: Plain text
1238 #: build/C/man2/kill.2:130
1239 msgid ""
1240 "The only signals that can be sent to process ID 1, the I<init> process, are "
1241 "those for which I<init> has explicitly installed signal handlers.  This is "
1242 "done to assure the system is not brought down accidentally."
1243 msgstr ""
1244
1245 #. type: Plain text
1246 #: build/C/man2/kill.2:136
1247 msgid ""
1248 "POSIX.1-2001 requires that I<kill(-1,sig)> send I<sig> to all processes that "
1249 "the calling process may send signals to, except possibly for some "
1250 "implementation-defined system processes.  Linux allows a process to signal "
1251 "itself, but on Linux the call I<kill(-1,sig)> does not signal the calling "
1252 "process."
1253 msgstr ""
1254
1255 #. type: Plain text
1256 #: build/C/man2/kill.2:146
1257 msgid ""
1258 "POSIX.1-2001 requires that if a process sends a signal to itself, and the "
1259 "sending thread does not have the signal blocked, and no other thread has it "
1260 "unblocked or is waiting for it in B<sigwait>(3), at least one unblocked "
1261 "signal must be delivered to the sending thread before the B<kill>()  "
1262 "returns."
1263 msgstr ""
1264
1265 #. type: SS
1266 #: build/C/man2/kill.2:146 build/C/man3/sigpause.3:75 build/C/man2/wait.2:477
1267 #, no-wrap
1268 msgid "Linux Notes"
1269 msgstr ""
1270
1271 #.  In the 0.* kernels things chopped and changed quite
1272 #.  a bit - MTK, 24 Jul 02
1273 #. type: Plain text
1274 #: build/C/man2/kill.2:160
1275 msgid ""
1276 "Across different kernel versions, Linux has enforced different rules for the "
1277 "permissions required for an unprivileged process to send a signal to another "
1278 "process.  In kernels 1.0 to 1.2.2, a signal could be sent if the effective "
1279 "user ID of the sender matched that of the receiver, or the real user ID of "
1280 "the sender matched that of the receiver.  From kernel 1.2.3 until 1.3.77, a "
1281 "signal could be sent if the effective user ID of the sender matched either "
1282 "the real or effective user ID of the receiver.  The current rules, which "
1283 "conform to POSIX.1-2001, were adopted in kernel 1.3.78."
1284 msgstr ""
1285
1286 #. type: Plain text
1287 #: build/C/man2/kill.2:170
1288 msgid ""
1289 "In 2.6 kernels up to and including 2.6.7, there was a bug that meant that "
1290 "when sending signals to a process group, B<kill>()  failed with the error "
1291 "B<EPERM> if the caller did have permission to send the signal to I<any> "
1292 "(rather than I<all>) of the members of the process group.  Notwithstanding "
1293 "this error return, the signal was still delivered to all of the processes "
1294 "for which the caller had permission to signal."
1295 msgstr ""
1296
1297 #. type: Plain text
1298 #: build/C/man2/kill.2:179
1299 msgid ""
1300 "B<_exit>(2), B<killpg>(2), B<signal>(2), B<tkill>(2), B<exit>(3), "
1301 "B<sigqueue>(3), B<capabilities>(7), B<credentials>(7), B<signal>(7)"
1302 msgstr ""
1303
1304 #. type: TH
1305 #: build/C/man2/killpg.2:40
1306 #, no-wrap
1307 msgid "KILLPG"
1308 msgstr ""
1309
1310 #. type: TH
1311 #: build/C/man2/killpg.2:40 build/C/man3/sigset.3:24 build/C/man2/wait4.2:34
1312 #, no-wrap
1313 msgid "2010-09-20"
1314 msgstr ""
1315
1316 #. type: Plain text
1317 #: build/C/man2/killpg.2:43
1318 msgid "killpg - send signal to a process group"
1319 msgstr ""
1320
1321 #. type: Plain text
1322 #: build/C/man2/killpg.2:47
1323 msgid "B<int killpg(int >I<pgrp>B<, int >I<sig>B<);>"
1324 msgstr ""
1325
1326 #. type: TP
1327 #: build/C/man2/killpg.2:54
1328 #, no-wrap
1329 msgid "B<killpg>():"
1330 msgstr ""
1331
1332 #. type: Plain text
1333 #: build/C/man2/killpg.2:58 build/C/man2/sigaltstack.2:44 build/C/man3/siginterrupt.3:49 build/C/man2/wait4.2:61
1334 msgid ""
1335 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
1336 "_XOPEN_SOURCE_EXTENDED"
1337 msgstr ""
1338
1339 #. type: Plain text
1340 #: build/C/man2/killpg.2:68
1341 msgid ""
1342 "B<killpg>()  sends the signal I<sig> to the process group I<pgrp>.  See "
1343 "B<signal>(7)  for a list of signals."
1344 msgstr ""
1345
1346 #. type: Plain text
1347 #: build/C/man2/killpg.2:77
1348 msgid ""
1349 "If I<pgrp> is 0, B<killpg>()  sends the signal to the calling process's "
1350 "process group.  (POSIX says: If I<pgrp> is less than or equal to 1, the "
1351 "behavior is undefined.)"
1352 msgstr ""
1353
1354 #. type: Plain text
1355 #: build/C/man2/killpg.2:98
1356 msgid "I<Sig> is not a valid signal number."
1357 msgstr ""
1358
1359 #. type: Plain text
1360 #: build/C/man2/killpg.2:106
1361 msgid "No process can be found in the process group specified by I<pgrp>."
1362 msgstr ""
1363
1364 #. type: Plain text
1365 #: build/C/man2/killpg.2:110
1366 msgid ""
1367 "The process group was given as 0 but the sending process does not have a "
1368 "process group."
1369 msgstr ""
1370
1371 #. type: Plain text
1372 #: build/C/man2/killpg.2:114
1373 msgid ""
1374 "SVr4, 4.4BSD (the B<killpg>()  function call first appeared in 4BSD), "
1375 "POSIX.1-2001."
1376 msgstr ""
1377
1378 #. type: Plain text
1379 #: build/C/man2/killpg.2:128
1380 msgid ""
1381 "There are various differences between the permission checking in BSD-type "
1382 "systems and System V-type systems.  See the POSIX rationale for B<kill>().  "
1383 "A difference not mentioned by POSIX concerns the return value B<EPERM>: BSD "
1384 "documents that no signal is sent and B<EPERM> returned when the permission "
1385 "check failed for at least one target process, while POSIX documents B<EPERM> "
1386 "only when the permission check failed for all target processes."
1387 msgstr ""
1388
1389 #. type: Plain text
1390 #: build/C/man2/killpg.2:133
1391 msgid ""
1392 "On Linux, B<killpg>()  is implemented as a library function that makes the "
1393 "call I<kill(-pgrp,\\ sig)>."
1394 msgstr ""
1395
1396 #. type: Plain text
1397 #: build/C/man2/killpg.2:138
1398 msgid ""
1399 "B<getpgrp>(2), B<kill>(2), B<signal>(2), B<capabilities>(7), "
1400 "B<credentials>(7)"
1401 msgstr ""
1402
1403 #. type: TH
1404 #: build/C/man2/pause.2:30
1405 #, no-wrap
1406 msgid "PAUSE"
1407 msgstr ""
1408
1409 #. type: TH
1410 #: build/C/man2/pause.2:30
1411 #, no-wrap
1412 msgid "2008-10-06"
1413 msgstr ""
1414
1415 #. type: Plain text
1416 #: build/C/man2/pause.2:33
1417 msgid "pause - wait for signal"
1418 msgstr ""
1419
1420 #. type: Plain text
1421 #: build/C/man2/pause.2:35 build/C/man3/profil.3:33
1422 msgid "B<#include E<lt>unistd.hE<gt>>"
1423 msgstr ""
1424
1425 #. type: Plain text
1426 #: build/C/man2/pause.2:37
1427 msgid "B<int pause(void);>"
1428 msgstr ""
1429
1430 #. type: Plain text
1431 #: build/C/man2/pause.2:42
1432 msgid ""
1433 "B<pause>()  causes the calling process (or thread) to sleep until a signal "
1434 "is delivered that either terminates the process or causes the invocation of "
1435 "a signal-catching function."
1436 msgstr ""
1437
1438 #.  .BR ERESTARTNOHAND .
1439 #. type: Plain text
1440 #: build/C/man2/pause.2:53
1441 msgid ""
1442 "B<pause>()  only returns when a signal was caught and the signal-catching "
1443 "function returned.  In this case B<pause>()  returns -1, and I<errno> is set "
1444 "to B<EINTR>."
1445 msgstr ""
1446
1447 #. type: TP
1448 #: build/C/man2/pause.2:54 build/C/man2/sigsuspend.2:77 build/C/man2/sigwaitinfo.2:116 build/C/man2/wait.2:409
1449 #, no-wrap
1450 msgid "B<EINTR>"
1451 msgstr ""
1452
1453 #. type: Plain text
1454 #: build/C/man2/pause.2:57
1455 msgid "a signal was caught and the signal-catching function returned."
1456 msgstr ""
1457
1458 #. type: Plain text
1459 #: build/C/man2/pause.2:63
1460 msgid "B<kill>(2), B<select>(2), B<signal>(2), B<sigsuspend>(2)"
1461 msgstr ""
1462
1463 #. type: TH
1464 #: build/C/man2/prctl.2:46
1465 #, no-wrap
1466 msgid "PRCTL"
1467 msgstr ""
1468
1469 #. type: TH
1470 #: build/C/man2/prctl.2:46
1471 #, no-wrap
1472 msgid "2012-04-14"
1473 msgstr ""
1474
1475 #. type: Plain text
1476 #: build/C/man2/prctl.2:49
1477 msgid "prctl - operations on a process"
1478 msgstr ""
1479
1480 #. type: Plain text
1481 #: build/C/man2/prctl.2:52
1482 #, no-wrap
1483 msgid "B<#include E<lt>sys/prctl.hE<gt>>\n"
1484 msgstr ""
1485
1486 #. type: Plain text
1487 #: build/C/man2/prctl.2:55
1488 #, no-wrap
1489 msgid ""
1490 "B<int prctl(int >I<option>B<, unsigned long >I<arg2>B<, unsigned long "
1491 ">I<arg3>B<,>\n"
1492 "B<          unsigned long >I<arg4>B<, unsigned long >I<arg5>B<);>\n"
1493 msgstr ""
1494
1495 #. type: Plain text
1496 #: build/C/man2/prctl.2:62
1497 msgid ""
1498 "B<prctl>()  is called with a first argument describing what to do (with "
1499 "values defined in I<E<lt>linux/prctl.hE<gt>>), and further arguments with a "
1500 "significance depending on the first one.  The first argument can be:"
1501 msgstr ""
1502
1503 #. type: TP
1504 #: build/C/man2/prctl.2:62
1505 #, no-wrap
1506 msgid "B<PR_CAPBSET_READ> (since Linux 2.6.25)"
1507 msgstr ""
1508
1509 #. type: Plain text
1510 #: build/C/man2/prctl.2:74
1511 msgid ""
1512 "Return (as the function result) 1 if the capability specified in I<arg2> is "
1513 "in the calling thread's capability bounding set, or 0 if it is not.  (The "
1514 "capability constants are defined in I<E<lt>linux/capability.hE<gt>>.)  The "
1515 "capability bounding set dictates whether the process can receive the "
1516 "capability through a file's permitted capability set on a subsequent call to "
1517 "B<execve>(2)."
1518 msgstr ""
1519
1520 #. type: Plain text
1521 #: build/C/man2/prctl.2:79
1522 msgid ""
1523 "If the capability specified in I<arg2> is not valid, then the call fails "
1524 "with the error B<EINVAL>."
1525 msgstr ""
1526
1527 #. type: TP
1528 #: build/C/man2/prctl.2:79
1529 #, no-wrap
1530 msgid "B<PR_CAPBSET_DROP> (since Linux 2.6.25)"
1531 msgstr ""
1532
1533 #. type: Plain text
1534 #: build/C/man2/prctl.2:88
1535 msgid ""
1536 "If the calling thread has the B<CAP_SETPCAP> capability, then drop the "
1537 "capability specified by I<arg2> from the calling thread's capability "
1538 "bounding set.  Any children of the calling thread will inherit the newly "
1539 "reduced bounding set."
1540 msgstr ""
1541
1542 #. type: Plain text
1543 #: build/C/man2/prctl.2:100
1544 msgid ""
1545 "The call fails with the error: B<EPERM> if the calling thread does not have "
1546 "the B<CAP_SETPCAP>; B<EINVAL> if I<arg2> does not represent a valid "
1547 "capability; or B<EINVAL> if file capabilities are not enabled in the kernel, "
1548 "in which case bounding sets are not supported."
1549 msgstr ""
1550
1551 #. type: TP
1552 #: build/C/man2/prctl.2:100
1553 #, no-wrap
1554 msgid "B<PR_SET_DUMPABLE> (since Linux 2.3.20)"
1555 msgstr ""
1556
1557 #.  See http://marc.theaimsgroup.com/?l=linux-kernel&m=115270289030630&w=2
1558 #.  Subject:    Fix prctl privilege escalation (CVE-2006-2451)
1559 #.  From:       Marcel Holtmann <marcel () holtmann ! org>
1560 #.  Date:       2006-07-12 11:12:00
1561 #. type: Plain text
1562 #: build/C/man2/prctl.2:126
1563 msgid ""
1564 "Set the state of the flag determining whether core dumps are produced for "
1565 "this process upon delivery of a signal whose default behavior is to produce "
1566 "a core dump.  (Normally this flag is set for a process by default, but it is "
1567 "cleared when a set-user-ID or set-group-ID program is executed and also by "
1568 "various system calls that manipulate process UIDs and GIDs).  In kernels up "
1569 "to and including 2.6.12, I<arg2> must be either 0 (process is not dumpable) "
1570 "or 1 (process is dumpable).  Between kernels 2.6.13 and 2.6.17, the value 2 "
1571 "was also permitted, which caused any binary which normally would not be "
1572 "dumped to be dumped readable by root only; for security reasons, this "
1573 "feature has been removed.  (See also the description of "
1574 "I</proc/sys/fs/suid_dumpable> in B<proc>(5).)  Processes that are not "
1575 "dumpable can not be attached via B<ptrace(2)> B<PTRACE_ATTACH>."
1576 msgstr ""
1577
1578 #. type: TP
1579 #: build/C/man2/prctl.2:126
1580 #, no-wrap
1581 msgid "B<PR_GET_DUMPABLE> (since Linux 2.3.20)"
1582 msgstr ""
1583
1584 #.  Since Linux 2.6.13, the dumpable flag can have the value 2,
1585 #.  but in 2.6.13 PR_GET_DUMPABLE simply returns 1 if the dumpable
1586 #.  flags has a nonzero value.  This was fixed in 2.6.14.
1587 #. type: Plain text
1588 #: build/C/man2/prctl.2:133
1589 msgid ""
1590 "Return (as the function result) the current state of the calling process's "
1591 "dumpable flag."
1592 msgstr ""
1593
1594 #. type: TP
1595 #: build/C/man2/prctl.2:133
1596 #, no-wrap
1597 msgid "B<PR_SET_ENDIAN> (since Linux 2.6.18, PowerPC only)"
1598 msgstr ""
1599
1600 #.  Respectively 0, 1, 2
1601 #. type: Plain text
1602 #: build/C/man2/prctl.2:143
1603 msgid ""
1604 "Set the endian-ness of the calling process to the value given in I<arg2>, "
1605 "which should be one of the following: B<PR_ENDIAN_BIG>, B<PR_ENDIAN_LITTLE>, "
1606 "or B<PR_ENDIAN_PPC_LITTLE> (PowerPC pseudo little endian)."
1607 msgstr ""
1608
1609 #. type: TP
1610 #: build/C/man2/prctl.2:143
1611 #, no-wrap
1612 msgid "B<PR_GET_ENDIAN> (since Linux 2.6.18, PowerPC only)"
1613 msgstr ""
1614
1615 #. type: Plain text
1616 #: build/C/man2/prctl.2:148
1617 msgid ""
1618 "Return the endian-ness of the calling process, in the location pointed to by "
1619 "I<(int\\ *) arg2>."
1620 msgstr ""
1621
1622 #. type: TP
1623 #: build/C/man2/prctl.2:148
1624 #, no-wrap
1625 msgid "B<PR_SET_FPEMU> (since Linux 2.4.18, 2.5.9, only on ia64)"
1626 msgstr ""
1627
1628 #. type: Plain text
1629 #: build/C/man2/prctl.2:155
1630 msgid ""
1631 "Set floating-point emulation control bits to I<arg2>.  Pass "
1632 "B<PR_FPEMU_NOPRINT> to silently emulate fp operations accesses, or "
1633 "B<PR_FPEMU_SIGFPE> to not emulate fp operations and send B<SIGFPE> instead."
1634 msgstr ""
1635
1636 #. type: TP
1637 #: build/C/man2/prctl.2:155
1638 #, no-wrap
1639 msgid "B<PR_GET_FPEMU> (since Linux 2.4.18, 2.5.9, only on ia64)"
1640 msgstr ""
1641
1642 #. type: Plain text
1643 #: build/C/man2/prctl.2:160
1644 msgid ""
1645 "Return floating-point emulation control bits, in the location pointed to by "
1646 "I<(int\\ *) arg2>."
1647 msgstr ""
1648
1649 #. type: TP
1650 #: build/C/man2/prctl.2:160
1651 #, no-wrap
1652 msgid "B<PR_SET_FPEXC> (since Linux 2.4.21, 2.5.32, only on PowerPC)"
1653 msgstr ""
1654
1655 #. type: Plain text
1656 #: build/C/man2/prctl.2:173
1657 msgid ""
1658 "Set floating-point exception mode to I<arg2>.  Pass B<PR_FP_EXC_SW_ENABLE> "
1659 "to use FPEXC for FP exception enables, B<PR_FP_EXC_DIV> for floating-point "
1660 "divide by zero, B<PR_FP_EXC_OVF> for floating-point overflow, "
1661 "B<PR_FP_EXC_UND> for floating-point underflow, B<PR_FP_EXC_RES> for "
1662 "floating-point inexact result, B<PR_FP_EXC_INV> for floating-point invalid "
1663 "operation, B<PR_FP_EXC_DISABLED> for FP exceptions disabled, "
1664 "B<PR_FP_EXC_NONRECOV> for async nonrecoverable exception mode, "
1665 "B<PR_FP_EXC_ASYNC> for async recoverable exception mode, "
1666 "B<PR_FP_EXC_PRECISE> for precise exception mode."
1667 msgstr ""
1668
1669 #. type: TP
1670 #: build/C/man2/prctl.2:173
1671 #, no-wrap
1672 msgid "B<PR_GET_FPEXC> (since Linux 2.4.21, 2.5.32, only on PowerPC)"
1673 msgstr ""
1674
1675 #. type: Plain text
1676 #: build/C/man2/prctl.2:178
1677 msgid ""
1678 "Return floating-point exception mode, in the location pointed to by I<(int\\ "
1679 "*) arg2>."
1680 msgstr ""
1681
1682 #. type: TP
1683 #: build/C/man2/prctl.2:178
1684 #, no-wrap
1685 msgid "B<PR_SET_KEEPCAPS> (since Linux 2.2.18)"
1686 msgstr ""
1687
1688 #. type: Plain text
1689 #: build/C/man2/prctl.2:196
1690 msgid ""
1691 "Set the state of the thread's \"keep capabilities\" flag, which determines "
1692 "whether the threads's permitted capability set is cleared when a change is "
1693 "made to the threads's user IDs such that the threads's real UID, effective "
1694 "UID, and saved set-user-ID all become nonzero when at least one of them "
1695 "previously had the value 0.  By default, the permitted capability set is "
1696 "cleared when such a change is made; setting the \"keep capabilities\" flag "
1697 "prevents it from being cleared.  I<arg2> must be either 0 (permitted "
1698 "capabilities are cleared)  or 1 (permitted capabilities are kept).  (A "
1699 "thread's I<effective> capability set is always cleared when such a "
1700 "credential change is made, regardless of the setting of the \"keep "
1701 "capabilities\" flag.)  The \"keep capabilities\" value will be reset to 0 on "
1702 "subsequent calls to B<execve>(2)."
1703 msgstr ""
1704
1705 #. type: TP
1706 #: build/C/man2/prctl.2:196
1707 #, no-wrap
1708 msgid "B<PR_GET_KEEPCAPS> (since Linux 2.2.18)"
1709 msgstr ""
1710
1711 #. type: Plain text
1712 #: build/C/man2/prctl.2:200
1713 msgid ""
1714 "Return (as the function result) the current state of the calling threads's "
1715 "\"keep capabilities\" flag."
1716 msgstr ""
1717
1718 #. type: TP
1719 #: build/C/man2/prctl.2:200
1720 #, no-wrap
1721 msgid "B<PR_SET_NAME> (since Linux 2.6.9)"
1722 msgstr ""
1723
1724 #.  TASK_COMM_LEN in include/linux/sched.h
1725 #. type: Plain text
1726 #: build/C/man2/prctl.2:208
1727 msgid ""
1728 "Set the process name for the calling process, using the value in the "
1729 "location pointed to by I<(char\\ *) arg2>.  The name can be up to 16 bytes "
1730 "long, and should be null-terminated if it contains fewer bytes."
1731 msgstr ""
1732
1733 #. type: TP
1734 #: build/C/man2/prctl.2:208
1735 #, no-wrap
1736 msgid "B<PR_GET_NAME> (since Linux 2.6.11)"
1737 msgstr ""
1738
1739 #. type: Plain text
1740 #: build/C/man2/prctl.2:215
1741 msgid ""
1742 "Return the process name for the calling process, in the buffer pointed to by "
1743 "I<(char\\ *) arg2>.  The buffer should allow space for up to 16 bytes; the "
1744 "returned string will be null-terminated if it is shorter than that."
1745 msgstr ""
1746
1747 #. type: TP
1748 #: build/C/man2/prctl.2:215
1749 #, no-wrap
1750 msgid "B<PR_SET_PDEATHSIG> (since Linux 2.1.57)"
1751 msgstr ""
1752
1753 #. type: Plain text
1754 #: build/C/man2/prctl.2:224
1755 msgid ""
1756 "Set the parent process death signal of the calling process to I<arg2> "
1757 "(either a signal value in the range 1..maxsig, or 0 to clear).  This is the "
1758 "signal that the calling process will get when its parent dies.  This value "
1759 "is cleared for the child of a B<fork>(2)."
1760 msgstr ""
1761
1762 #. type: TP
1763 #: build/C/man2/prctl.2:224
1764 #, no-wrap
1765 msgid "B<PR_GET_PDEATHSIG> (since Linux 2.3.15)"
1766 msgstr ""
1767
1768 #. type: Plain text
1769 #: build/C/man2/prctl.2:229
1770 msgid ""
1771 "Return the current value of the parent process death signal, in the location "
1772 "pointed to by I<(int\\ *) arg2>."
1773 msgstr ""
1774
1775 #. type: TP
1776 #: build/C/man2/prctl.2:229
1777 #, no-wrap
1778 msgid "B<PR_SET_SECCOMP> (since Linux 2.6.23)"
1779 msgstr ""
1780
1781 #.  See http://thread.gmane.org/gmane.linux.kernel/542632
1782 #.  [PATCH 0 of 2] seccomp updates
1783 #.  andrea@cpushare.com
1784 #. type: Plain text
1785 #: build/C/man2/prctl.2:253
1786 msgid ""
1787 "Set the secure computing mode for the calling thread.  In the current "
1788 "implementation, I<arg2> must be 1.  After the secure computing mode has been "
1789 "set to 1, the only system calls that the thread is permitted to make are "
1790 "B<read>(2), B<write>(2), B<_exit>(2), and B<sigreturn>(2).  Other system "
1791 "calls result in the delivery of a B<SIGKILL> signal.  Secure computing mode "
1792 "is useful for number-crunching applications that may need to execute "
1793 "untrusted byte code, perhaps obtained by reading from a pipe or socket.  "
1794 "This operation is only available if the kernel is configured with "
1795 "CONFIG_SECCOMP enabled."
1796 msgstr ""
1797
1798 #. type: TP
1799 #: build/C/man2/prctl.2:253
1800 #, no-wrap
1801 msgid "B<PR_GET_SECCOMP> (since Linux 2.6.23)"
1802 msgstr ""
1803
1804 #. type: Plain text
1805 #: build/C/man2/prctl.2:266
1806 msgid ""
1807 "Return the secure computing mode of the calling thread.  Not very useful for "
1808 "the current implementation (mode equals 1), but may be useful for other "
1809 "possible future modes: if the caller is not in secure computing mode, this "
1810 "operation returns 0; if the caller is in secure computing mode, then the "
1811 "B<prctl>()  call will cause a B<SIGKILL> signal to be sent to the process.  "
1812 "This operation is only available if the kernel is configured with "
1813 "CONFIG_SECCOMP enabled."
1814 msgstr ""
1815
1816 #. type: TP
1817 #: build/C/man2/prctl.2:266
1818 #, no-wrap
1819 msgid "B<PR_SET_SECUREBITS> (since Linux 2.6.26)"
1820 msgstr ""
1821
1822 #. type: Plain text
1823 #: build/C/man2/prctl.2:272
1824 msgid ""
1825 "Set the \"securebits\" flags of the calling thread to the value supplied in "
1826 "I<arg2>.  See B<capabilities>(7)."
1827 msgstr ""
1828
1829 #. type: TP
1830 #: build/C/man2/prctl.2:272
1831 #, no-wrap
1832 msgid "B<PR_GET_SECUREBITS> (since Linux 2.6.26)"
1833 msgstr ""
1834
1835 #. type: Plain text
1836 #: build/C/man2/prctl.2:278
1837 msgid ""
1838 "Return (as the function result)  the \"securebits\" flags of the calling "
1839 "thread.  See B<capabilities>(7)."
1840 msgstr ""
1841
1842 #. type: TP
1843 #: build/C/man2/prctl.2:278
1844 #, no-wrap
1845 msgid "B<PR_SET_TIMING> (since Linux 2.6.0-test4)"
1846 msgstr ""
1847
1848 #.  0
1849 #.  1
1850 #.  PR_TIMING_TIMESTAMP doesn't do anything in 2.6.26-rc8,
1851 #.  and looking at the patch history, it appears
1852 #.  that it never did anything.
1853 #. type: Plain text
1854 #: build/C/man2/prctl.2:295
1855 msgid ""
1856 "Set whether to use (normal, traditional) statistical process timing or "
1857 "accurate timestamp-based process timing, by passing B<PR_TIMING_STATISTICAL> "
1858 "or B<PR_TIMING_TIMESTAMP> to I<arg2>.  B<PR_TIMING_TIMESTAMP> is not "
1859 "currently implemented (attempting to set this mode will yield the error "
1860 "B<EINVAL>)."
1861 msgstr ""
1862
1863 #. type: TP
1864 #: build/C/man2/prctl.2:295
1865 #, no-wrap
1866 msgid "B<PR_GET_TIMING> (since Linux 2.6.0-test4)"
1867 msgstr ""
1868
1869 #. type: Plain text
1870 #: build/C/man2/prctl.2:299
1871 msgid ""
1872 "Return (as the function result) which process timing method is currently in "
1873 "use."
1874 msgstr ""
1875
1876 #. type: TP
1877 #: build/C/man2/prctl.2:299
1878 #, no-wrap
1879 msgid "B<PR_SET_TSC> (since Linux 2.6.26, x86 only)"
1880 msgstr ""
1881
1882 #. type: Plain text
1883 #: build/C/man2/prctl.2:312
1884 msgid ""
1885 "Set the state of the flag determining whether the timestamp counter can be "
1886 "read by the process.  Pass B<PR_TSC_ENABLE> to I<arg2> to allow it to be "
1887 "read, or B<PR_TSC_SIGSEGV> to generate a B<SIGSEGV> when the process tries "
1888 "to read the timestamp counter."
1889 msgstr ""
1890
1891 #. type: TP
1892 #: build/C/man2/prctl.2:312
1893 #, no-wrap
1894 msgid "B<PR_GET_TSC> (since Linux 2.6.26, x86 only)"
1895 msgstr ""
1896
1897 #. type: Plain text
1898 #: build/C/man2/prctl.2:318
1899 msgid ""
1900 "Return the state of the flag determining whether the timestamp counter can "
1901 "be read, in the location pointed to by I<(int\\ *) arg2>."
1902 msgstr ""
1903
1904 #. type: TP
1905 #: build/C/man2/prctl.2:318
1906 #, no-wrap
1907 msgid "B<PR_SET_UNALIGN>"
1908 msgstr ""
1909
1910 #. type: Plain text
1911 #: build/C/man2/prctl.2:328
1912 msgid ""
1913 "(Only on: ia64, since Linux 2.3.48; parisc, since Linux 2.6.15; PowerPC, "
1914 "since Linux 2.6.18; Alpha, since Linux 2.6.22)  Set unaligned access control "
1915 "bits to I<arg2>.  Pass B<PR_UNALIGN_NOPRINT> to silently fix up unaligned "
1916 "user accesses, or B<PR_UNALIGN_SIGBUS> to generate B<SIGBUS> on unaligned "
1917 "user access."
1918 msgstr ""
1919
1920 #. type: TP
1921 #: build/C/man2/prctl.2:328
1922 #, no-wrap
1923 msgid "B<PR_GET_UNALIGN>"
1924 msgstr ""
1925
1926 #. type: Plain text
1927 #: build/C/man2/prctl.2:335
1928 msgid ""
1929 "(see B<PR_SET_UNALIGN> for information on versions and architectures)  "
1930 "Return unaligned access control bits, in the location pointed to by I<(int\\ "
1931 "*) arg2>."
1932 msgstr ""
1933
1934 #. type: TP
1935 #: build/C/man2/prctl.2:335
1936 #, no-wrap
1937 msgid "B<PR_MCE_KILL> (since Linux 2.6.32)"
1938 msgstr ""
1939
1940 #. type: Plain text
1941 #: build/C/man2/prctl.2:375
1942 msgid ""
1943 "Set the machine check memory corruption kill policy for the current thread.  "
1944 "If I<arg2> is B<PR_MCE_KILL_CLEAR>, clear the thread memory corruption kill "
1945 "policy and use the system-wide default.  (The system-wide default is defined "
1946 "by I</proc/sys/vm/memory_failure_early_kill>; see B<proc>(5).)  If I<arg2> "
1947 "is B<PR_MCE_KILL_SET>, use a thread-specific memory corruption kill policy.  "
1948 "In this case, I<arg3> defines whether the policy is I<early kill> "
1949 "(B<PR_MCE_KILL_EARLY>), I<late kill> (B<PR_MCE_KILL_LATE>), or the "
1950 "system-wide default (B<PR_MCE_KILL_DEFAULT>).  Early kill means that the "
1951 "thread receives a B<SIGBUS> signal as soon as hardware memory corruption is "
1952 "detected inside its address space.  In late kill mode, the process is only "
1953 "killed when it accesses a corrupted page.  See B<sigaction>(2)  for more "
1954 "information on the B<SIGBUS> signal.  The policy is inherited by children.  "
1955 "The remaining unused B<prctl>()  arguments must be zero for future "
1956 "compatibility."
1957 msgstr ""
1958
1959 #. type: TP
1960 #: build/C/man2/prctl.2:375
1961 #, no-wrap
1962 msgid "B<PR_MCE_KILL_GET> (since Linux 2.6.32)"
1963 msgstr ""
1964
1965 #. type: Plain text
1966 #: build/C/man2/prctl.2:381
1967 msgid ""
1968 "Return the current per-process machine check kill policy.  All unused "
1969 "B<prctl>()  arguments must be zero."
1970 msgstr ""
1971
1972 #. type: TP
1973 #: build/C/man2/prctl.2:381
1974 #, no-wrap
1975 msgid "B<PR_SET_MM> (since Linux 3.3)"
1976 msgstr ""
1977
1978 #. type: Plain text
1979 #: build/C/man2/prctl.2:401
1980 msgid ""
1981 "Modify certain kernel memory map descriptor fields of the calling process.  "
1982 "Usually these fields are set by the kernel and dynamic loader (see "
1983 "B<ld.so>(8)  for more information) and a regular application should not use "
1984 "this feature.  However, there are cases, such as self-modifying programs, "
1985 "where a program might find it useful to change its own memory map.  This "
1986 "feature is available only if the kernel is built with the "
1987 "B<CONFIG_CHECKPOINT_RESTORE> option enabled.  The calling process must have "
1988 "the B<CAP_SYS_RESOURCE> capability.  The value in I<arg2> is one of the "
1989 "options below, while I<arg3> provides a new value for the option."
1990 msgstr ""
1991
1992 #. type: TP
1993 #: build/C/man2/prctl.2:402
1994 #, no-wrap
1995 msgid "B<PR_SET_MM_START_CODE>"
1996 msgstr ""
1997
1998 #. type: Plain text
1999 #: build/C/man2/prctl.2:411
2000 msgid ""
2001 "Set the address above which the program text can run.  The corresponding "
2002 "memory area must be readable and executable, but not writable or sharable "
2003 "(see B<mprotect>(2)  and B<mmap>(2)  for more information)."
2004 msgstr ""
2005
2006 #. type: TP
2007 #: build/C/man2/prctl.2:411
2008 #, no-wrap
2009 msgid "B<PR_SET_MM_END_CODE>"
2010 msgstr ""
2011
2012 #. type: Plain text
2013 #: build/C/man2/prctl.2:416
2014 msgid ""
2015 "Set the address below which the program text can run.  The corresponding "
2016 "memory area must be readable and executable, but not writable or sharable."
2017 msgstr ""
2018
2019 #. type: TP
2020 #: build/C/man2/prctl.2:416
2021 #, no-wrap
2022 msgid "B<PR_SET_MM_START_DATA>"
2023 msgstr ""
2024
2025 #. type: Plain text
2026 #: build/C/man2/prctl.2:422
2027 msgid ""
2028 "Set the address above which initialized and uninitialized (bss) data are "
2029 "placed.  The corresponding memory area must be readable and writable, but "
2030 "not executable or sharable."
2031 msgstr ""
2032
2033 #. type: TP
2034 #: build/C/man2/prctl.2:422
2035 #, no-wrap
2036 msgid "B<PR_SET_MM_END_DATA>"
2037 msgstr ""
2038
2039 #. type: Plain text
2040 #: build/C/man2/prctl.2:428
2041 msgid ""
2042 "Set the address below which initialized and uninitialized (bss) data are "
2043 "placed.  The corresponding memory area must be readable and writable, but "
2044 "not executable or sharable."
2045 msgstr ""
2046
2047 #. type: TP
2048 #: build/C/man2/prctl.2:428
2049 #, no-wrap
2050 msgid "B<PR_SET_MM_START_STACK>"
2051 msgstr ""
2052
2053 #. type: Plain text
2054 #: build/C/man2/prctl.2:432
2055 msgid ""
2056 "Set the start address of the stack.  The corresponding memory area must be "
2057 "readable and writable."
2058 msgstr ""
2059
2060 #. type: TP
2061 #: build/C/man2/prctl.2:432
2062 #, no-wrap
2063 msgid "B<PR_SET_MM_START_BRK>"
2064 msgstr ""
2065
2066 #. type: Plain text
2067 #: build/C/man2/prctl.2:444
2068 msgid ""
2069 "Set the address above which the program heap can be expanded with B<brk>(2)  "
2070 "call.  The address must be greater than the ending address of the current "
2071 "program data segment.  In addition, the combined size of the resulting heap "
2072 "and the size of the data segment can't exceed the B<RLIMIT_DATA> resource "
2073 "limit (see B<setrlimit>(2))."
2074 msgstr ""
2075
2076 #. type: TP
2077 #: build/C/man2/prctl.2:444
2078 #, no-wrap
2079 msgid "B<PR_SET_MM_BRK>"
2080 msgstr ""
2081
2082 #.  FIXME The following (until ========) is not yet in mainline kernel,
2083 #.  so commented out for the moment.
2084 #.  .TP
2085 #.  .BR PR_SET_MM_ARG_START
2086 #.  Set the address above which the program command line is placed.
2087 #.  .TP
2088 #.  .BR PR_SET_MM_ARG_END
2089 #.  Set the address below which the program command line is placed.
2090 #.  .TP
2091 #.  .BR PR_SET_MM_ENV_START
2092 #.  Set the address above which the program environment is placed.
2093 #.  .TP
2094 #.  .BR PR_SET_MM_ENV_END
2095 #.  Set the address below which the program environment is placed.
2096 #.  .IP
2097 #.  The address passed with
2098 #.  .BR PR_SET_MM_ARG_START ,
2099 #.  .BR PR_SET_MM_ARG_END ,
2100 #.  .BR PR_SET_MM_ENV_START ,
2101 #.  and
2102 #.  .BR PR_SET_MM_ENV_END
2103 #.  should belong to a process stack area.
2104 #.  Thus, the corresponding memory area must be readable, writable, and
2105 #.  (depending on the kernel configuration) have the
2106 #.  .BR MAP_GROWSDOWN
2107 #.  attribute set (see
2108 #.  .BR mmap (2)).
2109 #.  .TP
2110 #.  .BR PR_SET_MM_AUXV
2111 #.  Set a new auxiliary vector.
2112 #.  The
2113 #.  .I arg3
2114 #.  argument should provide the address of the vector.
2115 #.  The
2116 #.  .I arg4
2117 #.  is the size of the vector.
2118 #.  .TP
2119 #.  .BR PR_SET_MM_EXE_FILE
2120 #.  Supersede the
2121 #.  .IR /proc/pid/exe
2122 #.  symbolic link with a new one pointing to a new executable file
2123 #.  identified by the file descriptor provided in
2124 #.  .I arg3
2125 #.  argument.
2126 #.  The file descriptor should be obtained with a regular
2127 #.  .BR open (2)
2128 #.  call.
2129 #.  .IP
2130 #.  To change the symbolic link, one needs to unmap all existing
2131 #.  executable memory areas, including those created by the kernel itself
2132 #.  (for example the kernel usually creates at least one executable
2133 #.  memory area for the ELF
2134 #.  .IR .text
2135 #.  section).
2136 #.  .IP
2137 #.  The second limitation is that such transitions can be done only once
2138 #.  in a process life time.
2139 #.  Any further attempts will be rejected.
2140 #.  This should help system administrators to monitor unusual
2141 #.  symbolic-link transitions over all process running in a system.
2142 #.  ========== END FIXME
2143 #. type: Plain text
2144 #: build/C/man2/prctl.2:513
2145 msgid ""
2146 "Set the current B<brk>(2)  value.  The requirements for the address are the "
2147 "same as for the B<PR_SET_MM_START_BRK> option."
2148 msgstr ""
2149
2150 #. type: Plain text
2151 #: build/C/man2/prctl.2:532
2152 msgid ""
2153 "On success, B<PR_GET_DUMPABLE>, B<PR_GET_KEEPCAPS>, B<PR_CAPBSET_READ>, "
2154 "B<PR_GET_TIMING>, B<PR_GET_SECUREBITS>, B<PR_MCE_KILL_GET>, and (if it "
2155 "returns)  B<PR_GET_SECCOMP> return the nonnegative values described above.  "
2156 "All other I<option> values return 0 on success.  On error, -1 is returned, "
2157 "and I<errno> is set appropriately."
2158 msgstr ""
2159
2160 #. type: Plain text
2161 #: build/C/man2/prctl.2:537
2162 msgid "I<arg2> is an invalid address."
2163 msgstr ""
2164
2165 #. type: Plain text
2166 #: build/C/man2/prctl.2:542
2167 msgid "The value of I<option> is not recognized."
2168 msgstr ""
2169
2170 #. type: Plain text
2171 #: build/C/man2/prctl.2:554
2172 msgid ""
2173 "I<option> is B<PR_MCE_KILL> or B<PR_MCE_KILL_GET> or B<PR_SET_MM>, and "
2174 "unused B<prctl>()  arguments were not specified as zero."
2175 msgstr ""
2176
2177 #. type: Plain text
2178 #: build/C/man2/prctl.2:559
2179 msgid "I<arg2> is not valid value for this I<option>."
2180 msgstr ""
2181
2182 #. type: Plain text
2183 #: build/C/man2/prctl.2:568
2184 msgid ""
2185 "I<option> is B<PR_SET_SECCOMP> or B<PR_SET_SECCOMP>, and the kernel was not "
2186 "configured with B<CONFIG_SECCOMP>."
2187 msgstr ""
2188
2189 #. type: Plain text
2190 #: build/C/man2/prctl.2:574
2191 msgid "I<option> is B<PR_SET_MM>, and one of the following is true"
2192 msgstr ""
2193
2194 #. type: Plain text
2195 #: build/C/man2/prctl.2:580
2196 msgid "I<arg4> or I<arg5> is nonzero;"
2197 msgstr ""
2198
2199 #. type: Plain text
2200 #: build/C/man2/prctl.2:585
2201 msgid ""
2202 "I<arg3> is greater than B<TASK_SIZE> (the limit on the size of the user "
2203 "address space for this architecture);"
2204 msgstr ""
2205
2206 #. type: Plain text
2207 #: build/C/man2/prctl.2:595
2208 msgid ""
2209 "I<arg2> is B<PR_SET_MM_START_CODE>, B<PR_SET_MM_END_CODE>, "
2210 "B<PR_SET_MM_START_DATA>, B<PR_SET_MM_END_DATA>, or B<PR_SET_MM_START_STACK,> "
2211 "and the permissions of the corresponding memory area are not as required;"
2212 msgstr ""
2213
2214 #. type: Plain text
2215 #: build/C/man2/prctl.2:607
2216 msgid ""
2217 "I<arg2> is B<PR_SET_MM_START_BRK> or B<PR_SET_MM_BRK>, and I<arg3> is less "
2218 "than or equal to the end of the data segment or specifies a value that would "
2219 "cause the B<RLIMIT_DATA> resource limit to be exceeded."
2220 msgstr ""
2221
2222 #. type: Plain text
2223 #: build/C/man2/prctl.2:620
2224 msgid ""
2225 "I<option> is B<PR_SET_SECUREBITS>, and the caller does not have the "
2226 "B<CAP_SETPCAP> capability, or tried to unset a \"locked\" flag, or tried to "
2227 "set a flag whose corresponding locked flag was set (see B<capabilities>(7))."
2228 msgstr ""
2229
2230 #. type: Plain text
2231 #: build/C/man2/prctl.2:630
2232 msgid ""
2233 "I<option> is B<PR_SET_KEEPCAPS>, and the callers's "
2234 "B<SECURE_KEEP_CAPS_LOCKED> flag is set (see B<capabilities>(7))."
2235 msgstr ""
2236
2237 #. type: Plain text
2238 #: build/C/man2/prctl.2:638
2239 msgid ""
2240 "I<option> is B<PR_CAPBSET_DROP>, and the caller does not have the "
2241 "B<CAP_SETPCAP> capability."
2242 msgstr ""
2243
2244 #.  FIXME The following (until ========) is not yet in mainline kernel,
2245 #.  so commented out for the moment.
2246 #.  .TP
2247 #.  .B EACCES
2248 #.  .I option
2249 #.  is
2250 #.  .BR PR_SET_MM ,
2251 #.  and
2252 #.  .I arg3
2253 #.  is
2254 #.  .BR PR_SET_MM_EXE_FILE ,
2255 #.  the file is not executable.
2256 #.  .TP
2257 #.  .B EBUSY
2258 #.  .I option
2259 #.  is
2260 #.  .BR PR_SET_MM ,
2261 #.  .I arg3
2262 #.  is
2263 #.  .BR PR_SET_MM_EXE_FILE ,
2264 #.  and this the second attempt to change the
2265 #.  .I /proc/pid/exe
2266 #.  symbolic link, which is prohibited.
2267 #.  .TP
2268 #.  .B EBADF
2269 #.  .I option
2270 #.  is
2271 #.  .BR PR_SET_MM ,
2272 #.  .I arg3
2273 #.  is
2274 #.  .BR PR_SET_MM_EXE_FILE ,
2275 #.  and the file descriptor passed in
2276 #.  .I arg4
2277 #.  is not valid.
2278 #.  ========== END FIXME
2279 #.  The following can't actually happen, because prctl() in
2280 #.  seccomp mode will cause SIGKILL.
2281 #.  .TP
2282 #.  .B EPERM
2283 #.  .I option
2284 #.  is
2285 #.  .BR PR_SET_SECCOMP ,
2286 #.  and secure computing mode is already 1.
2287 #. type: Plain text
2288 #: build/C/man2/prctl.2:689
2289 msgid ""
2290 "I<option> is B<PR_SET_MM>, and the caller does not have the "
2291 "B<CAP_SYS_RESOURCE> capability."
2292 msgstr ""
2293
2294 #.  The library interface was added in glibc 2.0.6
2295 #. type: Plain text
2296 #: build/C/man2/prctl.2:694
2297 msgid "The B<prctl>()  system call was introduced in Linux 2.1.57."
2298 msgstr ""
2299
2300 #. type: Plain text
2301 #: build/C/man2/prctl.2:701
2302 msgid ""
2303 "This call is Linux-specific.  IRIX has a B<prctl>()  system call (also "
2304 "introduced in Linux 2.1.44 as irix_prctl on the MIPS architecture), with "
2305 "prototype"
2306 msgstr ""
2307
2308 #. type: Plain text
2309 #: build/C/man2/prctl.2:703
2310 msgid "B<ptrdiff_t prctl(int >I<option>B<, int >I<arg2>B<, int >I<arg3>B<);>"
2311 msgstr ""
2312
2313 #. type: Plain text
2314 #: build/C/man2/prctl.2:708
2315 msgid ""
2316 "and options to get the maximum number of processes per user, get the maximum "
2317 "number of processors the calling process can use, find out whether a "
2318 "specified process is currently blocked, get or set the maximum stack size, "
2319 "etc."
2320 msgstr ""
2321
2322 #. type: Plain text
2323 #: build/C/man2/prctl.2:710
2324 msgid "B<signal>(2), B<core>(5)"
2325 msgstr ""
2326
2327 #. type: TH
2328 #: build/C/man3/profil.3:28
2329 #, no-wrap
2330 msgid "PROFIL"
2331 msgstr ""
2332
2333 #. type: Plain text
2334 #: build/C/man3/profil.3:31
2335 msgid "profil - execution time profile"
2336 msgstr ""
2337
2338 #. type: Plain text
2339 #: build/C/man3/profil.3:36
2340 msgid ""
2341 "B<int profil(unsigned short *>I<buf>B<, size_t >I<bufsiz>B<, size_t "
2342 ">I<offset>B<, unsigned int >I<scale>B<);>"
2343 msgstr ""
2344
2345 #. type: Plain text
2346 #: build/C/man3/profil.3:44
2347 msgid "B<profil>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
2348 msgstr ""
2349
2350 #. type: Plain text
2351 #: build/C/man3/profil.3:66
2352 msgid ""
2353 "This routine provides a means to find out in what areas your program spends "
2354 "most of its time.  The argument I<buf> points to I<bufsiz> bytes of core.  "
2355 "Every virtual 10 milliseconds, the user's program counter (PC)  is examined: "
2356 "I<offset> is subtracted and the result is multiplied by I<scale> and divided "
2357 "by 65536.  If the resulting value is less than I<bufsiz>, then the "
2358 "corresponding entry in I<buf> is incremented.  If I<buf> is NULL, profiling "
2359 "is disabled."
2360 msgstr ""
2361
2362 #. type: Plain text
2363 #: build/C/man3/profil.3:68
2364 msgid "Zero is always returned."
2365 msgstr ""
2366
2367 #. type: Plain text
2368 #: build/C/man3/profil.3:70
2369 msgid "Similar to a call in SVr4 (but not POSIX.1-2001)."
2370 msgstr ""
2371
2372 #. type: Plain text
2373 #: build/C/man3/profil.3:76
2374 msgid ""
2375 "B<profil>()  cannot be used on a program that also uses B<ITIMER_PROF> "
2376 "interval timers (see B<setitimer>(2))."
2377 msgstr ""
2378
2379 #. type: Plain text
2380 #: build/C/man3/profil.3:79
2381 msgid ""
2382 "True kernel profiling provides more accurate results.  Libc 4.4 contained a "
2383 "kernel patch providing a system call profil."
2384 msgstr ""
2385
2386 #. type: Plain text
2387 #: build/C/man3/profil.3:83
2388 msgid "B<gprof>(1), B<setitimer>(2), B<sigaction>(2), B<signal>(2)"
2389 msgstr ""
2390
2391 #. type: TH
2392 #: build/C/man3/psignal.3:28
2393 #, no-wrap
2394 msgid "PSIGNAL"
2395 msgstr ""
2396
2397 #. type: TH
2398 #: build/C/man3/psignal.3:28
2399 #, no-wrap
2400 msgid "2010-10-06"
2401 msgstr ""
2402
2403 #. type: TH
2404 #: build/C/man3/psignal.3:28 build/C/man3/raise.3:27 build/C/man7/sigevent.7:24
2405 #, no-wrap
2406 msgid "GNU"
2407 msgstr ""
2408
2409 #. type: Plain text
2410 #: build/C/man3/psignal.3:31
2411 msgid "psignal, psiginfo - print signal message"
2412 msgstr ""
2413
2414 #. type: Plain text
2415 #: build/C/man3/psignal.3:37
2416 #, no-wrap
2417 msgid ""
2418 "B<void psignal(int >I<sig>B<, const char *>I<s>B<);>\n"
2419 "B<void psiginfo(const siginfo_t *>I<pinfo>B<, const char *>I<s>B<);>\n"
2420 msgstr ""
2421
2422 #. type: Plain text
2423 #: build/C/man3/psignal.3:39
2424 #, no-wrap
2425 msgid "B<extern const char *const >I<sys_siglist>B<[];>\n"
2426 msgstr ""
2427
2428 #. type: Plain text
2429 #: build/C/man3/psignal.3:48
2430 msgid "B<psignal>(): _SVID_SOURCE || _BSD_SOURCE"
2431 msgstr ""
2432
2433 #. type: Plain text
2434 #: build/C/man3/psignal.3:51
2435 msgid ""
2436 "B<psiginfo>(): _XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ "
2437 "200809L"
2438 msgstr ""
2439
2440 #. type: Plain text
2441 #: build/C/man3/psignal.3:54
2442 msgid "I<sys_siglist>: _BSD_SOURCE"
2443 msgstr ""
2444
2445 #. type: Plain text
2446 #: build/C/man3/psignal.3:63
2447 msgid ""
2448 "The B<psignal>()  function displays a message on I<stderr> consisting of the "
2449 "string I<s>, a colon, a space, a string describing the signal number I<sig>, "
2450 "and a trailing newline.  If the string I<s> is NULL or empty, the colon and "
2451 "space are omitted.  If I<sig> is invalid, the message displayed will "
2452 "indicate an unknown signal."
2453 msgstr ""
2454
2455 #. type: Plain text
2456 #: build/C/man3/psignal.3:84
2457 msgid ""
2458 "The B<psiginfo>()  function is like B<psignal>(), except that it displays "
2459 "information about the signal described by I<pinfo>, which should point to a "
2460 "valid I<siginfo_t> structure.  As well as the signal description, "
2461 "B<psiginfo>()  displays information about the origin of the signal, and "
2462 "other information relevant to the signal (e.g., the relevant memory address "
2463 "for hardware-generated signals, the child process ID for B<SIGCHLD>, and the "
2464 "user ID and process ID of the sender, for signals set using B<kill>(2)  or "
2465 "B<sigqueue>(3))."
2466 msgstr ""
2467
2468 #. type: Plain text
2469 #: build/C/man3/psignal.3:87
2470 msgid ""
2471 "The array I<sys_siglist> holds the signal description strings indexed by "
2472 "signal number."
2473 msgstr ""
2474
2475 #. type: Plain text
2476 #: build/C/man3/psignal.3:93
2477 msgid "The B<psignal>()  and B<psiginfo>()  functions return no value."
2478 msgstr ""
2479
2480 #. type: Plain text
2481 #: build/C/man3/psignal.3:97
2482 msgid "The B<psiginfo>()  function was added to glibc in version 2.10."
2483 msgstr ""
2484
2485 #. type: Plain text
2486 #: build/C/man3/psignal.3:99
2487 msgid "POSIX.1-2008, 4.3BSD."
2488 msgstr ""
2489
2490 #. type: Plain text
2491 #: build/C/man3/psignal.3:103
2492 msgid "In glibc versions up to 2.12, B<psiginfo>()  had the following bugs:"
2493 msgstr ""
2494
2495 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12107
2496 #.  Reportedly now fixed; check glibc 2.13
2497 #. type: Plain text
2498 #: build/C/man3/psignal.3:107
2499 msgid "In some circumstances, a trailing newline is not printed."
2500 msgstr ""
2501
2502 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12108
2503 #.  Reportedly now fixed; check glibc 2.13
2504 #. type: Plain text
2505 #: build/C/man3/psignal.3:111
2506 msgid "Additional details are not displayed for real-time signals."
2507 msgstr ""
2508
2509 #. type: Plain text
2510 #: build/C/man3/psignal.3:115
2511 msgid "B<sigaction>(2), B<perror>(3), B<strsignal>(3), B<signal>(7)"
2512 msgstr ""
2513
2514 #. type: TH
2515 #: build/C/man3/raise.3:27
2516 #, no-wrap
2517 msgid "RAISE"
2518 msgstr ""
2519
2520 #. type: TH
2521 #: build/C/man3/raise.3:27
2522 #, no-wrap
2523 msgid "2008-10-17"
2524 msgstr ""
2525
2526 #. type: Plain text
2527 #: build/C/man3/raise.3:30
2528 msgid "raise - send a signal to the caller"
2529 msgstr ""
2530
2531 #. type: Plain text
2532 #: build/C/man3/raise.3:35
2533 #, no-wrap
2534 msgid "B<int raise(int >I<sig>B<);>\n"
2535 msgstr ""
2536
2537 #. type: Plain text
2538 #: build/C/man3/raise.3:41
2539 msgid ""
2540 "The B<raise>()  function sends a signal to the calling process or thread.  "
2541 "In a single-threaded program it is equivalent to"
2542 msgstr ""
2543
2544 #. type: Plain text
2545 #: build/C/man3/raise.3:45
2546 #, no-wrap
2547 msgid "kill(getpid(), sig);\n"
2548 msgstr ""
2549
2550 #. type: Plain text
2551 #: build/C/man3/raise.3:49
2552 msgid "In a multithreaded program it is equivalent to"
2553 msgstr ""
2554
2555 #. type: Plain text
2556 #: build/C/man3/raise.3:53
2557 #, no-wrap
2558 msgid "pthread_kill(pthread_self(), sig);\n"
2559 msgstr ""
2560
2561 #. type: Plain text
2562 #: build/C/man3/raise.3:59
2563 msgid ""
2564 "If the signal causes a handler to be called, B<raise>()  will only return "
2565 "after the signal handler has returned."
2566 msgstr ""
2567
2568 #. type: Plain text
2569 #: build/C/man3/raise.3:62
2570 msgid "B<raise>()  returns 0 on success, and nonzero for failure."
2571 msgstr ""
2572
2573 #. type: Plain text
2574 #: build/C/man3/raise.3:64 build/C/man2/signal.2:107
2575 msgid "C89, C99, POSIX.1-2001."
2576 msgstr ""
2577
2578 #. type: Plain text
2579 #: build/C/man3/raise.3:70
2580 msgid ""
2581 "B<getpid>(2), B<kill>(2), B<sigaction>(2), B<signal>(2), B<pthread_kill>(3), "
2582 "B<signal>(7)"
2583 msgstr ""
2584
2585 #. type: TH
2586 #: build/C/man2/rt_sigqueueinfo.2:23
2587 #, no-wrap
2588 msgid "RT_SIGQUEUEINFO"
2589 msgstr ""
2590
2591 #. type: TH
2592 #: build/C/man2/rt_sigqueueinfo.2:23 build/C/man7/signal.7:44 build/C/man2/tkill.2:29
2593 #, no-wrap
2594 msgid "2011-09-18"
2595 msgstr ""
2596
2597 #. type: Plain text
2598 #: build/C/man2/rt_sigqueueinfo.2:26
2599 msgid "rt_sigqueueinfo, rt_tgsigqueueinfo - queue a signal and data"
2600 msgstr ""
2601
2602 #. type: Plain text
2603 #: build/C/man2/rt_sigqueueinfo.2:29
2604 #, no-wrap
2605 msgid ""
2606 "B<int rt_sigqueueinfo(pid_t >I<tgid>B<, int >I<sig>B<, siginfo_t "
2607 "*>I<uinfo>B<);>\n"
2608 msgstr ""
2609
2610 #. type: Plain text
2611 #: build/C/man2/rt_sigqueueinfo.2:32
2612 #, no-wrap
2613 msgid ""
2614 "B<int rt_tgsigqueueinfo(pid_t >I<tgid>B<, pid_t >I<tid>B<, int >I<sig>B<,>\n"
2615 "B<                      siginfo_t *>I<uinfo>B<);>\n"
2616 msgstr ""
2617
2618 #. type: Plain text
2619 #: build/C/man2/rt_sigqueueinfo.2:45
2620 msgid ""
2621 "The B<rt_sigqueueinfo>()  and B<rt_tgsigqueueinfo>()  system calls are the "
2622 "low-level interfaces used to send a signal plus data to a process or "
2623 "thread.  The receiver of the signal can obtain the accompanying data by "
2624 "establishing a signal handler with the B<sigaction>(2)  B<SA_SIGINFO> flag."
2625 msgstr ""
2626
2627 #. type: Plain text
2628 #: build/C/man2/rt_sigqueueinfo.2:51
2629 msgid ""
2630 "These system calls are not intended for direct application use; they are "
2631 "provided to allow the implementation of B<sigqueue>(3)  and "
2632 "B<pthread_sigqueue>(3)."
2633 msgstr ""
2634
2635 #. type: Plain text
2636 #: build/C/man2/rt_sigqueueinfo.2:63
2637 msgid ""
2638 "The B<rt_sigqueueinfo>()  system call sends the signal I<sig> to the thread "
2639 "group with the ID I<tgid>.  (The term \"thread group\" is synonymous with "
2640 "\"process\", and I<tid> corresponds to the traditional UNIX process ID.)  "
2641 "The signal will be delivered to an arbitrary member of the thread group "
2642 "(i.e., one of the threads that is not currently blocking the signal)."
2643 msgstr ""
2644
2645 #. type: Plain text
2646 #: build/C/man2/rt_sigqueueinfo.2:74
2647 msgid ""
2648 "The I<uinfo> argument specifies the data to accompany the signal.  This "
2649 "argument is a pointer to a structure of type I<siginfo_t>, described in "
2650 "B<sigaction>(2)  (and defined by including I<E<lt>sigaction.hE<gt>>).  The "
2651 "caller should set the following fields in this structure:"
2652 msgstr ""
2653
2654 #. type: TP
2655 #: build/C/man2/rt_sigqueueinfo.2:74 build/C/man7/sigevent.7:86 build/C/man2/wait.2:315
2656 #, no-wrap
2657 msgid "I<si_code>"
2658 msgstr ""
2659
2660 #.  tkill(2) or
2661 #. type: Plain text
2662 #: build/C/man2/rt_sigqueueinfo.2:90
2663 msgid ""
2664 "This must be one of the B<SI_*> codes in the kernel source file "
2665 "I<include/asm-generic/siginfo.h>, with the restriction that the code must be "
2666 "negative (i.e., cannot be B<SI_USER>, which is used by the kernel to "
2667 "indicate a signal sent by B<kill>(2))  and cannot (since Linux 2.6.39) be "
2668 "B<SI_TKILL> (which is used by the kernel to indicate a signal sent using "
2669 "B<tgkill>(2))."
2670 msgstr ""
2671
2672 #. type: TP
2673 #: build/C/man2/rt_sigqueueinfo.2:90 build/C/man2/wait.2:294
2674 #, no-wrap
2675 msgid "I<si_pid>"
2676 msgstr ""
2677
2678 #. type: Plain text
2679 #: build/C/man2/rt_sigqueueinfo.2:94
2680 msgid "This should be set to a process ID, typically the process ID of the sender."
2681 msgstr ""
2682
2683 #. type: TP
2684 #: build/C/man2/rt_sigqueueinfo.2:94 build/C/man2/wait.2:297
2685 #, no-wrap
2686 msgid "I<si_uid>"
2687 msgstr ""
2688
2689 #. type: Plain text
2690 #: build/C/man2/rt_sigqueueinfo.2:98
2691 msgid "This should be set to a user ID, typically the real user ID of the sender."
2692 msgstr ""
2693
2694 #. type: TP
2695 #: build/C/man2/rt_sigqueueinfo.2:98 build/C/man7/sigevent.7:94
2696 #, no-wrap
2697 msgid "I<si_value>"
2698 msgstr ""
2699
2700 #. type: Plain text
2701 #: build/C/man2/rt_sigqueueinfo.2:105
2702 msgid ""
2703 "This field contains the user data to accompany the signal.  For more "
2704 "information, see the description of the last (I<union sigval>)  argument of "
2705 "B<sigqueue>(3)."
2706 msgstr ""
2707
2708 #. type: Plain text
2709 #: build/C/man2/rt_sigqueueinfo.2:112
2710 msgid ""
2711 "Internally, the kernel sets the I<si_signo> field to the value specified in "
2712 "I<sig>, so that the receiver of the signal can also obtain the signal number "
2713 "via that field."
2714 msgstr ""
2715
2716 #. type: Plain text
2717 #: build/C/man2/rt_sigqueueinfo.2:124
2718 msgid ""
2719 "The B<rt_tgsigqueueinfo>()  system call is like B<rt_sigqueueinfo>(), but "
2720 "sends the signal and data to the single thread specified by the combination "
2721 "of I<tgid>, a thread group ID, and I<tid>, a thread in that thread group."
2722 msgstr ""
2723
2724 #. type: Plain text
2725 #: build/C/man2/rt_sigqueueinfo.2:129
2726 msgid ""
2727 "On success, these system calls return 0.  On error, they return -1 and "
2728 "I<errno> is set to indicate the error."
2729 msgstr ""
2730
2731 #. type: TP
2732 #: build/C/man2/rt_sigqueueinfo.2:130 build/C/man3/sigqueue.3:90 build/C/man2/sigwaitinfo.2:108 build/C/man2/timer_create.2:174
2733 #, no-wrap
2734 msgid "B<EAGAIN>"
2735 msgstr ""
2736
2737 #. type: Plain text
2738 #: build/C/man2/rt_sigqueueinfo.2:136 build/C/man3/sigqueue.3:96
2739 msgid ""
2740 "The limit of signals which may be queued has been reached.  (See "
2741 "B<signal>(7)  for further information.)"
2742 msgstr ""
2743
2744 #. type: Plain text
2745 #: build/C/man2/rt_sigqueueinfo.2:143
2746 msgid "I<sig>, I<tgid>, or I<tid> was invalid."
2747 msgstr ""
2748
2749 #. type: Plain text
2750 #: build/C/man2/rt_sigqueueinfo.2:151
2751 msgid ""
2752 "The caller does not have permission to send the signal to the target.  For "
2753 "the required permissions, see B<kill>(2).  Or: I<uinfo-E<gt>si_code> is "
2754 "invalid."
2755 msgstr ""
2756
2757 #. type: Plain text
2758 #: build/C/man2/rt_sigqueueinfo.2:157
2759 msgid "B<rt_sigqueueinfo>(): No thread group matching I<tgid> was found."
2760 msgstr ""
2761
2762 #. type: Plain text
2763 #: build/C/man2/rt_sigqueueinfo.2:164
2764 msgid "B<rt_tgsigqueinfo>(): No thread matching I<tgid> and I<tid> was found."
2765 msgstr ""
2766
2767 #. type: Plain text
2768 #: build/C/man2/rt_sigqueueinfo.2:171
2769 msgid ""
2770 "The B<rt_sigqueueinfo>()  system call was added to Linux in version 2.2.  "
2771 "The B<rt_tgsigqueueinfo>()  system call was added to Linux in version "
2772 "2.6.31."
2773 msgstr ""
2774
2775 #. type: Plain text
2776 #: build/C/man2/rt_sigqueueinfo.2:173 build/C/man2/sgetmask.2:63 build/C/man2/timerfd_create.2:372
2777 msgid "These system calls are Linux-specific."
2778 msgstr ""
2779
2780 #. type: Plain text
2781 #: build/C/man2/rt_sigqueueinfo.2:178
2782 msgid ""
2783 "Since these system calls are not intended for application use, there are no "
2784 "glibc wrapper functions; use B<syscall>(2)  in the unlikely case that you "
2785 "want to call them directly."
2786 msgstr ""
2787
2788 #. type: Plain text
2789 #: build/C/man2/rt_sigqueueinfo.2:183
2790 msgid ""
2791 "As with B<kill>(2), the null signal (0) can be used to check if the "
2792 "specified process or thread exists."
2793 msgstr ""
2794
2795 #. type: Plain text
2796 #: build/C/man2/rt_sigqueueinfo.2:190
2797 msgid ""
2798 "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<tgkill>(2), "
2799 "B<pthread_sigqueue>(3), B<sigqueue>(3), B<signal>(7)"
2800 msgstr ""
2801
2802 #. type: TH
2803 #: build/C/man2/sgetmask.2:24
2804 #, no-wrap
2805 msgid "SGETMASK"
2806 msgstr ""
2807
2808 #. type: TH
2809 #: build/C/man2/sgetmask.2:24
2810 #, no-wrap
2811 msgid "2007-07-05"
2812 msgstr ""
2813
2814 #. type: Plain text
2815 #: build/C/man2/sgetmask.2:27
2816 msgid "sgetmask, ssetmask - manipulation of signal mask (obsolete)"
2817 msgstr ""
2818
2819 #. type: Plain text
2820 #: build/C/man2/sgetmask.2:29
2821 msgid "B<long sgetmask(void);>"
2822 msgstr ""
2823
2824 #. type: Plain text
2825 #: build/C/man2/sgetmask.2:31
2826 msgid "B<long ssetmask(long >I<newmask>B<);>"
2827 msgstr ""
2828
2829 #. type: Plain text
2830 #: build/C/man2/sgetmask.2:37
2831 msgid ""
2832 "These system calls are obsolete.  I<Do not use them>; use B<sigprocmask>(2)  "
2833 "instead."
2834 msgstr ""
2835
2836 #. type: Plain text
2837 #: build/C/man2/sgetmask.2:40
2838 msgid "B<sgetmask>()  returns the signal mask of the calling process."
2839 msgstr ""
2840
2841 #. type: Plain text
2842 #: build/C/man2/sgetmask.2:45
2843 msgid ""
2844 "B<ssetmask>()  sets the signal mask of the calling process to the value "
2845 "given in I<newmask>.  The previous signal mask is returned."
2846 msgstr ""
2847
2848 #. type: Plain text
2849 #: build/C/man2/sgetmask.2:54
2850 msgid ""
2851 "The signal masks dealt with by these two system calls are plain bit masks "
2852 "(unlike the I<sigset_t> used by B<sigprocmask>(2)); use B<sigmask>(3)  to "
2853 "create and inspect these masks."
2854 msgstr ""
2855
2856 #. type: Plain text
2857 #: build/C/man2/sgetmask.2:59
2858 msgid ""
2859 "B<sgetmask>()  always successfully returns the signal mask.  B<ssetmask>()  "
2860 "always succeeds, and returns the previous signal mask."
2861 msgstr ""
2862
2863 #. type: Plain text
2864 #: build/C/man2/sgetmask.2:61
2865 msgid "These system calls always succeed."
2866 msgstr ""
2867
2868 #. type: Plain text
2869 #: build/C/man2/sgetmask.2:66
2870 msgid "Glibc does not provide wrappers for these system calls; use B<syscall>(2)."
2871 msgstr ""
2872
2873 #. type: Plain text
2874 #: build/C/man2/sgetmask.2:69
2875 msgid ""
2876 "These system calls are unaware of signal numbers greater than 31 (i.e., "
2877 "real-time signals)."
2878 msgstr ""
2879
2880 #. type: Plain text
2881 #: build/C/man2/sgetmask.2:74
2882 msgid "It is not possible to block B<SIGSTOP> or B<SIGKILL>."
2883 msgstr ""
2884
2885 #. type: Plain text
2886 #: build/C/man2/sgetmask.2:76
2887 msgid "B<sigprocmask>(2), B<signal>(7)"
2888 msgstr ""
2889
2890 #. type: TH
2891 #: build/C/man2/sigaction.2:45
2892 #, no-wrap
2893 msgid "SIGACTION"
2894 msgstr ""
2895
2896 #. type: TH
2897 #: build/C/man2/sigaction.2:45
2898 #, no-wrap
2899 msgid "2012-04-12"
2900 msgstr ""
2901
2902 #. type: Plain text
2903 #: build/C/man2/sigaction.2:48
2904 msgid "sigaction - examine and change a signal action"
2905 msgstr ""
2906
2907 #. type: Plain text
2908 #: build/C/man2/sigaction.2:54
2909 #, no-wrap
2910 msgid ""
2911 "B<int sigaction(int >I<signum>B<, const struct sigaction *>I<act>B<,>\n"
2912 "B<              struct sigaction *>I<oldact>B<);>\n"
2913 msgstr ""
2914
2915 #. type: Plain text
2916 #: build/C/man2/sigaction.2:64
2917 msgid ""
2918 "B<sigaction>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
2919 "_POSIX_SOURCE"
2920 msgstr ""
2921
2922 #. type: Plain text
2923 #: build/C/man2/sigaction.2:73
2924 msgid ""
2925 "The B<sigaction>()  system call is used to change the action taken by a "
2926 "process on receipt of a specific signal.  (See B<signal>(7)  for an overview "
2927 "of signals.)"
2928 msgstr ""
2929
2930 #. type: Plain text
2931 #: build/C/man2/sigaction.2:79
2932 msgid ""
2933 "I<signum> specifies the signal and can be any valid signal except B<SIGKILL> "
2934 "and B<SIGSTOP>."
2935 msgstr ""
2936
2937 #. type: Plain text
2938 #: build/C/man2/sigaction.2:90
2939 msgid ""
2940 "If I<act> is non-NULL, the new action for signal I<signum> is installed from "
2941 "I<act>.  If I<oldact> is non-NULL, the previous action is saved in "
2942 "I<oldact>."
2943 msgstr ""
2944
2945 #. type: Plain text
2946 #: build/C/man2/sigaction.2:94
2947 msgid "The I<sigaction> structure is defined as something like:"
2948 msgstr ""
2949
2950 #. type: Plain text
2951 #: build/C/man2/sigaction.2:104
2952 #, no-wrap
2953 msgid ""
2954 "struct sigaction {\n"
2955 "    void     (*sa_handler)(int);\n"
2956 "    void     (*sa_sigaction)(int, siginfo_t *, void *);\n"
2957 "    sigset_t   sa_mask;\n"
2958 "    int        sa_flags;\n"
2959 "    void     (*sa_restorer)(void);\n"
2960 "};\n"
2961 msgstr ""
2962
2963 #. type: Plain text
2964 #: build/C/man2/sigaction.2:111
2965 msgid ""
2966 "On some architectures a union is involved: do not assign to both "
2967 "I<sa_handler> and I<sa_sigaction>."
2968 msgstr ""
2969
2970 #. type: Plain text
2971 #: build/C/man2/sigaction.2:118
2972 msgid ""
2973 "The I<sa_restorer> element is obsolete and should not be used.  POSIX does "
2974 "not specify a I<sa_restorer> element."
2975 msgstr ""
2976
2977 #. type: Plain text
2978 #: build/C/man2/sigaction.2:128
2979 msgid ""
2980 "I<sa_handler> specifies the action to be associated with I<signum> and may "
2981 "be B<SIG_DFL> for the default action, B<SIG_IGN> to ignore this signal, or a "
2982 "pointer to a signal handling function.  This function receives the signal "
2983 "number as its only argument."
2984 msgstr ""
2985
2986 #. type: Plain text
2987 #: build/C/man2/sigaction.2:150
2988 msgid ""
2989 "If B<SA_SIGINFO> is specified in I<sa_flags>, then I<sa_sigaction> (instead "
2990 "of I<sa_handler>)  specifies the signal-handling function for I<signum>.  "
2991 "This function receives the signal number as its first argument, a pointer to "
2992 "a I<siginfo_t> as its second argument and a pointer to a I<ucontext_t> (cast "
2993 "to I<void\\ *>) as its third argument.  (Commonly, the handler function "
2994 "doesn't make any use of the third argument.  See B<getcontext>(2)  for "
2995 "further information about I<ucontext_t>.)"
2996 msgstr ""
2997
2998 #. type: Plain text
2999 #: build/C/man2/sigaction.2:160
3000 msgid ""
3001 "I<sa_mask> specifies a mask of signals which should be blocked (i.e., added "
3002 "to the signal mask of the thread in which the signal handler is invoked)  "
3003 "during execution of the signal handler.  In addition, the signal which "
3004 "triggered the handler will be blocked, unless the B<SA_NODEFER> flag is "
3005 "used."
3006 msgstr ""
3007
3008 #. type: Plain text
3009 #: build/C/man2/sigaction.2:164
3010 msgid ""
3011 "I<sa_flags> specifies a set of flags which modify the behavior of the "
3012 "signal.  It is formed by the bitwise OR of zero or more of the following:"
3013 msgstr ""
3014
3015 #. type: TP
3016 #: build/C/man2/sigaction.2:165
3017 #, no-wrap
3018 msgid "B<SA_NOCLDSTOP>"
3019 msgstr ""
3020
3021 #. type: Plain text
3022 #: build/C/man2/sigaction.2:182
3023 msgid ""
3024 "If I<signum> is B<SIGCHLD>, do not receive notification when child processes "
3025 "stop (i.e., when they receive one of B<SIGSTOP>, B<SIGTSTP>, B<SIGTTIN> or "
3026 "B<SIGTTOU>)  or resume (i.e., they receive B<SIGCONT>)  (see B<wait>(2)).  "
3027 "This flag is only meaningful when establishing a handler for B<SIGCHLD>."
3028 msgstr ""
3029
3030 #. type: TP
3031 #: build/C/man2/sigaction.2:182
3032 #, no-wrap
3033 msgid "B<SA_NOCLDWAIT> (since Linux 2.6)"
3034 msgstr ""
3035
3036 #.  To be precise: Linux 2.5.60 -- MTK
3037 #. type: Plain text
3038 #: build/C/man2/sigaction.2:196
3039 msgid ""
3040 "If I<signum> is B<SIGCHLD>, do not transform children into zombies when they "
3041 "terminate.  See also B<waitpid>(2).  This flag is only meaningful when "
3042 "establishing a handler for B<SIGCHLD>, or when setting that signal's "
3043 "disposition to B<SIG_DFL>."
3044 msgstr ""
3045
3046 #. type: Plain text
3047 #: build/C/man2/sigaction.2:208
3048 msgid ""
3049 "If the B<SA_NOCLDWAIT> flag is set when establishing a handler for "
3050 "B<SIGCHLD>, POSIX.1 leaves it unspecified whether a B<SIGCHLD> signal is "
3051 "generated when a child process terminates.  On Linux, a B<SIGCHLD> signal is "
3052 "generated in this case; on some other implementations, it is not."
3053 msgstr ""
3054
3055 #. type: TP
3056 #: build/C/man2/sigaction.2:208
3057 #, no-wrap
3058 msgid "B<SA_NODEFER>"
3059 msgstr ""
3060
3061 #. type: Plain text
3062 #: build/C/man2/sigaction.2:215
3063 msgid ""
3064 "Do not prevent the signal from being received from within its own signal "
3065 "handler.  This flag is only meaningful when establishing a signal handler.  "
3066 "B<SA_NOMASK> is an obsolete, nonstandard synonym for this flag."
3067 msgstr ""
3068
3069 #. type: TP
3070 #: build/C/man2/sigaction.2:215
3071 #, no-wrap
3072 msgid "B<SA_ONSTACK>"
3073 msgstr ""
3074
3075 #. type: Plain text
3076 #: build/C/man2/sigaction.2:221
3077 msgid ""
3078 "Call the signal handler on an alternate signal stack provided by "
3079 "B<sigaltstack>(2).  If an alternate stack is not available, the default "
3080 "stack will be used.  This flag is only meaningful when establishing a signal "
3081 "handler."
3082 msgstr ""
3083
3084 #. type: TP
3085 #: build/C/man2/sigaction.2:221
3086 #, no-wrap
3087 msgid "B<SA_RESETHAND>"
3088 msgstr ""
3089
3090 #. type: Plain text
3091 #: build/C/man2/sigaction.2:228
3092 msgid ""
3093 "Restore the signal action to the default state once the signal handler has "
3094 "been called.  This flag is only meaningful when establishing a signal "
3095 "handler.  B<SA_ONESHOT> is an obsolete, nonstandard synonym for this flag."
3096 msgstr ""
3097
3098 #. type: TP
3099 #: build/C/man2/sigaction.2:228
3100 #, no-wrap
3101 msgid "B<SA_RESTART>"
3102 msgstr ""
3103
3104 #. type: Plain text
3105 #: build/C/man2/sigaction.2:236
3106 msgid ""
3107 "Provide behavior compatible with BSD signal semantics by making certain "
3108 "system calls restartable across signals.  This flag is only meaningful when "
3109 "establishing a signal handler.  See B<signal>(7)  for a discussion of system "
3110 "call restarting."
3111 msgstr ""
3112
3113 #. type: TP
3114 #: build/C/man2/sigaction.2:236
3115 #, no-wrap
3116 msgid "B<SA_SIGINFO> (since Linux 2.2)"
3117 msgstr ""
3118
3119 #.  (The
3120 #.  .I sa_sigaction
3121 #.  field was added in Linux 2.1.86.)
3122 #. type: Plain text
3123 #: build/C/man2/sigaction.2:247
3124 msgid ""
3125 "The signal handler takes 3 arguments, not one.  In this case, "
3126 "I<sa_sigaction> should be set instead of I<sa_handler>.  This flag is only "
3127 "meaningful when establishing a signal handler."
3128 msgstr ""
3129
3130 #. type: Plain text
3131 #: build/C/man2/sigaction.2:254
3132 msgid ""
3133 "The I<siginfo_t> argument to I<sa_sigaction> is a struct with the following "
3134 "elements:"
3135 msgstr ""
3136
3137 #.  FIXME
3138 #.  si_trapno seems to be only used on SPARC and Alpha;
3139 #.  this page could use a little more detail on its purpose there.
3140 #.  In the kernel: si_tid
3141 #. type: Plain text
3142 #: build/C/man2/sigaction.2:285
3143 #, no-wrap
3144 msgid ""
3145 "siginfo_t {\n"
3146 "    int      si_signo;    /* Signal number */\n"
3147 "    int      si_errno;    /* An errno value */\n"
3148 "    int      si_code;     /* Signal code */\n"
3149 "    int      si_trapno;   /* Trap number that caused\n"
3150 "                             hardware-generated signal\n"
3151 "                             (unused on most architectures) */\n"
3152 "    pid_t    si_pid;      /* Sending process ID */\n"
3153 "    uid_t    si_uid;      /* Real user ID of sending process */\n"
3154 "    int      si_status;   /* Exit value or signal */\n"
3155 "    clock_t  si_utime;    /* User time consumed */\n"
3156 "    clock_t  si_stime;    /* System time consumed */\n"
3157 "    sigval_t si_value;    /* Signal value */\n"
3158 "    int      si_int;      /* POSIX.1b signal */\n"
3159 "    void    *si_ptr;      /* POSIX.1b signal */\n"
3160 "    int      si_overrun;  /* Timer overrun count; POSIX.1b timers */\n"
3161 "    int      si_timerid;  /* Timer ID; POSIX.1b timers */\n"
3162 "    void    *si_addr;     /* Memory location which caused fault */\n"
3163 "    long     si_band;     /* Band event (was I<int> in\n"
3164 "                             glibc 2.3.2 and earlier) */\n"
3165 "    int      si_fd;       /* File descriptor */\n"
3166 "    short    si_addr_lsb; /* Least significant bit of address\n"
3167 "                             (since kernel 2.6.32) */\n"
3168 "}\n"
3169 msgstr ""
3170
3171 #. type: Plain text
3172 #: build/C/man2/sigaction.2:294
3173 msgid ""
3174 "I<si_signo>, I<si_errno> and I<si_code> are defined for all signals.  "
3175 "(I<si_errno> is generally unused on Linux.)  The rest of the struct may be a "
3176 "union, so that one should only read the fields that are meaningful for the "
3177 "given signal:"
3178 msgstr ""
3179
3180 #. type: Plain text
3181 #: build/C/man2/sigaction.2:309
3182 msgid ""
3183 "Signals sent with B<kill>(2)  and B<sigqueue>(3)  fill in I<si_pid> and "
3184 "I<si_uid>.  In addition, signals sent with B<sigqueue>(3)  fill in I<si_int> "
3185 "and I<si_ptr> with the values specified by the sender of the signal; see "
3186 "B<sigqueue>(3)  for more details."
3187 msgstr ""
3188
3189 #. type: Plain text
3190 #: build/C/man2/sigaction.2:325
3191 msgid ""
3192 "Signals sent by POSIX.1b timers (since Linux 2.6) fill in I<si_overrun> and "
3193 "I<si_timerid>.  The I<si_timerid> field is an internal ID used by the kernel "
3194 "to identify the timer; it is not the same as the timer ID returned by "
3195 "B<timer_create>(2).  The I<si_overrun> field is the timer overrun count; "
3196 "this is the same information as is obtained by a call to "
3197 "B<timer_getoverrun>(2).  These fields are nonstandard Linux extensions."
3198 msgstr ""
3199
3200 #. type: Plain text
3201 #: build/C/man2/sigaction.2:340
3202 msgid ""
3203 "Signals sent for message queue notification (see the description of "
3204 "B<SIGEV_SIGNAL> in B<mq_notify>(3))  fill in I<si_int>/I<si_ptr>, with the "
3205 "I<sigev_value> supplied to B<mq_notify>(3); I<si_pid>, with the process ID "
3206 "of the message sender; and I<si_uid>, with the real user ID of the message "
3207 "sender."
3208 msgstr ""
3209
3210 #.  FIXME .
3211 #.  When si_utime and si_stime where originally implemented, the
3212 #.  measurement unit was HZ, which was the same as clock ticks
3213 #.  (sysconf(_SC_CLK_TCK)).  In 2.6, HZ became configurable, and
3214 #.  was *still* used as the unit to return the info these fields,
3215 #.  with the result that the field values depended on the the
3216 #.  configured HZ.  Of course, the should have been measured in
3217 #.  USER_HZ instead, so that sysconf(_SC_CLK_TCK) could be used to
3218 #.  convert to seconds.  I have a queued patch to fix this:
3219 #.  http://thread.gmane.org/gmane.linux.kernel/698061/ .
3220 #.  This patch made it into 2.6.27.
3221 #.  But note that these fields still don't return the times of
3222 #.  waited-for children (as is done by getrusage() and times()
3223 #.  and wait4()).  Solaris 8 does include child times.
3224 #. type: Plain text
3225 #: build/C/man2/sigaction.2:387
3226 msgid ""
3227 "B<SIGCHLD> fills in I<si_pid>, I<si_uid>, I<si_status>, I<si_utime> and "
3228 "I<si_stime>, providing information about the child.  The I<si_pid> field is "
3229 "the process ID of the child; I<si_uid> is the child's real user ID.  The "
3230 "I<si_status> field contains the exit status of the child (if I<si_code> is "
3231 "B<CLD_EXITED>), or the signal number that caused the process to change "
3232 "state.  The I<si_utime> and I<si_stime> contain the user and system CPU time "
3233 "used by the child process; these fields do not include the times used by "
3234 "waited-for children (unlike B<getrusage>(2)  and B<time>(2)).  In kernels up "
3235 "to 2.6, and since 2.6.27, these fields report CPU time in units of "
3236 "I<sysconf(_SC_CLK_TCK)>.  In 2.6 kernels before 2.6.27, a bug meant that "
3237 "these fields reported time in units of the (configurable) system jiffy (see "
3238 "B<time>(7))."
3239 msgstr ""
3240
3241 #.  FIXME SIGTRAP also sets the following for ptrace_notify() ?
3242 #.      info.si_code = exit_code;
3243 #.      info.si_pid = task_pid_vnr(current);
3244 #.      info.si_uid = current_uid();  /* Real UID */
3245 #. type: Plain text
3246 #: build/C/man2/sigaction.2:423
3247 msgid ""
3248 "B<SIGILL>, B<SIGFPE>, B<SIGSEGV>, B<SIGBUS>, and B<SIGTRAP> fill in "
3249 "I<si_addr> with the address of the fault.  On some architectures, these "
3250 "signals also fill in the I<si_trapno> filed.  Some suberrors of B<SIGBUS>, "
3251 "in particular B<BUS_MCEERR_AO> and B<BUS_MCEERR_AR>, also fill in "
3252 "I<si_addr_lsb>.  This field indicates the least significant bit of the "
3253 "reported address and therefore the extent of the corruption.  For example, "
3254 "if a full page was corrupted, I<si_addr_lsb> contains "
3255 "I<log2(sysconf(_SC_PAGESIZE))>.  B<BUS_MCERR_*> and I<si_addr_lsb> are "
3256 "Linux-specific extensions."
3257 msgstr ""
3258
3259 #. type: Plain text
3260 #: build/C/man2/sigaction.2:437
3261 msgid ""
3262 "B<SIGIO>/B<SIGPOLL> (the two names are synonyms on Linux)  fills in "
3263 "I<si_band> and I<si_fd>.  The I<si_band> event is a bit mask containing the "
3264 "same values as are filled in the I<revents> field by B<poll>(2).  The "
3265 "I<si_fd> field indicates the file descriptor for which the I/O event "
3266 "occurred."
3267 msgstr ""
3268
3269 #. type: Plain text
3270 #: build/C/man2/sigaction.2:444
3271 msgid ""
3272 "I<si_code> is a value (not a bit mask)  indicating why this signal was "
3273 "sent.  The following list shows the values which can be placed in I<si_code> "
3274 "for any signal, along with reason that the signal was generated."
3275 msgstr ""
3276
3277 #. type: TP
3278 #: build/C/man2/sigaction.2:445
3279 #, no-wrap
3280 msgid "B<SI_USER>"
3281 msgstr ""
3282
3283 #. type: Plain text
3284 #: build/C/man2/sigaction.2:450
3285 msgid "B<kill>(2)  or B<raise>(3)"
3286 msgstr ""
3287
3288 #. type: TP
3289 #: build/C/man2/sigaction.2:450
3290 #, no-wrap
3291 msgid "B<SI_KERNEL>"
3292 msgstr ""
3293
3294 #. type: Plain text
3295 #: build/C/man2/sigaction.2:453
3296 msgid "Sent by the kernel."
3297 msgstr ""
3298
3299 #. type: TP
3300 #: build/C/man2/sigaction.2:453
3301 #, no-wrap
3302 msgid "B<SI_QUEUE>"
3303 msgstr ""
3304
3305 #. type: TP
3306 #: build/C/man2/sigaction.2:456 build/C/man7/signal.7:126
3307 #, no-wrap
3308 msgid "B<sigqueue>(3)"
3309 msgstr ""
3310
3311 #. type: TP
3312 #: build/C/man2/sigaction.2:456
3313 #, no-wrap
3314 msgid "B<SI_TIMER>"
3315 msgstr ""
3316
3317 #. type: Plain text
3318 #: build/C/man2/sigaction.2:459
3319 msgid "POSIX timer expired"
3320 msgstr ""
3321
3322 #. type: TP
3323 #: build/C/man2/sigaction.2:459
3324 #, no-wrap
3325 msgid "B<SI_MESGQ>"
3326 msgstr ""
3327
3328 #. type: Plain text
3329 #: build/C/man2/sigaction.2:463
3330 msgid "POSIX message queue state changed (since Linux 2.6.6); see B<mq_notify>(3)"
3331 msgstr ""
3332
3333 #. type: TP
3334 #: build/C/man2/sigaction.2:463
3335 #, no-wrap
3336 msgid "B<SI_ASYNCIO>"
3337 msgstr ""
3338
3339 #. type: Plain text
3340 #: build/C/man2/sigaction.2:466
3341 msgid "AIO completed"
3342 msgstr ""
3343
3344 #. type: TP
3345 #: build/C/man2/sigaction.2:466
3346 #, no-wrap
3347 msgid "B<SI_SIGIO>"
3348 msgstr ""
3349
3350 #. type: Plain text
3351 #: build/C/man2/sigaction.2:475
3352 msgid ""
3353 "Queued B<SIGIO> (only in kernels up to Linux 2.2; from Linux 2.4 onward "
3354 "B<SIGIO>/B<SIGPOLL> fills in I<si_code> as described below)."
3355 msgstr ""
3356
3357 #. type: TP
3358 #: build/C/man2/sigaction.2:475
3359 #, no-wrap
3360 msgid "B<SI_TKILL>"
3361 msgstr ""
3362
3363 #.  SI_DETHREAD is defined in 2.6.9 sources, but isn't implemented
3364 #.  It appears to have been an idea that was tried during 2.5.6
3365 #.  through to 2.5.24 and then was backed out.
3366 #. type: Plain text
3367 #: build/C/man2/sigaction.2:484
3368 msgid "B<tkill>(2)  or B<tgkill>(2)  (since Linux 2.4.19)"
3369 msgstr ""
3370
3371 #. type: Plain text
3372 #: build/C/man2/sigaction.2:491
3373 msgid "The following values can be placed in I<si_code> for a B<SIGILL> signal:"
3374 msgstr ""
3375
3376 #. type: TP
3377 #: build/C/man2/sigaction.2:492
3378 #, no-wrap
3379 msgid "B<ILL_ILLOPC>"
3380 msgstr ""
3381
3382 #. type: Plain text
3383 #: build/C/man2/sigaction.2:495
3384 msgid "illegal opcode"
3385 msgstr ""
3386
3387 #. type: TP
3388 #: build/C/man2/sigaction.2:495
3389 #, no-wrap
3390 msgid "B<ILL_ILLOPN>"
3391 msgstr ""
3392
3393 #. type: Plain text
3394 #: build/C/man2/sigaction.2:498
3395 msgid "illegal operand"
3396 msgstr ""
3397
3398 #. type: TP
3399 #: build/C/man2/sigaction.2:498
3400 #, no-wrap
3401 msgid "B<ILL_ILLADR>"
3402 msgstr ""
3403
3404 #. type: Plain text
3405 #: build/C/man2/sigaction.2:501
3406 msgid "illegal addressing mode"
3407 msgstr ""
3408
3409 #. type: TP
3410 #: build/C/man2/sigaction.2:501
3411 #, no-wrap
3412 msgid "B<ILL_ILLTRP>"
3413 msgstr ""
3414
3415 #. type: Plain text
3416 #: build/C/man2/sigaction.2:504
3417 msgid "illegal trap"
3418 msgstr ""
3419
3420 #. type: TP
3421 #: build/C/man2/sigaction.2:504
3422 #, no-wrap
3423 msgid "B<ILL_PRVOPC>"
3424 msgstr ""
3425
3426 #. type: Plain text
3427 #: build/C/man2/sigaction.2:507
3428 msgid "privileged opcode"
3429 msgstr ""
3430
3431 #. type: TP
3432 #: build/C/man2/sigaction.2:507
3433 #, no-wrap
3434 msgid "B<ILL_PRVREG>"
3435 msgstr ""
3436
3437 #. type: Plain text
3438 #: build/C/man2/sigaction.2:510
3439 msgid "privileged register"
3440 msgstr ""
3441
3442 #. type: TP
3443 #: build/C/man2/sigaction.2:510
3444 #, no-wrap
3445 msgid "B<ILL_COPROC>"
3446 msgstr ""
3447
3448 #. type: Plain text
3449 #: build/C/man2/sigaction.2:513
3450 msgid "coprocessor error"
3451 msgstr ""
3452
3453 #. type: TP
3454 #: build/C/man2/sigaction.2:513
3455 #, no-wrap
3456 msgid "B<ILL_BADSTK>"
3457 msgstr ""
3458
3459 #. type: Plain text
3460 #: build/C/man2/sigaction.2:516
3461 msgid "internal stack error"
3462 msgstr ""
3463
3464 #. type: Plain text
3465 #: build/C/man2/sigaction.2:523
3466 msgid "The following values can be placed in I<si_code> for a B<SIGFPE> signal:"
3467 msgstr ""
3468
3469 #. type: TP
3470 #: build/C/man2/sigaction.2:524
3471 #, no-wrap
3472 msgid "B<FPE_INTDIV>"
3473 msgstr ""
3474
3475 #. type: Plain text
3476 #: build/C/man2/sigaction.2:527
3477 msgid "integer divide by zero"
3478 msgstr ""
3479
3480 #. type: TP
3481 #: build/C/man2/sigaction.2:527
3482 #, no-wrap
3483 msgid "B<FPE_INTOVF>"
3484 msgstr ""
3485
3486 #. type: Plain text
3487 #: build/C/man2/sigaction.2:530
3488 msgid "integer overflow"
3489 msgstr ""
3490
3491 #. type: TP
3492 #: build/C/man2/sigaction.2:530
3493 #, no-wrap
3494 msgid "B<FPE_FLTDIV>"
3495 msgstr ""
3496
3497 #. type: Plain text
3498 #: build/C/man2/sigaction.2:533
3499 msgid "floating-point divide by zero"
3500 msgstr ""
3501
3502 #. type: TP
3503 #: build/C/man2/sigaction.2:533
3504 #, no-wrap
3505 msgid "B<FPE_FLTOVF>"
3506 msgstr ""
3507
3508 #. type: Plain text
3509 #: build/C/man2/sigaction.2:536
3510 msgid "floating-point overflow"
3511 msgstr ""
3512
3513 #. type: TP
3514 #: build/C/man2/sigaction.2:536
3515 #, no-wrap
3516 msgid "B<FPE_FLTUND>"
3517 msgstr ""
3518
3519 #. type: Plain text
3520 #: build/C/man2/sigaction.2:539
3521 msgid "floating-point underflow"
3522 msgstr ""
3523
3524 #. type: TP
3525 #: build/C/man2/sigaction.2:539
3526 #, no-wrap
3527 msgid "B<FPE_FLTRES>"
3528 msgstr ""
3529
3530 #. type: Plain text
3531 #: build/C/man2/sigaction.2:542
3532 msgid "floating-point inexact result"
3533 msgstr ""
3534
3535 #. type: TP
3536 #: build/C/man2/sigaction.2:542
3537 #, no-wrap
3538 msgid "B<FPE_FLTINV>"
3539 msgstr ""
3540
3541 #. type: Plain text
3542 #: build/C/man2/sigaction.2:545
3543 msgid "floating-point invalid operation"
3544 msgstr ""
3545
3546 #. type: TP
3547 #: build/C/man2/sigaction.2:545
3548 #, no-wrap
3549 msgid "B<FPE_FLTSUB>"
3550 msgstr ""
3551
3552 #. type: Plain text
3553 #: build/C/man2/sigaction.2:548
3554 msgid "subscript out of range"
3555 msgstr ""
3556
3557 #. type: Plain text
3558 #: build/C/man2/sigaction.2:555
3559 msgid "The following values can be placed in I<si_code> for a B<SIGSEGV> signal:"
3560 msgstr ""
3561
3562 #. type: TP
3563 #: build/C/man2/sigaction.2:556
3564 #, no-wrap
3565 msgid "B<SEGV_MAPERR>"
3566 msgstr ""
3567
3568 #. type: Plain text
3569 #: build/C/man2/sigaction.2:559
3570 msgid "address not mapped to object"
3571 msgstr ""
3572
3573 #. type: TP
3574 #: build/C/man2/sigaction.2:559
3575 #, no-wrap
3576 msgid "B<SEGV_ACCERR>"
3577 msgstr ""
3578
3579 #. type: Plain text
3580 #: build/C/man2/sigaction.2:562
3581 msgid "invalid permissions for mapped object"
3582 msgstr ""
3583
3584 #. type: Plain text
3585 #: build/C/man2/sigaction.2:569
3586 msgid "The following values can be placed in I<si_code> for a B<SIGBUS> signal:"
3587 msgstr ""
3588
3589 #. type: TP
3590 #: build/C/man2/sigaction.2:570
3591 #, no-wrap
3592 msgid "B<BUS_ADRALN>"
3593 msgstr ""
3594
3595 #. type: Plain text
3596 #: build/C/man2/sigaction.2:573
3597 msgid "invalid address alignment"
3598 msgstr ""
3599
3600 #. type: TP
3601 #: build/C/man2/sigaction.2:573
3602 #, no-wrap
3603 msgid "B<BUS_ADRERR>"
3604 msgstr ""
3605
3606 #. type: Plain text
3607 #: build/C/man2/sigaction.2:576
3608 msgid "nonexistent physical address"
3609 msgstr ""
3610
3611 #. type: TP
3612 #: build/C/man2/sigaction.2:576
3613 #, no-wrap
3614 msgid "B<BUS_OBJERR>"
3615 msgstr ""
3616
3617 #. type: Plain text
3618 #: build/C/man2/sigaction.2:579
3619 msgid "object-specific hardware error"
3620 msgstr ""
3621
3622 #. type: TP
3623 #: build/C/man2/sigaction.2:579
3624 #, no-wrap
3625 msgid "B<BUS_MCEERR_AR> (since Linux 2.6.32)"
3626 msgstr ""
3627
3628 #. type: Plain text
3629 #: build/C/man2/sigaction.2:582
3630 msgid "Hardware memory error consumed on a machine check; action required."
3631 msgstr ""
3632
3633 #. type: TP
3634 #: build/C/man2/sigaction.2:582
3635 #, no-wrap
3636 msgid "B<BUS_MCEERR_AO> (since Linux 2.6.32)"
3637 msgstr ""
3638
3639 #. type: Plain text
3640 #: build/C/man2/sigaction.2:585
3641 msgid "Hardware memory error detected in process but not consumed; action optional."
3642 msgstr ""
3643
3644 #. type: Plain text
3645 #: build/C/man2/sigaction.2:592
3646 msgid "The following values can be placed in I<si_code> for a B<SIGTRAP> signal:"
3647 msgstr ""
3648
3649 #. type: TP
3650 #: build/C/man2/sigaction.2:593
3651 #, no-wrap
3652 msgid "B<TRAP_BRKPT>"
3653 msgstr ""
3654
3655 #. type: Plain text
3656 #: build/C/man2/sigaction.2:596
3657 msgid "process breakpoint"
3658 msgstr ""
3659
3660 #. type: TP
3661 #: build/C/man2/sigaction.2:596
3662 #, no-wrap
3663 msgid "B<TRAP_TRACE>"
3664 msgstr ""
3665
3666 #. type: Plain text
3667 #: build/C/man2/sigaction.2:599
3668 msgid "process trace trap"
3669 msgstr ""
3670
3671 #. type: TP
3672 #: build/C/man2/sigaction.2:599
3673 #, no-wrap
3674 msgid "B<TRAP_BRANCH> (since Linux 2.4)"
3675 msgstr ""
3676
3677 #. type: Plain text
3678 #: build/C/man2/sigaction.2:602
3679 msgid "process taken branch trap"
3680 msgstr ""
3681
3682 #. type: TP
3683 #: build/C/man2/sigaction.2:602
3684 #, no-wrap
3685 msgid "B<TRAP_HWBKPT> (since Linux 2.4)"
3686 msgstr ""
3687
3688 #. type: Plain text
3689 #: build/C/man2/sigaction.2:605
3690 msgid "hardware breakpoint/watchpoint"
3691 msgstr ""
3692
3693 #. type: Plain text
3694 #: build/C/man2/sigaction.2:612
3695 msgid "The following values can be placed in I<si_code> for a B<SIGCHLD> signal:"
3696 msgstr ""
3697
3698 #. type: TP
3699 #: build/C/man2/sigaction.2:613
3700 #, no-wrap
3701 msgid "B<CLD_EXITED>"
3702 msgstr ""
3703
3704 #. type: Plain text
3705 #: build/C/man2/sigaction.2:616
3706 msgid "child has exited"
3707 msgstr ""
3708
3709 #. type: TP
3710 #: build/C/man2/sigaction.2:616
3711 #, no-wrap
3712 msgid "B<CLD_KILLED>"
3713 msgstr ""
3714
3715 #. type: Plain text
3716 #: build/C/man2/sigaction.2:619
3717 msgid "child was killed"
3718 msgstr ""
3719
3720 #. type: TP
3721 #: build/C/man2/sigaction.2:619
3722 #, no-wrap
3723 msgid "B<CLD_DUMPED>"
3724 msgstr ""
3725
3726 #. type: Plain text
3727 #: build/C/man2/sigaction.2:622
3728 msgid "child terminated abnormally"
3729 msgstr ""
3730
3731 #. type: TP
3732 #: build/C/man2/sigaction.2:622
3733 #, no-wrap
3734 msgid "B<CLD_TRAPPED>"
3735 msgstr ""
3736
3737 #. type: Plain text
3738 #: build/C/man2/sigaction.2:625
3739 msgid "traced child has trapped"
3740 msgstr ""
3741
3742 #. type: TP
3743 #: build/C/man2/sigaction.2:625
3744 #, no-wrap
3745 msgid "B<CLD_STOPPED>"
3746 msgstr ""
3747
3748 #. type: Plain text
3749 #: build/C/man2/sigaction.2:628
3750 msgid "child has stopped"
3751 msgstr ""
3752
3753 #. type: TP
3754 #: build/C/man2/sigaction.2:628
3755 #, no-wrap
3756 msgid "B<CLD_CONTINUED>"
3757 msgstr ""
3758
3759 #. type: Plain text
3760 #: build/C/man2/sigaction.2:631
3761 msgid "stopped child has continued (since Linux 2.6.9)"
3762 msgstr ""
3763
3764 #. type: Plain text
3765 #: build/C/man2/sigaction.2:638
3766 msgid ""
3767 "The following values can be placed in I<si_code> for a B<SIGIO>/B<SIGPOLL> "
3768 "signal:"
3769 msgstr ""
3770
3771 #. type: TP
3772 #: build/C/man2/sigaction.2:639
3773 #, no-wrap
3774 msgid "B<POLL_IN>"
3775 msgstr ""
3776
3777 #. type: Plain text
3778 #: build/C/man2/sigaction.2:642
3779 msgid "data input available"
3780 msgstr ""
3781
3782 #. type: TP
3783 #: build/C/man2/sigaction.2:642
3784 #, no-wrap
3785 msgid "B<POLL_OUT>"
3786 msgstr ""
3787
3788 #. type: Plain text
3789 #: build/C/man2/sigaction.2:645
3790 msgid "output buffers available"
3791 msgstr ""
3792
3793 #. type: TP
3794 #: build/C/man2/sigaction.2:645
3795 #, no-wrap
3796 msgid "B<POLL_MSG>"
3797 msgstr ""
3798
3799 #. type: Plain text
3800 #: build/C/man2/sigaction.2:648
3801 msgid "input message available"
3802 msgstr ""
3803
3804 #. type: TP
3805 #: build/C/man2/sigaction.2:648
3806 #, no-wrap
3807 msgid "B<POLL_ERR>"
3808 msgstr ""
3809
3810 #. type: Plain text
3811 #: build/C/man2/sigaction.2:651
3812 msgid "I/O error"
3813 msgstr ""
3814
3815 #. type: TP
3816 #: build/C/man2/sigaction.2:651
3817 #, no-wrap
3818 msgid "B<POLL_PRI>"
3819 msgstr ""
3820
3821 #. type: Plain text
3822 #: build/C/man2/sigaction.2:654
3823 msgid "high priority input available"
3824 msgstr ""
3825
3826 #. type: TP
3827 #: build/C/man2/sigaction.2:654
3828 #, no-wrap
3829 msgid "B<POLL_HUP>"
3830 msgstr ""
3831
3832 #. type: Plain text
3833 #: build/C/man2/sigaction.2:657
3834 msgid "device disconnected"
3835 msgstr ""
3836
3837 #. type: Plain text
3838 #: build/C/man2/sigaction.2:661
3839 msgid "B<sigaction>()  returns 0 on success and -1 on error."
3840 msgstr ""
3841
3842 #. type: Plain text
3843 #: build/C/man2/sigaction.2:666
3844 msgid ""
3845 "I<act> or I<oldact> points to memory which is not a valid part of the "
3846 "process address space."
3847 msgstr ""
3848
3849 #. type: Plain text
3850 #: build/C/man2/sigaction.2:673
3851 msgid ""
3852 "An invalid signal was specified.  This will also be generated if an attempt "
3853 "is made to change the action for B<SIGKILL> or B<SIGSTOP>, which cannot be "
3854 "caught or ignored."
3855 msgstr ""
3856
3857 #.  SVr4 does not document the EINTR condition.
3858 #. type: Plain text
3859 #: build/C/man2/sigaction.2:676
3860 msgid "POSIX.1-2001, SVr4."
3861 msgstr ""
3862
3863 #. type: Plain text
3864 #: build/C/man2/sigaction.2:684 build/C/man7/signal.7:103
3865 msgid ""
3866 "A child created via B<fork>(2)  inherits a copy of its parent's signal "
3867 "dispositions.  During an B<execve>(2), the dispositions of handled signals "
3868 "are reset to the default; the dispositions of ignored signals are left "
3869 "unchanged."
3870 msgstr ""
3871
3872 #. type: Plain text
3873 #: build/C/man2/sigaction.2:702 build/C/man2/signal.2:129
3874 msgid ""
3875 "According to POSIX, the behavior of a process is undefined after it ignores "
3876 "a B<SIGFPE>, B<SIGILL>, or B<SIGSEGV> signal that was not generated by "
3877 "B<kill>(2)  or B<raise>(3).  Integer division by zero has undefined result.  "
3878 "On some architectures it will generate a B<SIGFPE> signal.  (Also dividing "
3879 "the most negative integer by -1 may generate B<SIGFPE>.)  Ignoring this "
3880 "signal might lead to an endless loop."
3881 msgstr ""
3882
3883 #. type: Plain text
3884 #: build/C/man2/sigaction.2:719
3885 msgid ""
3886 "POSIX.1-1990 disallowed setting the action for B<SIGCHLD> to B<SIG_IGN>.  "
3887 "POSIX.1-2001 allows this possibility, so that ignoring B<SIGCHLD> can be "
3888 "used to prevent the creation of zombies (see B<wait>(2)).  Nevertheless, the "
3889 "historical BSD and System V behaviors for ignoring B<SIGCHLD> differ, so "
3890 "that the only completely portable method of ensuring that terminated "
3891 "children do not become zombies is to catch the B<SIGCHLD> signal and perform "
3892 "a B<wait>(2)  or similar."
3893 msgstr ""
3894
3895 #. type: Plain text
3896 #: build/C/man2/sigaction.2:732
3897 msgid ""
3898 "POSIX.1-1990 only specified B<SA_NOCLDSTOP>.  POSIX.1-2001 added "
3899 "B<SA_NOCLDWAIT>, B<SA_RESETHAND>, B<SA_NODEFER>, and B<SA_SIGINFO>.  Use of "
3900 "these latter values in I<sa_flags> may be less portable in applications "
3901 "intended for older UNIX implementations."
3902 msgstr ""
3903
3904 #. type: Plain text
3905 #: build/C/man2/sigaction.2:736
3906 msgid "The B<SA_RESETHAND> flag is compatible with the SVr4 flag of the same name."
3907 msgstr ""
3908
3909 #. type: Plain text
3910 #: build/C/man2/sigaction.2:746
3911 msgid ""
3912 "The B<SA_NODEFER> flag is compatible with the SVr4 flag of the same name "
3913 "under kernels 1.3.9 and newer.  On older kernels the Linux implementation "
3914 "allowed the receipt of any signal, not just the one we are installing "
3915 "(effectively overriding any I<sa_mask> settings)."
3916 msgstr ""
3917
3918 #. type: Plain text
3919 #: build/C/man2/sigaction.2:752
3920 msgid ""
3921 "B<sigaction>()  can be called with a NULL second argument to query the "
3922 "current signal handler.  It can also be used to check whether a given signal "
3923 "is valid for the current machine by calling it with NULL second and third "
3924 "arguments."
3925 msgstr ""
3926
3927 #. type: Plain text
3928 #: build/C/man2/sigaction.2:758
3929 msgid ""
3930 "It is not possible to block B<SIGKILL> or B<SIGSTOP> (by specifying them in "
3931 "I<sa_mask>).  Attempts to do so are silently ignored."
3932 msgstr ""
3933
3934 #. type: Plain text
3935 #: build/C/man2/sigaction.2:762 build/C/man2/sigpending.2:65 build/C/man2/sigprocmask.2:139 build/C/man2/sigsuspend.2:104
3936 msgid "See B<sigsetops>(3)  for details on manipulating signal sets."
3937 msgstr ""
3938
3939 #. type: Plain text
3940 #: build/C/man2/sigaction.2:767
3941 msgid ""
3942 "See B<signal>(7)  for a list of the async-signal-safe functions that can be "
3943 "safely called inside from inside a signal handler."
3944 msgstr ""
3945
3946 #. type: SS
3947 #: build/C/man2/sigaction.2:767
3948 #, no-wrap
3949 msgid "Undocumented"
3950 msgstr ""
3951
3952 #. type: Plain text
3953 #: build/C/man2/sigaction.2:777
3954 msgid ""
3955 "Before the introduction of B<SA_SIGINFO> it was also possible to get some "
3956 "additional information, namely by using a I<sa_handler> with second argument "
3957 "of type I<struct sigcontext>.  See the relevant kernel sources for details.  "
3958 "This use is obsolete now."
3959 msgstr ""
3960
3961 #. type: Plain text
3962 #: build/C/man2/sigaction.2:786
3963 msgid ""
3964 "In kernels up to and including 2.6.13, specifying B<SA_NODEFER> in "
3965 "I<sa_flags> prevents not only the delivered signal from being masked during "
3966 "execution of the handler, but also the signals specified in I<sa_mask>.  "
3967 "This bug was fixed in kernel 2.6.14."
3968 msgstr ""
3969
3970 #. type: Plain text
3971 #: build/C/man2/sigaction.2:789
3972 msgid "See B<mprotect>(2)."
3973 msgstr ""
3974
3975 #. type: Plain text
3976 #: build/C/man2/sigaction.2:807
3977 msgid ""
3978 "B<kill>(1), B<kill>(2), B<killpg>(2), B<pause>(2), B<sigaltstack>(2), "
3979 "B<signal>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), "
3980 "B<sigsuspend>(2), B<wait>(2), B<raise>(3), B<siginterrupt>(3), "
3981 "B<sigqueue>(3), B<sigsetops>(3), B<sigvec>(3), B<core>(5), B<signal>(7)"
3982 msgstr ""
3983
3984 #. type: TH
3985 #: build/C/man2/sigaltstack.2:25
3986 #, no-wrap
3987 msgid "SIGALTSTACK"
3988 msgstr ""
3989
3990 #. type: TH
3991 #: build/C/man2/sigaltstack.2:25 build/C/man2/wait.2:50
3992 #, no-wrap
3993 msgid "2010-09-26"
3994 msgstr ""
3995
3996 #. type: Plain text
3997 #: build/C/man2/sigaltstack.2:28
3998 msgid "sigaltstack - set and/or get signal stack context"
3999 msgstr ""
4000
4001 #. type: Plain text
4002 #: build/C/man2/sigaltstack.2:32
4003 msgid "B<int sigaltstack(const stack_t *>I<ss>B<, stack_t *>I<oss>B<);>"
4004 msgstr ""
4005
4006 #. type: Plain text
4007 #: build/C/man2/sigaltstack.2:39
4008 msgid "B<sigaltstack>():"
4009 msgstr ""
4010
4011 #. type: Plain text
4012 #: build/C/man2/sigaltstack.2:46 build/C/man3/siginterrupt.3:51 build/C/man2/wait.2:79
4013 msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
4014 msgstr ""
4015
4016 #. type: Plain text
4017 #: build/C/man2/sigaltstack.2:58
4018 msgid ""
4019 "B<sigaltstack>()  allows a process to define a new alternate signal stack "
4020 "and/or retrieve the state of an existing alternate signal stack.  An "
4021 "alternate signal stack is used during the execution of a signal handler if "
4022 "the establishment of that handler (see B<sigaction>(2))  requested it."
4023 msgstr ""
4024
4025 #. type: Plain text
4026 #: build/C/man2/sigaltstack.2:61
4027 msgid ""
4028 "The normal sequence of events for using an alternate signal stack is the "
4029 "following:"
4030 msgstr ""
4031
4032 #. type: IP
4033 #: build/C/man2/sigaltstack.2:61 build/C/man7/signal.7:383
4034 #, no-wrap
4035 msgid "1."
4036 msgstr ""
4037
4038 #. type: Plain text
4039 #: build/C/man2/sigaltstack.2:65
4040 msgid "Allocate an area of memory to be used for the alternate signal stack."
4041 msgstr ""
4042
4043 #. type: IP
4044 #: build/C/man2/sigaltstack.2:65 build/C/man7/signal.7:387
4045 #, no-wrap
4046 msgid "2."
4047 msgstr ""
4048
4049 #. type: Plain text
4050 #: build/C/man2/sigaltstack.2:71
4051 msgid ""
4052 "Use B<sigaltstack>()  to inform the system of the existence and location of "
4053 "the alternate signal stack."
4054 msgstr ""
4055
4056 #. type: IP
4057 #: build/C/man2/sigaltstack.2:71 build/C/man7/signal.7:407
4058 #, no-wrap
4059 msgid "3."
4060 msgstr ""
4061
4062 #. type: Plain text
4063 #: build/C/man2/sigaltstack.2:78
4064 msgid ""
4065 "When establishing a signal handler using B<sigaction>(2), inform the system "
4066 "that the signal handler should be executed on the alternate signal stack by "
4067 "specifying the B<SA_ONSTACK> flag."
4068 msgstr ""
4069
4070 #. type: Plain text
4071 #: build/C/man2/sigaltstack.2:86
4072 msgid ""
4073 "The I<ss> argument is used to specify a new alternate signal stack, while "
4074 "the I<oss> argument is used to retrieve information about the currently "
4075 "established signal stack.  If we are interested in performing just one of "
4076 "these tasks then the other argument can be specified as NULL.  Each of these "
4077 "arguments is a structure of the following type:"
4078 msgstr ""
4079
4080 #. type: Plain text
4081 #: build/C/man2/sigaltstack.2:94
4082 #, no-wrap
4083 msgid ""
4084 "typedef struct {\n"
4085 "    void  *ss_sp;     /* Base address of stack */\n"
4086 "    int    ss_flags;  /* Flags */\n"
4087 "    size_t ss_size;   /* Number of bytes in stack */\n"
4088 "} stack_t;\n"
4089 msgstr ""
4090
4091 #. type: Plain text
4092 #: build/C/man2/sigaltstack.2:105
4093 msgid ""
4094 "To establish a new alternate signal stack, I<ss.ss_flags> is set to zero, "
4095 "and I<ss.ss_sp> and I<ss.ss_size> specify the starting address and size of "
4096 "the stack.  The constant B<SIGSTKSZ> is defined to be large enough to cover "
4097 "the usual size requirements for an alternate signal stack, and the constant "
4098 "B<MINSIGSTKSZ> defines the minimum size required to execute a signal "
4099 "handler."
4100 msgstr ""
4101
4102 #. type: Plain text
4103 #: build/C/man2/sigaltstack.2:109
4104 msgid ""
4105 "When a signal handler is invoked on the alternate stack, the kernel "
4106 "automatically aligns the address given in I<ss.ss_sp> to a suitable address "
4107 "boundary for the underlying hardware architecture."
4108 msgstr ""
4109
4110 #. type: Plain text
4111 #: build/C/man2/sigaltstack.2:114
4112 msgid ""
4113 "To disable an existing stack, specify I<ss.ss_flags> as B<SS_DISABLE>.  In "
4114 "this case, the remaining fields in I<ss> are ignored."
4115 msgstr ""
4116
4117 #. type: Plain text
4118 #: build/C/man2/sigaltstack.2:122
4119 msgid ""
4120 "If I<oss> is not NULL, then it is used to return information about the "
4121 "alternate signal stack which was in effect prior to the call to "
4122 "B<sigaltstack>().  The I<oss.ss_sp> and I<oss.ss_size> fields return the "
4123 "starting address and size of that stack.  The I<oss.ss_flags> may return "
4124 "either of the following values:"
4125 msgstr ""
4126
4127 #. type: TP
4128 #: build/C/man2/sigaltstack.2:122
4129 #, no-wrap
4130 msgid "B<SS_ONSTACK>"
4131 msgstr ""
4132
4133 #. type: Plain text
4134 #: build/C/man2/sigaltstack.2:128
4135 msgid ""
4136 "The process is currently executing on the alternate signal stack.  (Note "
4137 "that it is not possible to change the alternate signal stack if the process "
4138 "is currently executing on it.)"
4139 msgstr ""
4140
4141 #. type: TP
4142 #: build/C/man2/sigaltstack.2:128
4143 #, no-wrap
4144 msgid "B<SS_DISABLE>"
4145 msgstr ""
4146
4147 #. type: Plain text
4148 #: build/C/man2/sigaltstack.2:131
4149 msgid "The alternate signal stack is currently disabled."
4150 msgstr ""
4151
4152 #. type: Plain text
4153 #: build/C/man2/sigaltstack.2:135
4154 msgid ""
4155 "B<sigaltstack>()  returns 0 on success, or -1 on failure with I<errno> set "
4156 "to indicate the error."
4157 msgstr ""
4158
4159 #. type: Plain text
4160 #: build/C/man2/sigaltstack.2:140
4161 msgid ""
4162 "Either I<ss> or I<oss> is not NULL and points to an area outside of the "
4163 "process's address space."
4164 msgstr ""
4165
4166 #. type: Plain text
4167 #: build/C/man2/sigaltstack.2:145
4168 msgid ""
4169 "I<ss> is not NULL and the I<ss_flags> field contains a nonzero value other "
4170 "than B<SS_DISABLE>."
4171 msgstr ""
4172
4173 #. type: Plain text
4174 #: build/C/man2/sigaltstack.2:149
4175 msgid ""
4176 "The specified size of the new alternate signal stack (I<ss.ss_size>) was "
4177 "less than B<MINSTKSZ>."
4178 msgstr ""
4179
4180 #. type: Plain text
4181 #: build/C/man2/sigaltstack.2:154
4182 msgid ""
4183 "An attempt was made to change the alternate signal stack while it was active "
4184 "(i.e., the process was already executing on the current alternate signal "
4185 "stack)."
4186 msgstr ""
4187
4188 #. type: Plain text
4189 #: build/C/man2/sigaltstack.2:156
4190 msgid "SUSv2, SVr4, POSIX.1-2001."
4191 msgstr ""
4192
4193 #. type: Plain text
4194 #: build/C/man2/sigaltstack.2:164
4195 msgid ""
4196 "The most common usage of an alternate signal stack is to handle the "
4197 "B<SIGSEGV> signal that is generated if the space available for the normal "
4198 "process stack is exhausted: in this case, a signal handler for B<SIGSEGV> "
4199 "cannot be invoked on the process stack; if we wish to handle it, we must use "
4200 "an alternate signal stack."
4201 msgstr ""
4202
4203 #. type: Plain text
4204 #: build/C/man2/sigaltstack.2:174
4205 msgid ""
4206 "Establishing an alternate signal stack is useful if a process expects that "
4207 "it may exhaust its standard stack.  This may occur, for example, because the "
4208 "stack grows so large that it encounters the upwardly growing heap, or it "
4209 "reaches a limit established by a call to B<setrlimit(RLIMIT_STACK, &rlim)>.  "
4210 "If the standard stack is exhausted, the kernel sends the process a "
4211 "B<SIGSEGV> signal.  In these circumstances the only way to catch this signal "
4212 "is on an alternate signal stack."
4213 msgstr ""
4214
4215 #. type: Plain text
4216 #: build/C/man2/sigaltstack.2:180
4217 msgid ""
4218 "On most hardware architectures supported by Linux, stacks grow downward.  "
4219 "B<sigaltstack>()  automatically takes account of the direction of stack "
4220 "growth."
4221 msgstr ""
4222
4223 #. type: Plain text
4224 #: build/C/man2/sigaltstack.2:189
4225 msgid ""
4226 "Functions called from a signal handler executing on an alternate signal "
4227 "stack will also use the alternate signal stack.  (This also applies to any "
4228 "handlers invoked for other signals while the process is executing on the "
4229 "alternate signal stack.)  Unlike the standard stack, the system does not "
4230 "automatically extend the alternate signal stack.  Exceeding the allocated "
4231 "size of the alternate signal stack will lead to unpredictable results."
4232 msgstr ""
4233
4234 #. type: Plain text
4235 #: build/C/man2/sigaltstack.2:197
4236 msgid ""
4237 "A successful call to B<execve>(2)  removes any existing alternate signal "
4238 "stack.  A child process created via B<fork>(2)  inherits a copy of its "
4239 "parent's alternate signal stack settings."
4240 msgstr ""
4241
4242 #. type: Plain text
4243 #: build/C/man2/sigaltstack.2:206
4244 msgid ""
4245 "B<sigaltstack>()  supersedes the older B<sigstack>()  call.  For backward "
4246 "compatibility, glibc also provides B<sigstack>().  All new applications "
4247 "should be written using B<sigaltstack>()."
4248 msgstr ""
4249
4250 #. type: SS
4251 #: build/C/man2/sigaltstack.2:206 build/C/man3/sigpause.3:59
4252 #, no-wrap
4253 msgid "History"
4254 msgstr ""
4255
4256 #. type: Plain text
4257 #: build/C/man2/sigaltstack.2:213
4258 msgid ""
4259 "4.2BSD had a B<sigstack>()  system call.  It used a slightly different "
4260 "struct, and had the major disadvantage that the caller had to know the "
4261 "direction of stack growth."
4262 msgstr ""
4263
4264 #. type: Plain text
4265 #: build/C/man2/sigaltstack.2:216
4266 msgid "The following code segment demonstrates the use of B<sigaltstack>():"
4267 msgstr ""
4268
4269 #. type: Plain text
4270 #: build/C/man2/sigaltstack.2:220
4271 #, no-wrap
4272 msgid "stack_t ss;\n"
4273 msgstr ""
4274
4275 #. type: Plain text
4276 #: build/C/man2/sigaltstack.2:228
4277 #, no-wrap
4278 msgid ""
4279 "ss.ss_sp = malloc(SIGSTKSZ);\n"
4280 "if (ss.ss_sp == NULL)\n"
4281 "    /* Handle error */;\n"
4282 "ss.ss_size = SIGSTKSZ;\n"
4283 "ss.ss_flags = 0;\n"
4284 "if (sigaltstack(&ss, NULL) == -1)\n"
4285 "    /* Handle error */;\n"
4286 msgstr ""
4287
4288 #. type: Plain text
4289 #: build/C/man2/sigaltstack.2:236
4290 msgid ""
4291 "B<execve>(2), B<setrlimit>(2), B<sigaction>(2), B<siglongjmp>(3), "
4292 "B<sigsetjmp>(3), B<signal>(7)"
4293 msgstr ""
4294
4295 #. type: TH
4296 #: build/C/man7/sigevent.7:24
4297 #, no-wrap
4298 msgid "SIGEVENT"
4299 msgstr ""
4300
4301 #. type: TH
4302 #: build/C/man7/sigevent.7:24 build/C/man3/siginterrupt.3:29
4303 #, no-wrap
4304 msgid "2011-09-09"
4305 msgstr ""
4306
4307 #. type: Plain text
4308 #: build/C/man7/sigevent.7:27
4309 msgid "sigevent - structure for notification from asynchronous routines"
4310 msgstr ""
4311
4312 #. type: Plain text
4313 #: build/C/man7/sigevent.7:34
4314 #, no-wrap
4315 msgid ""
4316 "union sigval {          /* Data passed with notification */\n"
4317 "    int     sival_int;         /* Integer value */\n"
4318 "    void   *sival_ptr;         /* Pointer value */\n"
4319 "};\n"
4320 msgstr ""
4321
4322 #. type: Plain text
4323 #: build/C/man7/sigevent.7:49
4324 #, no-wrap
4325 msgid ""
4326 "struct sigevent {\n"
4327 "    int          sigev_notify; /* Notification method */\n"
4328 "    int          sigev_signo;  /* Notification signal */\n"
4329 "    union sigval sigev_value;  /* Data passed with\n"
4330 "                                  notification */\n"
4331 "    void       (*sigev_notify_function) (union sigval);\n"
4332 "                     /* Function used for thread\n"
4333 "                        notification (SIGEV_THREAD) */\n"
4334 "    void        *sigev_notify_attributes;\n"
4335 "                     /* Attributes for notification thread\n"
4336 "                        (SIGEV_THREAD) */\n"
4337 "    pid_t        sigev_notify_thread_id;\n"
4338 "                     /* ID of thread to signal (SIGEV_THREAD_ID) */\n"
4339 "};\n"
4340 msgstr ""
4341
4342 #. type: Plain text
4343 #: build/C/man7/sigevent.7:58
4344 msgid ""
4345 "The I<sigevent> structure is used by various APIs to describe the way a "
4346 "process is to be notified about an event (e.g., completion of an "
4347 "asynchronous request, expiration of a timer, or the arrival of a message)."
4348 msgstr ""
4349
4350 #. type: Plain text
4351 #: build/C/man7/sigevent.7:66
4352 msgid ""
4353 "The definition shown in the SYNOPSIS is approximate: some of the fields in "
4354 "the I<sigevent> structure may be defined as part of a union.  Programs "
4355 "should only employ those fields relevant to the value specified in "
4356 "I<sigev_notify>."
4357 msgstr ""
4358
4359 #. type: Plain text
4360 #: build/C/man7/sigevent.7:71
4361 msgid ""
4362 "The I<sigev_notify> field specifies how notification is to be performed.  "
4363 "This field can have one of the following values:"
4364 msgstr ""
4365
4366 #. type: TP
4367 #: build/C/man7/sigevent.7:71 build/C/man2/timer_create.2:105
4368 #, no-wrap
4369 msgid "B<SIGEV_NONE>"
4370 msgstr ""
4371
4372 #. type: Plain text
4373 #: build/C/man7/sigevent.7:74
4374 msgid "A \"null\" notification: don't do anything when the event occurs."
4375 msgstr ""
4376
4377 #. type: TP
4378 #: build/C/man7/sigevent.7:74 build/C/man2/timer_create.2:110
4379 #, no-wrap
4380 msgid "B<SIGEV_SIGNAL>"
4381 msgstr ""
4382
4383 #. type: Plain text
4384 #: build/C/man7/sigevent.7:78
4385 msgid "Notify the process by sending the signal specified in I<sigev_signo>."
4386 msgstr ""
4387
4388 #. type: Plain text
4389 #: build/C/man7/sigevent.7:85
4390 msgid ""
4391 "If the signal is caught with a signal handler that was registered using the "
4392 "B<sigaction>(2)  B<SA_SIGINFO> flag, then the following fields are set in "
4393 "the I<siginfo_t> structure that is passed as the second argument of the "
4394 "handler:"
4395 msgstr ""
4396
4397 #. type: Plain text
4398 #: build/C/man7/sigevent.7:90
4399 msgid ""
4400 "This field is set to a value that depends on the API delivering the "
4401 "notification."
4402 msgstr ""
4403
4404 #. type: TP
4405 #: build/C/man7/sigevent.7:90 build/C/man2/wait.2:301
4406 #, no-wrap
4407 msgid "I<si_signo>"
4408 msgstr ""
4409
4410 #. type: Plain text
4411 #: build/C/man7/sigevent.7:94
4412 msgid ""
4413 "This field is set to the signal number (i.e., the same value as in "
4414 "I<sigev_signo>)."
4415 msgstr ""
4416
4417 #. type: Plain text
4418 #: build/C/man7/sigevent.7:98
4419 msgid "This field is set to the value specified in I<sigev_value>."
4420 msgstr ""
4421
4422 #. type: Plain text
4423 #: build/C/man7/sigevent.7:103
4424 msgid ""
4425 "Depending on the API, other fields may also be set in the I<siginfo_t> "
4426 "structure."
4427 msgstr ""
4428
4429 #. type: Plain text
4430 #: build/C/man7/sigevent.7:106
4431 msgid ""
4432 "The same information is also available if the signal is accepted using "
4433 "B<sigwaitinfo>(2)."
4434 msgstr ""
4435
4436 #. type: TP
4437 #: build/C/man7/sigevent.7:106 build/C/man2/timer_create.2:128
4438 #, no-wrap
4439 msgid "B<SIGEV_THREAD>"
4440 msgstr ""
4441
4442 #. type: Plain text
4443 #: build/C/man7/sigevent.7:123
4444 msgid ""
4445 "Notify the process by invoking I<sigev_notify_function> \"as if\" it were "
4446 "the start function of a new thread.  (Among the implementation possibilities "
4447 "here are that each timer notification could result in the creation of a new "
4448 "thread, or that a single thread is created to receive all notifications.)  "
4449 "The function is invoked with I<sigev_value> as its sole argument.  If "
4450 "I<sigev_notify_attributes> is not NULL, it should point to a "
4451 "I<pthread_attr_t> structure that defines attributes for the new thread (see "
4452 "B<pthread_attr_init>(3))."
4453 msgstr ""
4454
4455 #. type: TP
4456 #: build/C/man7/sigevent.7:123 build/C/man2/timer_create.2:136
4457 #, no-wrap
4458 msgid "B<SIGEV_THREAD_ID> (Linux-specific)"
4459 msgstr ""
4460
4461 #.  | SIGEV_SIGNAL vs not?
4462 #. type: Plain text
4463 #: build/C/man7/sigevent.7:128
4464 msgid "Currently used only by POSIX timers; see B<timer_create>(2)."
4465 msgstr ""
4466
4467 #. type: Plain text
4468 #: build/C/man7/sigevent.7:130 build/C/man2/sigpending.2:61 build/C/man2/sigprocmask.2:109 build/C/man3/sigqueue.3:114 build/C/man3/sigsetops.3:128 build/C/man2/sigsuspend.2:82 build/C/man3/sigwait.3:79 build/C/man2/sigwaitinfo.2:128 build/C/man2/timer_create.2:193 build/C/man2/timer_delete.2:66 build/C/man2/timer_getoverrun.2:96 build/C/man2/timer_settime.2:205
4469 msgid "POSIX.1-2001."
4470 msgstr ""
4471
4472 #. type: Plain text
4473 #: build/C/man7/sigevent.7:139
4474 msgid ""
4475 "B<timer_create>(2), B<aio_fsync>(3), B<aio_read>(3), B<aio_write>(3), "
4476 "B<getaddrinfo_a>(3), B<lio_listio>(3), B<mq_notify>(3), B<aio>(7), "
4477 "B<pthreads>(7)"
4478 msgstr ""
4479
4480 #. type: TH
4481 #: build/C/man3/siginterrupt.3:29
4482 #, no-wrap
4483 msgid "SIGINTERRUPT"
4484 msgstr ""
4485
4486 #. type: Plain text
4487 #: build/C/man3/siginterrupt.3:32
4488 msgid "siginterrupt - allow signals to interrupt system calls"
4489 msgstr ""
4490
4491 #. type: Plain text
4492 #: build/C/man3/siginterrupt.3:37
4493 #, no-wrap
4494 msgid "B<int siginterrupt(int >I<sig>B<, int >I<flag>B<);>\n"
4495 msgstr ""
4496
4497 #. type: Plain text
4498 #: build/C/man3/siginterrupt.3:45
4499 msgid "B<siginterrupt>():"
4500 msgstr ""
4501
4502 #. type: Plain text
4503 #: build/C/man3/siginterrupt.3:62
4504 msgid ""
4505 "The B<siginterrupt>()  function changes the restart behavior when a system "
4506 "call is interrupted by the signal I<sig>.  If the I<flag> argument is false "
4507 "(0), then system calls will be restarted if interrupted by the specified "
4508 "signal I<sig>.  This is the default behavior in Linux."
4509 msgstr ""
4510
4511 #. type: Plain text
4512 #: build/C/man3/siginterrupt.3:67
4513 msgid ""
4514 "If the I<flag> argument is true (1) and no data has been transferred, then a "
4515 "system call interrupted by the signal I<sig> will return -1 and I<errno> "
4516 "will be set to B<EINTR>."
4517 msgstr ""
4518
4519 #. type: Plain text
4520 #: build/C/man3/siginterrupt.3:71
4521 msgid ""
4522 "If the I<flag> argument is true (1) and data transfer has started, then the "
4523 "system call will be interrupted and will return the actual amount of data "
4524 "transferred."
4525 msgstr ""
4526
4527 #. type: Plain text
4528 #: build/C/man3/siginterrupt.3:76
4529 msgid ""
4530 "The B<siginterrupt>()  function returns 0 on success, or -1 if the signal "
4531 "number I<sig> is invalid."
4532 msgstr ""
4533
4534 #. type: Plain text
4535 #: build/C/man3/siginterrupt.3:80
4536 msgid "The specified signal number is invalid."
4537 msgstr ""
4538
4539 #. type: Plain text
4540 #: build/C/man3/siginterrupt.3:89
4541 msgid ""
4542 "4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<siginterrupt>()  as obsolete, "
4543 "recommending the use of B<sigaction>(2)  with the B<SA_RESTART> flag "
4544 "instead."
4545 msgstr ""
4546
4547 #. type: Plain text
4548 #: build/C/man3/siginterrupt.3:90
4549 msgid "B<signal>(2)"
4550 msgstr ""
4551
4552 #. type: TH
4553 #: build/C/man2/signal.2:34 build/C/man7/signal.7:44
4554 #, no-wrap
4555 msgid "SIGNAL"
4556 msgstr ""
4557
4558 #. type: TH
4559 #: build/C/man2/signal.2:34
4560 #, no-wrap
4561 msgid "2008-07-11"
4562 msgstr ""
4563
4564 #. type: Plain text
4565 #: build/C/man2/signal.2:37
4566 msgid "signal - ANSI C signal handling"
4567 msgstr ""
4568
4569 #. type: Plain text
4570 #: build/C/man2/signal.2:43
4571 msgid "B<sighandler_t signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
4572 msgstr ""
4573
4574 #. type: Plain text
4575 #: build/C/man2/signal.2:52
4576 msgid ""
4577 "The behavior of B<signal>()  varies across UNIX versions, and has also "
4578 "varied historically across different versions of Linux.  B<Avoid its use>: "
4579 "use B<sigaction>(2)  instead.  See I<Portability> below."
4580 msgstr ""
4581
4582 #. type: Plain text
4583 #: build/C/man2/signal.2:62
4584 msgid ""
4585 "B<signal>()  sets the disposition of the signal I<signum> to I<handler>, "
4586 "which is either B<SIG_IGN>, B<SIG_DFL>, or the address of a "
4587 "programmer-defined function (a \"signal handler\")."
4588 msgstr ""
4589
4590 #. type: Plain text
4591 #: build/C/man2/signal.2:66
4592 msgid ""
4593 "If the signal I<signum> is delivered to the process, then one of the "
4594 "following happens:"
4595 msgstr ""
4596
4597 #. type: Plain text
4598 #: build/C/man2/signal.2:71
4599 msgid "If the disposition is set to B<SIG_IGN>, then the signal is ignored."
4600 msgstr ""
4601
4602 #. type: Plain text
4603 #: build/C/man2/signal.2:78
4604 msgid ""
4605 "If the disposition is set to B<SIG_DFL>, then the default action associated "
4606 "with the signal (see B<signal>(7))  occurs."
4607 msgstr ""
4608
4609 #. type: Plain text
4610 #: build/C/man2/signal.2:89
4611 msgid ""
4612 "If the disposition is set to a function, then first either the disposition "
4613 "is reset to B<SIG_DFL>, or the signal is blocked (see I<Portability> below), "
4614 "and then I<handler> is called with argument I<signum>.  If invocation of the "
4615 "handler caused the signal to be blocked, then the signal is unblocked upon "
4616 "return from the handler."
4617 msgstr ""
4618
4619 #. type: Plain text
4620 #: build/C/man2/signal.2:95
4621 msgid "The signals B<SIGKILL> and B<SIGSTOP> cannot be caught or ignored."
4622 msgstr ""
4623
4624 #. type: Plain text
4625 #: build/C/man2/signal.2:100
4626 msgid ""
4627 "B<signal>()  returns the previous value of the signal handler, or B<SIG_ERR> "
4628 "on error."
4629 msgstr ""
4630
4631 #. type: Plain text
4632 #: build/C/man2/signal.2:105
4633 msgid "I<signum> is invalid."
4634 msgstr ""
4635
4636 #. type: Plain text
4637 #: build/C/man2/signal.2:111
4638 msgid "The effects of B<signal>()  in a multithreaded process are unspecified."
4639 msgstr ""
4640
4641 #. type: Plain text
4642 #: build/C/man2/signal.2:136
4643 msgid ""
4644 "See B<sigaction>(2)  for details on what happens when B<SIGCHLD> is set to "
4645 "B<SIG_IGN>."
4646 msgstr ""
4647
4648 #. type: Plain text
4649 #: build/C/man2/signal.2:141
4650 msgid ""
4651 "See B<signal>(7)  for a list of the async-signal-safe functions that can be "
4652 "safely called from inside a signal handler."
4653 msgstr ""
4654
4655 #. type: Plain text
4656 #: build/C/man2/signal.2:156
4657 msgid ""
4658 "The use of I<sighandler_t> is a GNU extension.  Various versions of libc "
4659 "predefine this type; libc4 and libc5 define I<SignalHandler>; glibc defines "
4660 "I<sig_t> and, when B<_GNU_SOURCE> is defined, also I<sighandler_t>.  Without "
4661 "use of such a type, the declaration of B<signal>()  is the somewhat harder "
4662 "to read:"
4663 msgstr ""
4664
4665 #. type: Plain text
4666 #: build/C/man2/signal.2:160
4667 #, no-wrap
4668 msgid ""
4669 "B<void ( *>I<signal>B<(int >I<signum>B<, void (*>I<handler>B<)(int)) ) "
4670 "(int);>\n"
4671 msgstr ""
4672
4673 #. type: SS
4674 #: build/C/man2/signal.2:162
4675 #, no-wrap
4676 msgid "Portability"
4677 msgstr ""
4678
4679 #. type: Plain text
4680 #: build/C/man2/signal.2:174
4681 msgid ""
4682 "The only portable use of B<signal>()  is to set a signal's disposition to "
4683 "B<SIG_DFL> or B<SIG_IGN>.  The semantics when using B<signal>()  to "
4684 "establish a signal handler vary across systems (and POSIX.1 explicitly "
4685 "permits this variation); B<do not use it for this purpose.>"
4686 msgstr ""
4687
4688 #. type: Plain text
4689 #: build/C/man2/signal.2:180
4690 msgid ""
4691 "POSIX.1 solved the portability mess by specifying B<sigaction>(2), which "
4692 "provides explicit control of the semantics when a signal handler is invoked; "
4693 "use that interface instead of B<signal>()."
4694 msgstr ""
4695
4696 #. type: Plain text
4697 #: build/C/man2/signal.2:193
4698 msgid ""
4699 "In the original UNIX systems, when a handler that was established using "
4700 "B<signal>()  was invoked by the delivery of a signal, the disposition of the "
4701 "signal would be reset to B<SIG_DFL>, and the system did not block delivery "
4702 "of further instances of the signal.  System V also provides these semantics "
4703 "for B<signal>().  This was bad because the signal might be delivered again "
4704 "before the handler had a chance to reestablish itself.  Furthermore, rapid "
4705 "deliveries of the same signal could result in recursive invocations of the "
4706 "handler."
4707 msgstr ""
4708
4709 #. type: Plain text
4710 #: build/C/man2/signal.2:203
4711 msgid ""
4712 "BSD improved on this situation by changing the semantics of signal handling "
4713 "(but, unfortunately, silently changed the semantics when establishing a "
4714 "handler with B<signal>()).  On BSD, when a signal handler is invoked, the "
4715 "signal disposition is not reset, and further instances of the signal are "
4716 "blocked from being delivered while the handler is executing."
4717 msgstr ""
4718
4719 #. type: Plain text
4720 #: build/C/man2/signal.2:205
4721 msgid "The situation on Linux is as follows:"
4722 msgstr ""
4723
4724 #. type: Plain text
4725 #: build/C/man2/signal.2:209
4726 msgid "The kernel's B<signal>()  system call provides System V semantics."
4727 msgstr ""
4728
4729 #. type: Plain text
4730 #: build/C/man2/signal.2:225
4731 msgid ""
4732 "By default, in glibc 2 and later, the B<signal>()  wrapper function does not "
4733 "invoke the kernel system call.  Instead, it calls B<sigaction>(2)  using "
4734 "flags that supply BSD semantics.  This default behavior is provided as long "
4735 "as the B<_BSD_SOURCE> feature test macro is defined.  By default, "
4736 "B<_BSD_SOURCE> is defined; it is also implicitly defined if one defines "
4737 "B<_GNU_SOURCE>, and can of course be explicitly defined."
4738 msgstr ""
4739
4740 #
4741 #.  System V semantics are also provided if one uses the separate
4742 #.  .BR sysv_signal (3)
4743 #.  function.
4744 #. type: Plain text
4745 #: build/C/man2/signal.2:248
4746 msgid ""
4747 "On glibc 2 and later, if the B<_BSD_SOURCE> feature test macro is not "
4748 "defined, then B<signal>()  provides System V semantics.  (The default "
4749 "implicit definition of B<_BSD_SOURCE> is not provided if one invokes "
4750 "B<gcc>(1)  in one of its standard modes (I<-std=xxx> or I<-ansi>)  or "
4751 "defines various other feature test macros such as B<_POSIX_SOURCE>, "
4752 "B<_XOPEN_SOURCE>, or B<_SVID_SOURCE>; see B<feature_test_macros>(7).)"
4753 msgstr ""
4754
4755 #. type: Plain text
4756 #: build/C/man2/signal.2:259
4757 msgid ""
4758 "The B<signal>()  function in Linux libc4 and libc5 provide System V "
4759 "semantics.  If one on a libc5 system includes I<E<lt>bsd/signal.hE<gt>> "
4760 "instead of I<E<lt>signal.hE<gt>>, then B<signal>()  provides BSD semantics."
4761 msgstr ""
4762
4763 #. type: Plain text
4764 #: build/C/man2/signal.2:277
4765 msgid ""
4766 "B<kill>(1), B<alarm>(2), B<kill>(2), B<killpg>(2), B<pause>(2), "
4767 "B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), "
4768 "B<sigsuspend>(2), B<bsd_signal>(3), B<raise>(3), B<siginterrupt>(3), "
4769 "B<sigqueue>(3), B<sigsetops>(3), B<sigvec>(3), B<sysv_signal>(3), "
4770 "B<signal>(7)"
4771 msgstr ""
4772
4773 #. type: Plain text
4774 #: build/C/man7/signal.7:47
4775 msgid "signal - overview of signals"
4776 msgstr ""
4777
4778 #. type: Plain text
4779 #: build/C/man7/signal.7:50
4780 msgid ""
4781 "Linux supports both POSIX reliable signals (hereinafter \"standard "
4782 "signals\") and POSIX real-time signals."
4783 msgstr ""
4784
4785 #. type: SS
4786 #: build/C/man7/signal.7:50
4787 #, no-wrap
4788 msgid "Signal Dispositions"
4789 msgstr ""
4790
4791 #. type: Plain text
4792 #: build/C/man7/signal.7:55
4793 msgid ""
4794 "Each signal has a current I<disposition>, which determines how the process "
4795 "behaves when it is delivered the signal."
4796 msgstr ""
4797
4798 #. type: Plain text
4799 #: build/C/man7/signal.7:58
4800 msgid ""
4801 "The entries in the \"Action\" column of the tables below specify the default "
4802 "disposition for each signal, as follows:"
4803 msgstr ""
4804
4805 #. type: IP
4806 #: build/C/man7/signal.7:58
4807 #, no-wrap
4808 msgid "Term"
4809 msgstr ""
4810
4811 #. type: Plain text
4812 #: build/C/man7/signal.7:60
4813 msgid "Default action is to terminate the process."
4814 msgstr ""
4815
4816 #. type: IP
4817 #: build/C/man7/signal.7:60
4818 #, no-wrap
4819 msgid "Ign"
4820 msgstr ""
4821
4822 #. type: Plain text
4823 #: build/C/man7/signal.7:62
4824 msgid "Default action is to ignore the signal."
4825 msgstr ""
4826
4827 #. type: IP
4828 #: build/C/man7/signal.7:62
4829 #, no-wrap
4830 msgid "Core"
4831 msgstr ""
4832
4833 #. type: Plain text
4834 #: build/C/man7/signal.7:65
4835 msgid "Default action is to terminate the process and dump core (see B<core>(5))."
4836 msgstr ""
4837
4838 #. type: IP
4839 #: build/C/man7/signal.7:65
4840 #, no-wrap
4841 msgid "Stop"
4842 msgstr ""
4843
4844 #. type: Plain text
4845 #: build/C/man7/signal.7:67
4846 msgid "Default action is to stop the process."
4847 msgstr ""
4848
4849 #. type: IP
4850 #: build/C/man7/signal.7:67
4851 #, no-wrap
4852 msgid "Cont"
4853 msgstr ""
4854
4855 #. type: Plain text
4856 #: build/C/man7/signal.7:69
4857 msgid "Default action is to continue the process if it is currently stopped."
4858 msgstr ""
4859
4860 #. type: Plain text
4861 #: build/C/man7/signal.7:91
4862 msgid ""
4863 "A process can change the disposition of a signal using B<sigaction>(2)  or "
4864 "B<signal>(2).  (The latter is less portable when establishing a signal "
4865 "handler; see B<signal>(2)  for details.)  Using these system calls, a "
4866 "process can elect one of the following behaviors to occur on delivery of the "
4867 "signal: perform the default action; ignore the signal; or catch the signal "
4868 "with a I<signal handler>, a programmer-defined function that is "
4869 "automatically invoked when the signal is delivered.  (By default, the signal "
4870 "handler is invoked on the normal process stack.  It is possible to arrange "
4871 "that the signal handler uses an alternate stack; see B<sigaltstack>(2)  for "
4872 "a discussion of how to do this and when it might be useful.)"
4873 msgstr ""
4874
4875 #. type: Plain text
4876 #: build/C/man7/signal.7:95
4877 msgid ""
4878 "The signal disposition is a per-process attribute: in a multithreaded "
4879 "application, the disposition of a particular signal is the same for all "
4880 "threads."
4881 msgstr ""
4882
4883 #. type: SS
4884 #: build/C/man7/signal.7:103
4885 #, no-wrap
4886 msgid "Sending a Signal"
4887 msgstr ""
4888
4889 #. type: Plain text
4890 #: build/C/man7/signal.7:106
4891 msgid ""
4892 "The following system calls and library functions allow the caller to send a "
4893 "signal:"
4894 msgstr ""
4895
4896 #. type: TP
4897 #: build/C/man7/signal.7:106
4898 #, no-wrap
4899 msgid "B<raise>(3)"
4900 msgstr ""
4901
4902 #. type: Plain text
4903 #: build/C/man7/signal.7:109
4904 msgid "Sends a signal to the calling thread."
4905 msgstr ""
4906
4907 #. type: TP
4908 #: build/C/man7/signal.7:109
4909 #, no-wrap
4910 msgid "B<kill>(2)"
4911 msgstr ""
4912
4913 #. type: Plain text
4914 #: build/C/man7/signal.7:114
4915 msgid ""
4916 "Sends a signal to a specified process, to all members of a specified process "
4917 "group, or to all processes on the system."
4918 msgstr ""
4919
4920 #. type: TP
4921 #: build/C/man7/signal.7:114
4922 #, no-wrap
4923 msgid "B<killpg>(2)"
4924 msgstr ""
4925
4926 #. type: Plain text
4927 #: build/C/man7/signal.7:117
4928 msgid "Sends a signal to all of the members of a specified process group."
4929 msgstr ""
4930
4931 #. type: TP
4932 #: build/C/man7/signal.7:117
4933 #, no-wrap
4934 msgid "B<pthread_kill>(3)"
4935 msgstr ""
4936
4937 #. type: Plain text
4938 #: build/C/man7/signal.7:121
4939 msgid ""
4940 "Sends a signal to a specified POSIX thread in the same process as the "
4941 "caller."
4942 msgstr ""
4943
4944 #. type: TP
4945 #: build/C/man7/signal.7:121
4946 #, no-wrap
4947 msgid "B<tgkill>(2)"
4948 msgstr ""
4949
4950 #. type: Plain text
4951 #: build/C/man7/signal.7:126
4952 msgid ""
4953 "Sends a signal to a specified thread within a specific process.  (This is "
4954 "the system call used to implement B<pthread_kill>(3).)"
4955 msgstr ""
4956
4957 #. type: Plain text
4958 #: build/C/man7/signal.7:129
4959 msgid "Sends a real-time signal with accompanying data to a specified process."
4960 msgstr ""
4961
4962 #. type: SS
4963 #: build/C/man7/signal.7:129
4964 #, no-wrap
4965 msgid "Waiting for a Signal to be Caught"
4966 msgstr ""
4967
4968 #. type: Plain text
4969 #: build/C/man7/signal.7:133
4970 msgid ""
4971 "The following system calls suspend execution of the calling process or "
4972 "thread until a signal is caught (or an unhandled signal terminates the "
4973 "process):"
4974 msgstr ""
4975
4976 #. type: TP
4977 #: build/C/man7/signal.7:133
4978 #, no-wrap
4979 msgid "B<pause>(2)"
4980 msgstr ""
4981
4982 #. type: Plain text
4983 #: build/C/man7/signal.7:136
4984 msgid "Suspends execution until any signal is caught."
4985 msgstr ""
4986
4987 #. type: TP
4988 #: build/C/man7/signal.7:136
4989 #, no-wrap
4990 msgid "B<sigsuspend>(2)"
4991 msgstr ""
4992
4993 #. type: Plain text
4994 #: build/C/man7/signal.7:140
4995 msgid ""
4996 "Temporarily changes the signal mask (see below) and suspends execution until "
4997 "one of the unmasked signals is caught."
4998 msgstr ""
4999
5000 #. type: SS
5001 #: build/C/man7/signal.7:140
5002 #, no-wrap
5003 msgid "Synchronously Accepting a Signal"
5004 msgstr ""
5005
5006 #. type: Plain text
5007 #: build/C/man7/signal.7:147
5008 msgid ""
5009 "Rather than asynchronously catching a signal via a signal handler, it is "
5010 "possible to synchronously accept the signal, that is, to block execution "
5011 "until the signal is delivered, at which point the kernel returns information "
5012 "about the signal to the caller.  There are two general ways to do this:"
5013 msgstr ""
5014
5015 #. type: Plain text
5016 #: build/C/man7/signal.7:155
5017 msgid ""
5018 "B<sigwaitinfo>(2), B<sigtimedwait>(2), and B<sigwait>(3)  suspend execution "
5019 "until one of the signals in a specified set is delivered.  Each of these "
5020 "calls returns information about the delivered signal."
5021 msgstr ""
5022
5023 #. type: Plain text
5024 #: build/C/man7/signal.7:168
5025 msgid ""
5026 "B<signalfd>(2)  returns a file descriptor that can be used to read "
5027 "information about signals that are delivered to the caller.  Each B<read>(2)  "
5028 "from this file descriptor blocks until one of the signals in the set "
5029 "specified in the B<signalfd>(2)  call is delivered to the caller.  The "
5030 "buffer returned by B<read>(2)  contains a structure describing the signal."
5031 msgstr ""
5032
5033 #. type: SS
5034 #: build/C/man7/signal.7:168
5035 #, no-wrap
5036 msgid "Signal Mask and Pending Signals"
5037 msgstr ""
5038
5039 #. type: Plain text
5040 #: build/C/man7/signal.7:175
5041 msgid ""
5042 "A signal may be I<blocked>, which means that it will not be delivered until "
5043 "it is later unblocked.  Between the time when it is generated and when it is "
5044 "delivered a signal is said to be I<pending>."
5045 msgstr ""
5046
5047 #. type: Plain text
5048 #: build/C/man7/signal.7:184
5049 msgid ""
5050 "Each thread in a process has an independent I<signal mask>, which indicates "
5051 "the set of signals that the thread is currently blocking.  A thread can "
5052 "manipulate its signal mask using B<pthread_sigmask>(3).  In a traditional "
5053 "single-threaded application, B<sigprocmask>(2)  can be used to manipulate "
5054 "the signal mask."
5055 msgstr ""
5056
5057 #. type: Plain text
5058 #: build/C/man7/signal.7:190 build/C/man2/sigprocmask.2:121
5059 msgid ""
5060 "A child created via B<fork>(2)  inherits a copy of its parent's signal mask; "
5061 "the signal mask is preserved across B<execve>(2)."
5062 msgstr ""
5063
5064 #. type: Plain text
5065 #: build/C/man7/signal.7:207
5066 msgid ""
5067 "A signal may be generated (and thus pending)  for a process as a whole "
5068 "(e.g., when sent using B<kill>(2))  or for a specific thread (e.g., certain "
5069 "signals, such as B<SIGSEGV> and B<SIGFPE>, generated as a consequence of "
5070 "executing a specific machine-language instruction are thread directed, as "
5071 "are signals targeted at a specific thread using B<pthread_kill>(3)).  A "
5072 "process-directed signal may be delivered to any one of the threads that does "
5073 "not currently have the signal blocked.  If more than one of the threads has "
5074 "the signal unblocked, then the kernel chooses an arbitrary thread to which "
5075 "to deliver the signal."
5076 msgstr ""
5077
5078 #. type: Plain text
5079 #: build/C/man7/signal.7:214
5080 msgid ""
5081 "A thread can obtain the set of signals that it currently has pending using "
5082 "B<sigpending>(2).  This set will consist of the union of the set of pending "
5083 "process-directed signals and the set of signals pending for the calling "
5084 "thread."
5085 msgstr ""
5086
5087 #. type: Plain text
5088 #: build/C/man7/signal.7:220 build/C/man2/sigpending.2:76
5089 msgid ""
5090 "A child created via B<fork>(2)  initially has an empty pending signal set; "
5091 "the pending signal set is preserved across an B<execve>(2)."
5092 msgstr ""
5093
5094 #. type: SS
5095 #: build/C/man7/signal.7:220
5096 #, no-wrap
5097 msgid "Standard Signals"
5098 msgstr ""
5099
5100 #.  parisc is a law unto itself
5101 #. type: Plain text
5102 #: build/C/man7/signal.7:230
5103 msgid ""
5104 "Linux supports the standard signals listed below.  Several signal numbers "
5105 "are architecture-dependent, as indicated in the \"Value\" column.  (Where "
5106 "three values are given, the first one is usually valid for alpha and sparc, "
5107 "the middle one for ix86, ia64, ppc, s390, arm and sh, and the last one for "
5108 "mips.  A - denotes that a signal is absent on the corresponding "
5109 "architecture.)"
5110 msgstr ""
5111
5112 #. type: Plain text
5113 #: build/C/man7/signal.7:232
5114 msgid "First the signals described in the original POSIX.1-1990 standard."
5115 msgstr ""
5116
5117 #. type: tbl table
5118 #: build/C/man7/signal.7:236 build/C/man7/signal.7:272 build/C/man7/signal.7:301
5119 #, no-wrap
5120 msgid "Signal\tValue\tAction\tComment\n"
5121 msgstr ""
5122
5123 #. type: tbl table
5124 #: build/C/man7/signal.7:237
5125 #, no-wrap
5126 msgid "SIGHUP\t\\01\tTerm\tHangup detected on controlling terminal\n"
5127 msgstr ""
5128
5129 #. type: tbl table
5130 #: build/C/man7/signal.7:238
5131 #, no-wrap
5132 msgid "\t\t\tor death of controlling process\n"
5133 msgstr ""
5134
5135 #. type: tbl table
5136 #: build/C/man7/signal.7:239
5137 #, no-wrap
5138 msgid "SIGINT\t\\02\tTerm\tInterrupt from keyboard\n"
5139 msgstr ""
5140
5141 #. type: tbl table
5142 #: build/C/man7/signal.7:240
5143 #, no-wrap
5144 msgid "SIGQUIT\t\\03\tCore\tQuit from keyboard\n"
5145 msgstr ""
5146
5147 #. type: tbl table
5148 #: build/C/man7/signal.7:241
5149 #, no-wrap
5150 msgid "SIGILL\t\\04\tCore\tIllegal Instruction\n"
5151 msgstr ""
5152
5153 #. type: tbl table
5154 #: build/C/man7/signal.7:242
5155 #, no-wrap
5156 msgid "SIGABRT\t\\06\tCore\tAbort signal from B<abort>(3)\n"
5157 msgstr ""
5158
5159 #. type: tbl table
5160 #: build/C/man7/signal.7:243
5161 #, no-wrap
5162 msgid "SIGFPE\t\\08\tCore\tFloating point exception\n"
5163 msgstr ""
5164
5165 #. type: tbl table
5166 #: build/C/man7/signal.7:244
5167 #, no-wrap
5168 msgid "SIGKILL\t\\09\tTerm\tKill signal\n"
5169 msgstr ""
5170
5171 #. type: tbl table
5172 #: build/C/man7/signal.7:245
5173 #, no-wrap
5174 msgid "SIGSEGV\t11\tCore\tInvalid memory reference\n"
5175 msgstr ""
5176
5177 #. type: tbl table
5178 #: build/C/man7/signal.7:246
5179 #, no-wrap
5180 msgid "SIGPIPE\t13\tTerm\tBroken pipe: write to pipe with no\n"
5181 msgstr ""
5182
5183 #. type: tbl table
5184 #: build/C/man7/signal.7:247
5185 #, no-wrap
5186 msgid "\t\t\treaders\n"
5187 msgstr ""
5188
5189 #. type: tbl table
5190 #: build/C/man7/signal.7:248
5191 #, no-wrap
5192 msgid "SIGALRM\t14\tTerm\tTimer signal from B<alarm>(2)\n"
5193 msgstr ""
5194
5195 #. type: tbl table
5196 #: build/C/man7/signal.7:249
5197 #, no-wrap
5198 msgid "SIGTERM\t15\tTerm\tTermination signal\n"
5199 msgstr ""
5200
5201 #. type: tbl table
5202 #: build/C/man7/signal.7:250
5203 #, no-wrap
5204 msgid "SIGUSR1\t30,10,16\tTerm\tUser-defined signal 1\n"
5205 msgstr ""
5206
5207 #. type: tbl table
5208 #: build/C/man7/signal.7:251
5209 #, no-wrap
5210 msgid "SIGUSR2\t31,12,17\tTerm\tUser-defined signal 2\n"
5211 msgstr ""
5212
5213 #. type: tbl table
5214 #: build/C/man7/signal.7:252
5215 #, no-wrap
5216 msgid "SIGCHLD\t20,17,18\tIgn\tChild stopped or terminated\n"
5217 msgstr ""
5218
5219 #. type: tbl table
5220 #: build/C/man7/signal.7:253
5221 #, no-wrap
5222 msgid "SIGCONT\t19,18,25\tCont\tContinue if stopped\n"
5223 msgstr ""
5224
5225 #. type: tbl table
5226 #: build/C/man7/signal.7:254
5227 #, no-wrap
5228 msgid "SIGSTOP\t17,19,23\tStop\tStop process\n"
5229 msgstr ""
5230
5231 #. type: tbl table
5232 #: build/C/man7/signal.7:255
5233 #, no-wrap
5234 msgid "SIGTSTP\t18,20,24\tStop\tStop typed at tty\n"
5235 msgstr ""
5236
5237 #. type: tbl table
5238 #: build/C/man7/signal.7:256
5239 #, no-wrap
5240 msgid "SIGTTIN\t21,21,26\tStop\ttty input for background process\n"
5241 msgstr ""
5242
5243 #. type: tbl table
5244 #: build/C/man7/signal.7:257
5245 #, no-wrap
5246 msgid "SIGTTOU\t22,22,27\tStop\ttty output for background process\n"
5247 msgstr ""
5248
5249 #. type: Plain text
5250 #: build/C/man7/signal.7:265
5251 msgid "The signals B<SIGKILL> and B<SIGSTOP> cannot be caught, blocked, or ignored."
5252 msgstr ""
5253
5254 #. type: Plain text
5255 #: build/C/man7/signal.7:268
5256 msgid ""
5257 "Next the signals not in the POSIX.1-1990 standard but described in SUSv2 and "
5258 "POSIX.1-2001."
5259 msgstr ""
5260
5261 #. type: tbl table
5262 #: build/C/man7/signal.7:273
5263 #, no-wrap
5264 msgid "SIGBUS\t10,7,10\tCore\tBus error (bad memory access)\n"
5265 msgstr ""
5266
5267 #. type: tbl table
5268 #: build/C/man7/signal.7:274
5269 #, no-wrap
5270 msgid "SIGPOLL\t\tTerm\tPollable event (Sys V).\n"
5271 msgstr ""
5272
5273 #. type: tbl table
5274 #: build/C/man7/signal.7:275
5275 #, no-wrap
5276 msgid "\t\t\tSynonym for B<SIGIO>\n"
5277 msgstr ""
5278
5279 #. type: tbl table
5280 #: build/C/man7/signal.7:276
5281 #, no-wrap
5282 msgid "SIGPROF\t27,27,29\tTerm\tProfiling timer expired\n"
5283 msgstr ""
5284
5285 #. type: tbl table
5286 #: build/C/man7/signal.7:277
5287 #, no-wrap
5288 msgid "SIGSYS\t12,31,12\tCore\tBad argument to routine (SVr4)\n"
5289 msgstr ""
5290
5291 #. type: tbl table
5292 #: build/C/man7/signal.7:278
5293 #, no-wrap
5294 msgid "SIGTRAP\t5\tCore\tTrace/breakpoint trap\n"
5295 msgstr ""
5296
5297 #. type: tbl table
5298 #: build/C/man7/signal.7:279
5299 #, no-wrap
5300 msgid "SIGURG\t16,23,21\tIgn\tUrgent condition on socket (4.2BSD)\n"
5301 msgstr ""
5302
5303 #. type: tbl table
5304 #: build/C/man7/signal.7:280
5305 #, no-wrap
5306 msgid "SIGVTALRM\t26,26,28\tTerm\tVirtual alarm clock (4.2BSD)\n"
5307 msgstr ""
5308
5309 #. type: tbl table
5310 #: build/C/man7/signal.7:281
5311 #, no-wrap
5312 msgid "SIGXCPU\t24,24,30\tCore\tCPU time limit exceeded (4.2BSD)\n"
5313 msgstr ""
5314
5315 #. type: tbl table
5316 #: build/C/man7/signal.7:282
5317 #, no-wrap
5318 msgid "SIGXFSZ\t25,25,31\tCore\tFile size limit exceeded (4.2BSD)\n"
5319 msgstr ""
5320
5321 #. type: Plain text
5322 #: build/C/man7/signal.7:295
5323 msgid ""
5324 "Up to and including Linux 2.2, the default behavior for B<SIGSYS>, "
5325 "B<SIGXCPU>, B<SIGXFSZ>, and (on architectures other than SPARC and MIPS)  "
5326 "B<SIGBUS> was to terminate the process (without a core dump).  (On some "
5327 "other UNIX systems the default action for B<SIGXCPU> and B<SIGXFSZ> is to "
5328 "terminate the process without a core dump.)  Linux 2.4 conforms to the "
5329 "POSIX.1-2001 requirements for these signals, terminating the process with a "
5330 "core dump."
5331 msgstr ""
5332
5333 #. type: Plain text
5334 #: build/C/man7/signal.7:297
5335 msgid "Next various other signals."
5336 msgstr ""
5337
5338 #. type: tbl table
5339 #: build/C/man7/signal.7:302
5340 #, no-wrap
5341 msgid "SIGIOT\t6\tCore\tIOT trap. A synonym for B<SIGABRT>\n"
5342 msgstr ""
5343
5344 #. type: tbl table
5345 #: build/C/man7/signal.7:303
5346 #, no-wrap
5347 msgid "SIGEMT\t7,-,7\tTerm\n"
5348 msgstr ""
5349
5350 #. type: tbl table
5351 #: build/C/man7/signal.7:304
5352 #, no-wrap
5353 msgid "SIGSTKFLT\t-,16,-\tTerm\tStack fault on coprocessor (unused)\n"
5354 msgstr ""
5355
5356 #. type: tbl table
5357 #: build/C/man7/signal.7:305
5358 #, no-wrap
5359 msgid "SIGIO\t23,29,22\tTerm\tI/O now possible (4.2BSD)\n"
5360 msgstr ""
5361
5362 #. type: tbl table
5363 #: build/C/man7/signal.7:306
5364 #, no-wrap
5365 msgid "SIGCLD\t-,-,18\tIgn\tA synonym for B<SIGCHLD>\n"
5366 msgstr ""
5367
5368 #. type: tbl table
5369 #: build/C/man7/signal.7:307
5370 #, no-wrap
5371 msgid "SIGPWR\t29,30,19\tTerm\tPower failure (System V)\n"
5372 msgstr ""
5373
5374 #. type: tbl table
5375 #: build/C/man7/signal.7:308
5376 #, no-wrap
5377 msgid "SIGINFO\t29,-,-\t\tA synonym for B<SIGPWR>\n"
5378 msgstr ""
5379
5380 #. type: tbl table
5381 #: build/C/man7/signal.7:309
5382 #, no-wrap
5383 msgid "SIGLOST\t-,-,-\tTerm\tFile lock lost\n"
5384 msgstr ""
5385
5386 #. type: tbl table
5387 #: build/C/man7/signal.7:310
5388 #, no-wrap
5389 msgid "SIGWINCH\t28,28,20\tIgn\tWindow resize signal (4.3BSD, Sun)\n"
5390 msgstr ""
5391
5392 #. type: tbl table
5393 #: build/C/man7/signal.7:311
5394 #, no-wrap
5395 msgid "SIGUNUSED\t-,31,-\tCore\tSynonymous with B<SIGSYS>\n"
5396 msgstr ""
5397
5398 #. type: Plain text
5399 #: build/C/man7/signal.7:321
5400 msgid "(Signal 29 is B<SIGINFO> / B<SIGPWR> on an alpha but B<SIGLOST> on a sparc.)"
5401 msgstr ""
5402
5403 #. type: Plain text
5404 #: build/C/man7/signal.7:327
5405 msgid ""
5406 "B<SIGEMT> is not specified in POSIX.1-2001, but nevertheless appears on most "
5407 "other UNIX systems, where its default action is typically to terminate the "
5408 "process with a core dump."
5409 msgstr ""
5410
5411 #. type: Plain text
5412 #: build/C/man7/signal.7:331
5413 msgid ""
5414 "B<SIGPWR> (which is not specified in POSIX.1-2001) is typically ignored by "
5415 "default on those other UNIX systems where it appears."
5416 msgstr ""
5417
5418 #. type: Plain text
5419 #: build/C/man7/signal.7:335
5420 msgid ""
5421 "B<SIGIO> (which is not specified in POSIX.1-2001) is ignored by default on "
5422 "several other UNIX systems."
5423 msgstr ""
5424
5425 #.  parisc is the only exception: SIGSYS is 12, SIGUNUSED is 31
5426 #. type: Plain text
5427 #: build/C/man7/signal.7:342
5428 msgid ""
5429 "Where defined, B<SIGUNUSED> is synonymous with B<SIGSYS> on most "
5430 "architectures."
5431 msgstr ""
5432
5433 #. type: SS
5434 #: build/C/man7/signal.7:342
5435 #, no-wrap
5436 msgid "Real-time Signals"
5437 msgstr ""
5438
5439 #. type: Plain text
5440 #: build/C/man7/signal.7:352
5441 msgid ""
5442 "Linux supports real-time signals as originally defined in the POSIX.1b "
5443 "real-time extensions (and now included in POSIX.1-2001).  The range of "
5444 "supported real-time signals is defined by the macros B<SIGRTMIN> and "
5445 "B<SIGRTMAX>.  POSIX.1-2001 requires that an implementation support at least "
5446 "B<_POSIX_RTSIG_MAX> (8) real-time signals."
5447 msgstr ""
5448
5449 #. type: Plain text
5450 #: build/C/man7/signal.7:374
5451 msgid ""
5452 "The Linux kernel supports a range of 32 different real-time signals, "
5453 "numbered 33 to 64.  However, the glibc POSIX threads implementation "
5454 "internally uses two (for NPTL) or three (for LinuxThreads) real-time signals "
5455 "(see B<pthreads>(7)), and adjusts the value of B<SIGRTMIN> suitably (to 34 "
5456 "or 35).  Because the range of available real-time signals varies according "
5457 "to the glibc threading implementation (and this variation can occur at run "
5458 "time according to the available kernel and glibc), and indeed the range of "
5459 "real-time signals varies across UNIX systems, programs should I<never refer "
5460 "to real-time signals using hard-coded numbers>, but instead should always "
5461 "refer to real-time signals using the notation B<SIGRTMIN>+n, and include "
5462 "suitable (run-time) checks that B<SIGRTMIN>+n does not exceed B<SIGRTMAX>."
5463 msgstr ""
5464
5465 #. type: Plain text
5466 #: build/C/man7/signal.7:378
5467 msgid ""
5468 "Unlike standard signals, real-time signals have no predefined meanings: the "
5469 "entire set of real-time signals can be used for application-defined "
5470 "purposes."
5471 msgstr ""
5472
5473 #. type: Plain text
5474 #: build/C/man7/signal.7:381
5475 msgid ""
5476 "The default action for an unhandled real-time signal is to terminate the "
5477 "receiving process."
5478 msgstr ""
5479
5480 #. type: Plain text
5481 #: build/C/man7/signal.7:383
5482 msgid "Real-time signals are distinguished by the following:"
5483 msgstr ""
5484
5485 #. type: Plain text
5486 #: build/C/man7/signal.7:387
5487 msgid ""
5488 "Multiple instances of real-time signals can be queued.  By contrast, if "
5489 "multiple instances of a standard signal are delivered while that signal is "
5490 "currently blocked, then only one instance is queued."
5491 msgstr ""
5492
5493 #. type: Plain text
5494 #: build/C/man7/signal.7:407
5495 msgid ""
5496 "If the signal is sent using B<sigqueue>(3), an accompanying value (either an "
5497 "integer or a pointer) can be sent with the signal.  If the receiving process "
5498 "establishes a handler for this signal using the B<SA_SIGINFO> flag to "
5499 "B<sigaction>(2)  then it can obtain this data via the I<si_value> field of "
5500 "the I<siginfo_t> structure passed as the second argument to the handler.  "
5501 "Furthermore, the I<si_pid> and I<si_uid> fields of this structure can be "
5502 "used to obtain the PID and real user ID of the process sending the signal."
5503 msgstr ""
5504
5505 #. type: Plain text
5506 #: build/C/man7/signal.7:416
5507 msgid ""
5508 "Real-time signals are delivered in a guaranteed order.  Multiple real-time "
5509 "signals of the same type are delivered in the order they were sent.  If "
5510 "different real-time signals are sent to a process, they are delivered "
5511 "starting with the lowest-numbered signal.  (I.e., low-numbered signals have "
5512 "highest priority.)  By contrast, if multiple standard signals are pending "
5513 "for a process, the order in which they are delivered is unspecified."
5514 msgstr ""
5515
5516 #. type: Plain text
5517 #: build/C/man7/signal.7:421
5518 msgid ""
5519 "If both standard and real-time signals are pending for a process, POSIX "
5520 "leaves it unspecified which is delivered first.  Linux, like many other "
5521 "implementations, gives priority to standard signals in this case."
5522 msgstr ""
5523
5524 #. type: Plain text
5525 #: build/C/man7/signal.7:444
5526 msgid ""
5527 "According to POSIX, an implementation should permit at least "
5528 "B<_POSIX_SIGQUEUE_MAX> (32) real-time signals to be queued to a process.  "
5529 "However, Linux does things differently.  In kernels up to and including "
5530 "2.6.7, Linux imposes a system-wide limit on the number of queued real-time "
5531 "signals for all processes.  This limit can be viewed and (with privilege) "
5532 "changed via the I</proc/sys/kernel/rtsig-max> file.  A related file, "
5533 "I</proc/sys/kernel/rtsig-nr>, can be used to find out how many real-time "
5534 "signals are currently queued.  In Linux 2.6.8, these I</proc> interfaces "
5535 "were replaced by the B<RLIMIT_SIGPENDING> resource limit, which specifies a "
5536 "per-user limit for queued signals; see B<setrlimit>(2)  for further details."
5537 msgstr ""
5538
5539 #. type: SS
5540 #: build/C/man7/signal.7:444
5541 #, no-wrap
5542 msgid "Async-signal-safe functions"
5543 msgstr ""
5544
5545 #. type: Plain text
5546 #: build/C/man7/signal.7:453
5547 msgid ""
5548 "A signal handler function must be very careful, since processing elsewhere "
5549 "may be interrupted at some arbitrary point in the execution of the program.  "
5550 "POSIX has the concept of \"safe function\".  If a signal interrupts the "
5551 "execution of an unsafe function, and I<handler> calls an unsafe function, "
5552 "then the behavior of the program is undefined."
5553 msgstr ""
5554
5555 #. type: Plain text
5556 #: build/C/man7/signal.7:457
5557 msgid ""
5558 "POSIX.1-2004 (also known as POSIX.1-2001 Technical Corrigendum 2)  requires "
5559 "an implementation to guarantee that the following functions can be safely "
5560 "called inside a signal handler:"
5561 msgstr ""
5562
5563 #. type: Plain text
5564 #: build/C/man7/signal.7:578
5565 #, no-wrap
5566 msgid ""
5567 "_Exit()\n"
5568 "_exit()\n"
5569 "abort()\n"
5570 "accept()\n"
5571 "access()\n"
5572 "aio_error()\n"
5573 "aio_return()\n"
5574 "aio_suspend()\n"
5575 "alarm()\n"
5576 "bind()\n"
5577 "cfgetispeed()\n"
5578 "cfgetospeed()\n"
5579 "cfsetispeed()\n"
5580 "cfsetospeed()\n"
5581 "chdir()\n"
5582 "chmod()\n"
5583 "chown()\n"
5584 "clock_gettime()\n"
5585 "close()\n"
5586 "connect()\n"
5587 "creat()\n"
5588 "dup()\n"
5589 "dup2()\n"
5590 "execle()\n"
5591 "execve()\n"
5592 "fchmod()\n"
5593 "fchown()\n"
5594 "fcntl()\n"
5595 "fdatasync()\n"
5596 "fork()\n"
5597 "fpathconf()\n"
5598 "fstat()\n"
5599 "fsync()\n"
5600 "ftruncate()\n"
5601 "getegid()\n"
5602 "geteuid()\n"
5603 "getgid()\n"
5604 "getgroups()\n"
5605 "getpeername()\n"
5606 "getpgrp()\n"
5607 "getpid()\n"
5608 "getppid()\n"
5609 "getsockname()\n"
5610 "getsockopt()\n"
5611 "getuid()\n"
5612 "kill()\n"
5613 "link()\n"
5614 "listen()\n"
5615 "lseek()\n"
5616 "lstat()\n"
5617 "mkdir()\n"
5618 "mkfifo()\n"
5619 "open()\n"
5620 "pathconf()\n"
5621 "pause()\n"
5622 "pipe()\n"
5623 "poll()\n"
5624 "posix_trace_event()\n"
5625 "pselect()\n"
5626 "raise()\n"
5627 "read()\n"
5628 "readlink()\n"
5629 "recv()\n"
5630 "recvfrom()\n"
5631 "recvmsg()\n"
5632 "rename()\n"
5633 "rmdir()\n"
5634 "select()\n"
5635 "sem_post()\n"
5636 "send()\n"
5637 "sendmsg()\n"
5638 "sendto()\n"
5639 "setgid()\n"
5640 "setpgid()\n"
5641 "setsid()\n"
5642 "setsockopt()\n"
5643 "setuid()\n"
5644 "shutdown()\n"
5645 "sigaction()\n"
5646 "sigaddset()\n"
5647 "sigdelset()\n"
5648 "sigemptyset()\n"
5649 "sigfillset()\n"
5650 "sigismember()\n"
5651 "signal()\n"
5652 "sigpause()\n"
5653 "sigpending()\n"
5654 "sigprocmask()\n"
5655 "sigqueue()\n"
5656 "sigset()\n"
5657 "sigsuspend()\n"
5658 "sleep()\n"
5659 "sockatmark()\n"
5660 "socket()\n"
5661 "socketpair()\n"
5662 "stat()\n"
5663 "symlink()\n"
5664 "sysconf()\n"
5665 "tcdrain()\n"
5666 "tcflow()\n"
5667 "tcflush()\n"
5668 "tcgetattr()\n"
5669 "tcgetpgrp()\n"
5670 "tcsendbreak()\n"
5671 "tcsetattr()\n"
5672 "tcsetpgrp()\n"
5673 "time()\n"
5674 "timer_getoverrun()\n"
5675 "timer_gettime()\n"
5676 "timer_settime()\n"
5677 "times()\n"
5678 "umask()\n"
5679 "uname()\n"
5680 "unlink()\n"
5681 "utime()\n"
5682 "wait()\n"
5683 "waitpid()\n"
5684 "write()\n"
5685 msgstr ""
5686
5687 #. type: Plain text
5688 #: build/C/man7/signal.7:583
5689 msgid ""
5690 "POSIX.1-2008 removes fpathconf(), pathconf(), and sysconf()  from the above "
5691 "list, and adds the following functions:"
5692 msgstr ""
5693
5694 #. type: Plain text
5695 #: build/C/man7/signal.7:606
5696 #, no-wrap
5697 msgid ""
5698 "execl()\n"
5699 "execv()\n"
5700 "faccessat()\n"
5701 "fchmodat()\n"
5702 "fchownat()\n"
5703 "fexecve()\n"
5704 "fstatat()\n"
5705 "futimens()\n"
5706 "linkat()\n"
5707 "mkdirat()\n"
5708 "mkfifoat()\n"
5709 "mknod()\n"
5710 "mknodat()\n"
5711 "openat()\n"
5712 "readlinkat()\n"
5713 "renameat()\n"
5714 "symlinkat()\n"
5715 "unlinkat()\n"
5716 "utimensat()\n"
5717 "utimes()\n"
5718 msgstr ""
5719
5720 #. type: SS
5721 #: build/C/man7/signal.7:608
5722 #, no-wrap
5723 msgid "Interruption of System Calls and Library Functions by Signal Handlers"
5724 msgstr ""
5725
5726 #. type: Plain text
5727 #: build/C/man7/signal.7:611
5728 msgid ""
5729 "If a signal handler is invoked while a system call or library function call "
5730 "is blocked, then either:"
5731 msgstr ""
5732
5733 #. type: Plain text
5734 #: build/C/man7/signal.7:613
5735 msgid "the call is automatically restarted after the signal handler returns; or"
5736 msgstr ""
5737
5738 #. type: Plain text
5739 #: build/C/man7/signal.7:616
5740 msgid "the call fails with the error B<EINTR>."
5741 msgstr ""
5742
5743 #. type: Plain text
5744 #: build/C/man7/signal.7:624
5745 msgid ""
5746 "Which of these two behaviors occurs depends on the interface and whether or "
5747 "not the signal handler was established using the B<SA_RESTART> flag (see "
5748 "B<sigaction>(2)).  The details vary across UNIX systems; below, the details "
5749 "for Linux."
5750 msgstr ""
5751
5752 #.  The following system calls use ERESTARTSYS,
5753 #.  so that they are restartable
5754 #. type: Plain text
5755 #: build/C/man7/signal.7:633
5756 msgid ""
5757 "If a blocked call to one of the following interfaces is interrupted by a "
5758 "signal handler, then the call will be automatically restarted after the "
5759 "signal handler returns if the B<SA_RESTART> flag was used; otherwise the "
5760 "call will fail with the error B<EINTR>:"
5761 msgstr ""
5762
5763 #. type: Plain text
5764 #: build/C/man7/signal.7:649
5765 msgid ""
5766 "B<read>(2), B<readv>(2), B<write>(2), B<writev>(2), and B<ioctl>(2)  calls "
5767 "on \"slow\" devices.  A \"slow\" device is one where the I/O call may block "
5768 "for an indefinite time, for example, a terminal, pipe, or socket.  (A disk "
5769 "is not a slow device according to this definition.)  If an I/O call on a "
5770 "slow device has already transferred some data by the time it is interrupted "
5771 "by a signal handler, then the call will return a success status (normally, "
5772 "the number of bytes transferred)."
5773 msgstr ""
5774
5775 #. type: Plain text
5776 #: build/C/man7/signal.7:653
5777 msgid "B<open>(2), if it can block (e.g., when opening a FIFO; see B<fifo>(7))."
5778 msgstr ""
5779
5780 #. type: Plain text
5781 #: build/C/man7/signal.7:660
5782 msgid "B<wait>(2), B<wait3>(2), B<wait4>(2), B<waitid>(2), and B<waitpid>(2)."
5783 msgstr ""
5784
5785 #.  If a timeout (setsockopt()) is in effect on the socket, then these
5786 #.  system calls switch to using EINTR.  Consequently, they and are not
5787 #.  automatically restarted, and they show the stop/cont behavior
5788 #.  described below.  (Verified from 2.6.26 source, and by experiment; mtk)
5789 #. type: Plain text
5790 #: build/C/man7/signal.7:676
5791 msgid ""
5792 "Socket interfaces: B<accept>(2), B<connect>(2), B<recv>(2), B<recvfrom>(2), "
5793 "B<recvmsg>(2), B<send>(2), B<sendto>(2), and B<sendmsg>(2), unless a timeout "
5794 "has been set on the socket (see below)."
5795 msgstr ""
5796
5797 #. type: Plain text
5798 #: build/C/man7/signal.7:682
5799 msgid "File locking interfaces: B<flock>(2)  and B<fcntl>(2)  B<F_SETLKW>."
5800 msgstr ""
5801
5802 #. type: Plain text
5803 #: build/C/man7/signal.7:689
5804 msgid ""
5805 "POSIX message queue interfaces: B<mq_receive>(3), B<mq_timedreceive>(3), "
5806 "B<mq_send>(3), and B<mq_timedsend>(3)."
5807 msgstr ""
5808
5809 #. type: Plain text
5810 #: build/C/man7/signal.7:694
5811 msgid ""
5812 "B<futex>(2)  B<FUTEX_WAIT> (since Linux 2.6.22; beforehand, always failed "
5813 "with B<EINTR>)."
5814 msgstr ""
5815
5816 #. type: Plain text
5817 #: build/C/man7/signal.7:701
5818 msgid ""
5819 "POSIX semaphore interfaces: B<sem_wait>(3)  and B<sem_timedwait>(3)  (since "
5820 "Linux 2.6.22; beforehand, always failed with B<EINTR>)."
5821 msgstr ""
5822
5823 #.  These are the system calls that give EINTR or ERESTARTNOHAND
5824 #.  on interruption by a signal handler.
5825 #. type: Plain text
5826 #: build/C/man7/signal.7:712
5827 msgid ""
5828 "The following interfaces are never restarted after being interrupted by a "
5829 "signal handler, regardless of the use of B<SA_RESTART>; they always fail "
5830 "with the error B<EINTR> when interrupted by a signal handler:"
5831 msgstr ""
5832
5833 #. type: Plain text
5834 #: build/C/man7/signal.7:732 build/C/man7/signal.7:806
5835 msgid ""
5836 "Socket interfaces, when a timeout has been set on the socket using "
5837 "B<setsockopt>(2): B<accept>(2), B<recv>(2), B<recvfrom>(2), and "
5838 "B<recvmsg>(2), if a receive timeout (B<SO_RCVTIMEO>)  has been set; "
5839 "B<connect>(2), B<send>(2), B<sendto>(2), and B<sendmsg>(2), if a send "
5840 "timeout (B<SO_SNDTIMEO>)  has been set."
5841 msgstr ""
5842
5843 #. type: Plain text
5844 #: build/C/man7/signal.7:739
5845 msgid ""
5846 "Interfaces used to wait for signals: B<pause>(2), B<sigsuspend>(2), "
5847 "B<sigtimedwait>(2), and B<sigwaitinfo>(2)."
5848 msgstr ""
5849
5850 #. type: Plain text
5851 #: build/C/man7/signal.7:748
5852 msgid ""
5853 "File descriptor multiplexing interfaces: B<epoll_wait>(2), "
5854 "B<epoll_pwait>(2), B<poll>(2), B<ppoll>(2), B<select>(2), and B<pselect>(2)."
5855 msgstr ""
5856
5857 #.  On some other systems, SA_RESTART does restart these system calls
5858 #. type: Plain text
5859 #: build/C/man7/signal.7:756
5860 msgid ""
5861 "System V IPC interfaces: B<msgrcv>(2), B<msgsnd>(2), B<semop>(2), and "
5862 "B<semtimedop>(2)."
5863 msgstr ""
5864
5865 #. type: Plain text
5866 #: build/C/man7/signal.7:762
5867 msgid "Sleep interfaces: B<clock_nanosleep>(2), B<nanosleep>(2), and B<usleep>(3)."
5868 msgstr ""
5869
5870 #. type: Plain text
5871 #: build/C/man7/signal.7:767 build/C/man7/signal.7:820
5872 msgid "B<read>(2)  from an B<inotify>(7)  file descriptor."
5873 msgstr ""
5874
5875 #. type: Plain text
5876 #: build/C/man7/signal.7:769
5877 msgid "B<io_getevents>(2)."
5878 msgstr ""
5879
5880 #. type: Plain text
5881 #: build/C/man7/signal.7:775
5882 msgid ""
5883 "The B<sleep>(3)  function is also never restarted if interrupted by a "
5884 "handler, but gives a success return: the number of seconds remaining to "
5885 "sleep."
5886 msgstr ""
5887
5888 #. type: SS
5889 #: build/C/man7/signal.7:775
5890 #, no-wrap
5891 msgid "Interruption of System Calls and Library Functions by Stop Signals"
5892 msgstr ""
5893
5894 #. type: Plain text
5895 #: build/C/man7/signal.7:784
5896 msgid ""
5897 "On Linux, even in the absence of signal handlers, certain blocking "
5898 "interfaces can fail with the error B<EINTR> after the process is stopped by "
5899 "one of the stop signals and then resumed via B<SIGCONT>.  This behavior is "
5900 "not sanctioned by POSIX.1, and doesn't occur on other systems."
5901 msgstr ""
5902
5903 #. type: Plain text
5904 #: build/C/man7/signal.7:786
5905 msgid "The Linux interfaces that display this behavior are:"
5906 msgstr ""
5907
5908 #. type: Plain text
5909 #: build/C/man7/signal.7:809
5910 msgid "B<epoll_wait>(2), B<epoll_pwait>(2)."
5911 msgstr ""
5912
5913 #. type: Plain text
5914 #: build/C/man7/signal.7:812
5915 msgid "B<semop>(2), B<semtimedop>(2)."
5916 msgstr ""
5917
5918 #. type: Plain text
5919 #: build/C/man7/signal.7:815
5920 msgid "B<sigtimedwait>(2), B<sigwaitinfo>(2)."
5921 msgstr ""
5922
5923 #. type: Plain text
5924 #: build/C/man7/signal.7:826
5925 msgid ""
5926 "Linux 2.6.21 and earlier: B<futex>(2)  B<FUTEX_WAIT>, B<sem_timedwait>(3), "
5927 "B<sem_wait>(3)."
5928 msgstr ""
5929
5930 #. type: Plain text
5931 #: build/C/man7/signal.7:830
5932 msgid "Linux 2.6.8 and earlier: B<msgrcv>(2), B<msgsnd>(2)."
5933 msgstr ""
5934
5935 #. type: Plain text
5936 #: build/C/man7/signal.7:833
5937 msgid "Linux 2.4 and earlier: B<nanosleep>(2)."
5938 msgstr ""
5939
5940 #. type: Plain text
5941 #: build/C/man7/signal.7:836
5942 msgid "POSIX.1, except as noted."
5943 msgstr ""
5944
5945 #. type: Plain text
5946 #: build/C/man7/signal.7:845
5947 msgid ""
5948 "B<SIGIO> and B<SIGLOST> have the same value.  The latter is commented out in "
5949 "the kernel source, but the build process of some software still thinks that "
5950 "signal 29 is B<SIGLOST>."
5951 msgstr ""
5952
5953 #. type: Plain text
5954 #: build/C/man7/signal.7:877
5955 msgid ""
5956 "B<kill>(1), B<getrlimit>(2), B<kill>(2), B<killpg>(2), "
5957 "B<rt_sigqueueinfo>(2), B<setitimer>(2), B<setrlimit>(2), B<sgetmask>(2), "
5958 "B<sigaction>(2), B<sigaltstack>(2), B<signal>(2), B<signalfd>(2), "
5959 "B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2), B<sigwaitinfo>(2), "
5960 "B<abort>(3), B<bsd_signal>(3), B<longjmp>(3), B<raise>(3), "
5961 "B<pthread_sigqueue>(3), B<sigqueue>(3), B<sigset>(3), B<sigsetops>(3), "
5962 "B<sigvec>(3), B<sigwait>(3), B<strsignal>(3), B<sysv_signal>(3), B<core>(5), "
5963 "B<proc>(5), B<pthreads>(7), B<sigevent>(7)"
5964 msgstr ""
5965
5966 #. type: TH
5967 #: build/C/man2/signalfd.2:19
5968 #, no-wrap
5969 msgid "SIGNALFD"
5970 msgstr ""
5971
5972 #. type: TH
5973 #: build/C/man2/signalfd.2:19
5974 #, no-wrap
5975 msgid "2009-01-13"
5976 msgstr ""
5977
5978 #. type: Plain text
5979 #: build/C/man2/signalfd.2:22
5980 msgid "signalfd - create a file descriptor for accepting signals"
5981 msgstr ""
5982
5983 #. type: Plain text
5984 #: build/C/man2/signalfd.2:24
5985 msgid "B<#include E<lt>sys/signalfd.hE<gt>>"
5986 msgstr ""
5987
5988 #. type: Plain text
5989 #: build/C/man2/signalfd.2:26
5990 msgid "B<int signalfd(int >I<fd>B<, const sigset_t *>I<mask>B<, int >I<flags>B<);>"
5991 msgstr ""
5992
5993 #. type: Plain text
5994 #: build/C/man2/signalfd.2:37
5995 msgid ""
5996 "B<signalfd>()  creates a file descriptor that can be used to accept signals "
5997 "targeted at the caller.  This provides an alternative to the use of a signal "
5998 "handler or B<sigwaitinfo>(2), and has the advantage that the file descriptor "
5999 "may be monitored by B<select>(2), B<poll>(2), and B<epoll>(7)."
6000 msgstr ""
6001
6002 #. type: Plain text
6003 #: build/C/man2/signalfd.2:57
6004 msgid ""
6005 "The I<mask> argument specifies the set of signals that the caller wishes to "
6006 "accept via the file descriptor.  This argument is a signal set whose "
6007 "contents can be initialized using the macros described in B<sigsetops>(3).  "
6008 "Normally, the set of signals to be received via the file descriptor should "
6009 "be blocked using B<sigprocmask>(2), to prevent the signals being handled "
6010 "according to their default dispositions.  It is not possible to receive "
6011 "B<SIGKILL> or B<SIGSTOP> signals via a signalfd file descriptor; these "
6012 "signals are silently ignored if specified in I<mask>."
6013 msgstr ""
6014
6015 #. type: Plain text
6016 #: build/C/man2/signalfd.2:71
6017 msgid ""
6018 "If the I<fd> argument is -1, then the call creates a new file descriptor and "
6019 "associates the signal set specified in I<mask> with that descriptor.  If "
6020 "I<fd> is not -1, then it must specify a valid existing signalfd file "
6021 "descriptor, and I<mask> is used to replace the signal set associated with "
6022 "that descriptor."
6023 msgstr ""
6024
6025 #. type: Plain text
6026 #: build/C/man2/signalfd.2:76
6027 msgid ""
6028 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
6029 "I<flags> to change the behaviour of B<signalfd>():"
6030 msgstr ""
6031
6032 #. type: TP
6033 #: build/C/man2/signalfd.2:76
6034 #, no-wrap
6035 msgid "B<SFD_NONBLOCK>"
6036 msgstr ""
6037
6038 #. type: TP
6039 #: build/C/man2/signalfd.2:84
6040 #, no-wrap
6041 msgid "B<SFD_CLOEXEC>"
6042 msgstr ""
6043
6044 #. type: Plain text
6045 #: build/C/man2/signalfd.2:101
6046 msgid ""
6047 "B<signalfd>()  returns a file descriptor that supports the following "
6048 "operations:"
6049 msgstr ""
6050
6051 #. type: Plain text
6052 #: build/C/man2/signalfd.2:120
6053 msgid ""
6054 "If one or more of the signals specified in I<mask> is pending for the "
6055 "process, then the buffer supplied to B<read>(2)  is used to return one or "
6056 "more I<signalfd_siginfo> structures (see below) that describe the signals.  "
6057 "The B<read>(2)  returns information for as many signals as are pending and "
6058 "will fit in the supplied buffer.  The buffer must be at least "
6059 "I<sizeof(struct signalfd_siginfo)> bytes.  The return value of the "
6060 "B<read>(2)  is the total number of bytes read."
6061 msgstr ""
6062
6063 #. type: Plain text
6064 #: build/C/man2/signalfd.2:128
6065 msgid ""
6066 "As a consequence of the B<read>(2), the signals are consumed, so that they "
6067 "are no longer pending for the process (i.e., will not be caught by signal "
6068 "handlers, and cannot be accepted using B<sigwaitinfo>(2))."
6069 msgstr ""
6070
6071 #. type: Plain text
6072 #: build/C/man2/signalfd.2:139
6073 msgid ""
6074 "If none of the signals in I<mask> is pending for the process, then the "
6075 "B<read>(2)  either blocks until one of the signals in I<mask> is generated "
6076 "for the process, or fails with the error B<EAGAIN> if the file descriptor "
6077 "has been made nonblocking."
6078 msgstr ""
6079
6080 #. type: Plain text
6081 #: build/C/man2/signalfd.2:152
6082 msgid ""
6083 "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the "
6084 "B<poll>(2)  B<POLLIN> flag)  if one or more of the signals in I<mask> is "
6085 "pending for the process."
6086 msgstr ""
6087
6088 #. type: Plain text
6089 #: build/C/man2/signalfd.2:159
6090 msgid ""
6091 "The signalfd file descriptor also supports the other file-descriptor "
6092 "multiplexing APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
6093 msgstr ""
6094
6095 #. type: Plain text
6096 #: build/C/man2/signalfd.2:164
6097 msgid ""
6098 "When the file descriptor is no longer required it should be closed.  When "
6099 "all file descriptors associated with the same signalfd object have been "
6100 "closed, the resources for object are freed by the kernel."
6101 msgstr ""
6102
6103 #. type: SS
6104 #: build/C/man2/signalfd.2:164
6105 #, no-wrap
6106 msgid "The signalfd_siginfo structure"
6107 msgstr ""
6108
6109 #. type: Plain text
6110 #: build/C/man2/signalfd.2:170
6111 msgid ""
6112 "The format of the I<signalfd_siginfo> structure(s) returned by B<read>(2)s "
6113 "from a signalfd file descriptor is as follows:"
6114 msgstr ""
6115
6116 #.  ssi_trapno is unused on most arches
6117 #. type: Plain text
6118 #: build/C/man2/signalfd.2:195
6119 #, no-wrap
6120 msgid ""
6121 "struct signalfd_siginfo {\n"
6122 "    uint32_t ssi_signo;   /* Signal number */\n"
6123 "    int32_t  ssi_errno;   /* Error number (unused) */\n"
6124 "    int32_t  ssi_code;    /* Signal code */\n"
6125 "    uint32_t ssi_pid;     /* PID of sender */\n"
6126 "    uint32_t ssi_uid;     /* Real UID of sender */\n"
6127 "    int32_t  ssi_fd;      /* File descriptor (SIGIO) */\n"
6128 "    uint32_t ssi_tid;     /* Kernel timer ID (POSIX timers)\n"
6129 "    uint32_t ssi_band;    /* Band event (SIGIO) */\n"
6130 "    uint32_t ssi_overrun; /* POSIX timer overrun count */\n"
6131 "    uint32_t ssi_trapno;  /* Trap number that caused signal */\n"
6132 "    int32_t  ssi_status;  /* Exit status or signal (SIGCHLD) */\n"
6133 "    int32_t  ssi_int;     /* Integer sent by sigqueue(3) */\n"
6134 "    uint64_t ssi_ptr;     /* Pointer sent by sigqueue(3) */\n"
6135 "    uint64_t ssi_utime;   /* User CPU time consumed (SIGCHLD) */\n"
6136 "    uint64_t ssi_stime;   /* System CPU time consumed (SIGCHLD) */\n"
6137 "    uint64_t ssi_addr;    /* Address that generated signal\n"
6138 "                             (for hardware-generated signals) */\n"
6139 "    uint8_t  pad[I<X>];      /* Pad size to 128 bytes (allow for\n"
6140 "                              additional fields in the future) */\n"
6141 "};\n"
6142 msgstr ""
6143
6144 #. type: Plain text
6145 #: build/C/man2/signalfd.2:218
6146 msgid ""
6147 "Each of the fields in this structure is analogous to the similarly named "
6148 "field in the I<siginfo_t> structure.  The I<siginfo_t> structure is "
6149 "described in B<sigaction>(2).  Not all fields in the returned "
6150 "I<signalfd_siginfo> structure will be valid for a specific signal; the set "
6151 "of valid fields can be determined from the value returned in the I<ssi_code> "
6152 "field.  This field is the analog of the I<siginfo_t> I<si_code> field; see "
6153 "B<sigaction>(2)  for details."
6154 msgstr ""
6155
6156 #. type: SS
6157 #: build/C/man2/signalfd.2:218 build/C/man2/timerfd_create.2:268
6158 #, no-wrap
6159 msgid "fork(2) semantics"
6160 msgstr ""
6161
6162 #. type: Plain text
6163 #: build/C/man2/signalfd.2:226
6164 msgid ""
6165 "After a B<fork>(2), the child inherits a copy of the signalfd file "
6166 "descriptor.  A B<read>(2)  from the file descriptor in the child will return "
6167 "information about signals queued to the child."
6168 msgstr ""
6169
6170 #. type: SS
6171 #: build/C/man2/signalfd.2:226 build/C/man2/timerfd_create.2:280
6172 #, no-wrap
6173 msgid "execve(2) semantics"
6174 msgstr ""
6175
6176 #. type: Plain text
6177 #: build/C/man2/signalfd.2:238
6178 msgid ""
6179 "Just like any other file descriptor, a signalfd file descriptor remains open "
6180 "across an B<execve>(2), unless it has been marked for close-on-exec (see "
6181 "B<fcntl>(2)).  Any signals that were available for reading before the "
6182 "B<execve>(2)  remain available to the newly loaded program.  (This is "
6183 "analogous to traditional signal semantics, where a blocked signal that is "
6184 "pending remains pending across an B<execve>(2).)"
6185 msgstr ""
6186
6187 #. type: SS
6188 #: build/C/man2/signalfd.2:238
6189 #, no-wrap
6190 msgid "Thread semantics"
6191 msgstr ""
6192
6193 #. type: Plain text
6194 #: build/C/man2/signalfd.2:248
6195 msgid ""
6196 "The semantics of signalfd file descriptors in a multithreaded program mirror "
6197 "the standard semantics for signals.  In other words, when a thread reads "
6198 "from a signalfd file descriptor, it will read the signals that are directed "
6199 "to the thread itself and the signals that are directed to the process (i.e., "
6200 "the entire thread group).  (A thread will not be able to read signals that "
6201 "are directed to other threads in the process.)"
6202 msgstr ""
6203
6204 #. type: Plain text
6205 #: build/C/man2/signalfd.2:262
6206 msgid ""
6207 "On success, B<signalfd>()  returns a signalfd file descriptor; this is "
6208 "either a new file descriptor (if I<fd> was -1), or I<fd> if I<fd> was a "
6209 "valid signalfd file descriptor.  On error, -1 is returned and I<errno> is "
6210 "set to indicate the error."
6211 msgstr ""
6212
6213 #. type: TP
6214 #: build/C/man2/signalfd.2:263 build/C/man2/timerfd_create.2:337
6215 #, no-wrap
6216 msgid "B<EBADF>"
6217 msgstr ""
6218
6219 #. type: Plain text
6220 #: build/C/man2/signalfd.2:268
6221 msgid "The I<fd> file descriptor is not a valid file descriptor."
6222 msgstr ""
6223
6224 #.  or, the
6225 #.  .I sizemask
6226 #.  argument is not equal to
6227 #.  .IR sizeof(sigset_t) ;
6228 #. type: Plain text
6229 #: build/C/man2/signalfd.2:276
6230 msgid "I<fd> is not a valid signalfd file descriptor."
6231 msgstr ""
6232
6233 #. type: Plain text
6234 #: build/C/man2/signalfd.2:283 build/C/man2/timerfd_create.2:319
6235 msgid "I<flags> is invalid; or, in Linux 2.6.26 or earlier, I<flags> is nonzero."
6236 msgstr ""
6237
6238 #. type: Plain text
6239 #: build/C/man2/signalfd.2:286 build/C/man2/timerfd_create.2:322
6240 msgid "The per-process limit of open file descriptors has been reached."
6241 msgstr ""
6242
6243 #. type: Plain text
6244 #: build/C/man2/signalfd.2:296
6245 msgid "There was insufficient memory to create a new signalfd file descriptor."
6246 msgstr ""
6247
6248 #.  signalfd() is in glibc 2.7, but reportedly does not build
6249 #. type: Plain text
6250 #: build/C/man2/signalfd.2:304
6251 msgid ""
6252 "B<signalfd>()  is available on Linux since kernel 2.6.22.  Working support "
6253 "is provided in glibc since version 2.8.  The B<signalfd4>()  system call "
6254 "(see NOTES) is available on Linux since kernel 2.6.27."
6255 msgstr ""
6256
6257 #. type: Plain text
6258 #: build/C/man2/signalfd.2:309
6259 msgid "B<signalfd>()  and B<signalfd4>()  are Linux-specific."
6260 msgstr ""
6261
6262 #. type: Plain text
6263 #: build/C/man2/signalfd.2:319
6264 msgid ""
6265 "The underlying Linux system call requires an additional argument, I<size_t "
6266 "sizemask>, which specifies the size of the I<mask> argument.  The glibc "
6267 "B<signalfd>()  wrapper function does not include this argument, since it "
6268 "provides the required value for the underlying system call."
6269 msgstr ""
6270
6271 #. type: Plain text
6272 #: build/C/man2/signalfd.2:333
6273 msgid ""
6274 "A process can create multiple signalfd file descriptors.  This makes it "
6275 "possible to accept different signals on different file descriptors.  (This "
6276 "may be useful if monitoring the file descriptors using B<select>(2), "
6277 "B<poll>(2), or B<epoll>(7): the arrival of different signals will make "
6278 "different descriptors ready.)  If a signal appears in the I<mask> of more "
6279 "than one of the file descriptors, then occurrences of that signal can be "
6280 "read (once) from any one of the descriptors."
6281 msgstr ""
6282
6283 #. type: Plain text
6284 #: build/C/man2/signalfd.2:349
6285 msgid ""
6286 "There are two underlying Linux system calls: B<signalfd>()  and the more "
6287 "recent B<signalfd4>().  The former system call does not implement a I<flags> "
6288 "argument.  The latter system call implements the I<flags> values described "
6289 "above.  Starting with glibc 2.9, the B<signalfd>()  wrapper function will "
6290 "use B<signalfd4>()  where it is available."
6291 msgstr ""
6292
6293 #.  The fix also was put into 2.6.24.5
6294 #. type: Plain text
6295 #: build/C/man2/signalfd.2:357
6296 msgid ""
6297 "In kernels before 2.6.25, the I<ssi_ptr> and I<ssi_int> fields are not "
6298 "filled in with the data accompanying a signal sent by B<sigqueue>(3)."
6299 msgstr ""
6300
6301 #. type: Plain text
6302 #: build/C/man2/signalfd.2:367
6303 msgid ""
6304 "The program below accepts the signals B<SIGINT> and B<SIGQUIT> via a "
6305 "signalfd file descriptor.  The program terminates after accepting a "
6306 "B<SIGQUIT> signal.  The following shell session demonstrates the use of the "
6307 "program:"
6308 msgstr ""
6309
6310 #. type: Plain text
6311 #: build/C/man2/signalfd.2:378
6312 #, no-wrap
6313 msgid ""
6314 "$B< ./signalfd_demo>\n"
6315 "B<^C>                   # Control-C generates SIGINT\n"
6316 "Got SIGINT\n"
6317 "B<^C>\n"
6318 "Got SIGINT\n"
6319 "B<^\\e>                    # Control-\\e generates SIGQUIT\n"
6320 "Got SIGQUIT\n"
6321 "$\n"
6322 msgstr ""
6323
6324 #. type: Plain text
6325 #: build/C/man2/signalfd.2:388
6326 #, no-wrap
6327 msgid ""
6328 "#include E<lt>sys/signalfd.hE<gt>\n"
6329 "#include E<lt>signal.hE<gt>\n"
6330 "#include E<lt>unistd.hE<gt>\n"
6331 "#include E<lt>stdlib.hE<gt>\n"
6332 "#include E<lt>stdio.hE<gt>\n"
6333 msgstr ""
6334
6335 #. type: Plain text
6336 #: build/C/man2/signalfd.2:399
6337 #, no-wrap
6338 msgid ""
6339 "int\n"
6340 "main(int argc, char *argv[])\n"
6341 "{\n"
6342 "    sigset_t mask;\n"
6343 "    int sfd;\n"
6344 "    struct signalfd_siginfo fdsi;\n"
6345 "    ssize_t s;\n"
6346 msgstr ""
6347
6348 #. type: Plain text
6349 #: build/C/man2/signalfd.2:403
6350 #, no-wrap
6351 msgid ""
6352 "    sigemptyset(&mask);\n"
6353 "    sigaddset(&mask, SIGINT);\n"
6354 "    sigaddset(&mask, SIGQUIT);\n"
6355 msgstr ""
6356
6357 #. type: Plain text
6358 #: build/C/man2/signalfd.2:406
6359 #, no-wrap
6360 msgid ""
6361 "    /* Block signals so that they aren\\(aqt handled\n"
6362 "       according to their default dispositions */\n"
6363 msgstr ""
6364
6365 #. type: Plain text
6366 #: build/C/man2/signalfd.2:409
6367 #, no-wrap
6368 msgid ""
6369 "    if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n"
6370 "        handle_error(\"sigprocmask\");\n"
6371 msgstr ""
6372
6373 #. type: Plain text
6374 #: build/C/man2/signalfd.2:413
6375 #, no-wrap
6376 msgid ""
6377 "    sfd = signalfd(-1, &mask, 0);\n"
6378 "    if (sfd == -1)\n"
6379 "        handle_error(\"signalfd\");\n"
6380 msgstr ""
6381
6382 #. type: Plain text
6383 #: build/C/man2/signalfd.2:418
6384 #, no-wrap
6385 msgid ""
6386 "    for (;;) {\n"
6387 "        s = read(sfd, &fdsi, sizeof(struct signalfd_siginfo));\n"
6388 "        if (s != sizeof(struct signalfd_siginfo))\n"
6389 "            handle_error(\"read\");\n"
6390 msgstr ""
6391
6392 #. type: Plain text
6393 #: build/C/man2/signalfd.2:429
6394 #, no-wrap
6395 msgid ""
6396 "        if (fdsi.ssi_signo == SIGINT) {\n"
6397 "            printf(\"Got SIGINT\\en\");\n"
6398 "        } else if (fdsi.ssi_signo == SIGQUIT) {\n"
6399 "            printf(\"Got SIGQUIT\\en\");\n"
6400 "            exit(EXIT_SUCCESS);\n"
6401 "        } else {\n"
6402 "            printf(\"Read unexpected signal\\en\");\n"
6403 "        }\n"
6404 "    }\n"
6405 "}\n"
6406 msgstr ""
6407
6408 #. type: Plain text
6409 #: build/C/man2/signalfd.2:442
6410 msgid ""
6411 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<sigaction>(2), "
6412 "B<sigprocmask>(2), B<sigwaitinfo>(2), B<timerfd_create>(2), B<sigsetops>(3), "
6413 "B<sigwait>(3), B<epoll>(7), B<signal>(7)"
6414 msgstr ""
6415
6416 #. type: TH
6417 #: build/C/man3/sigpause.3:23
6418 #, no-wrap
6419 msgid "SIGPAUSE"
6420 msgstr ""
6421
6422 #. type: TH
6423 #: build/C/man3/sigpause.3:23
6424 #, no-wrap
6425 msgid "2010-09-12"
6426 msgstr ""
6427
6428 #. type: Plain text
6429 #: build/C/man3/sigpause.3:26
6430 msgid "sigpause - atomically release blocked signals and wait for interrupt"
6431 msgstr ""
6432
6433 #. type: Plain text
6434 #: build/C/man3/sigpause.3:31
6435 #, no-wrap
6436 msgid "B<int sigpause(int >I<sigmask>B<);  /* BSD */>\n"
6437 msgstr ""
6438
6439 #. type: Plain text
6440 #: build/C/man3/sigpause.3:33
6441 #, no-wrap
6442 msgid "B<int sigpause(int >I<sig>B<);      /* System V / UNIX 95 */>\n"
6443 msgstr ""
6444
6445 #. type: Plain text
6446 #: build/C/man3/sigpause.3:39
6447 msgid "Don't use this function.  Use B<sigsuspend>(2)  instead."
6448 msgstr ""
6449
6450 #. type: Plain text
6451 #: build/C/man3/sigpause.3:46
6452 msgid ""
6453 "The function B<sigpause>()  is designed to wait for some signal.  It changes "
6454 "the process's signal mask (set of blocked signals), and then waits for a "
6455 "signal to arrive.  Upon arrival of a signal, the original signal mask is "
6456 "restored."
6457 msgstr ""
6458
6459 #. type: Plain text
6460 #: build/C/man3/sigpause.3:54
6461 msgid ""
6462 "If B<sigpause>()  returns, it was interrupted by a signal and the return "
6463 "value is -1 with I<errno> set to B<EINTR>."
6464 msgstr ""
6465
6466 #. type: Plain text
6467 #: build/C/man3/sigpause.3:58
6468 msgid "The System V version of B<sigpause>()  is standardized in POSIX.1-2001."
6469 msgstr ""
6470
6471 #.  __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG
6472 #. type: Plain text
6473 #: build/C/man3/sigpause.3:75
6474 msgid ""
6475 "The classical BSD version of this function appeared in 4.2BSD.  It sets the "
6476 "process's signal mask to I<sigmask>.  UNIX 95 standardized the incompatible "
6477 "System V version of this function, which removes only the specified signal "
6478 "I<sig> from the process's signal mask.  The unfortunate situation with two "
6479 "incompatible functions with the same name was solved by the "
6480 "B<\\%sigsuspend>(2)  function, that takes a I<sigset_t *> argument (instead "
6481 "of an I<int>)."
6482 msgstr ""
6483
6484 #. type: Plain text
6485 #: build/C/man3/sigpause.3:78
6486 msgid ""
6487 "On Linux, this routine is a system call only on the Sparc (sparc64)  "
6488 "architecture."
6489 msgstr ""
6490
6491 #. type: Plain text
6492 #: build/C/man3/sigpause.3:80
6493 msgid "Libc4 and libc5 only know about the BSD version."
6494 msgstr ""
6495
6496 #
6497 #.  For the BSD version, one usually uses a zero
6498 #.  .I sigmask
6499 #.  to indicate that no signals are to be blocked.
6500 #. type: Plain text
6501 #: build/C/man3/sigpause.3:96
6502 msgid ""
6503 "Glibc uses the BSD version if the B<_BSD_SOURCE> feature test macro is "
6504 "defined and none of B<_POSIX_SOURCE>, B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, "
6505 "B<_GNU_SOURCE>, or B<_SVID_SOURCE> is defined.  Otherwise, the System V "
6506 "version is used."
6507 msgstr ""
6508
6509 #. type: Plain text
6510 #: build/C/man3/sigpause.3:103
6511 msgid ""
6512 "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<sigsuspend>(2), "
6513 "B<sigblock>(3), B<sigvec>(3), B<feature_test_macros>(7)"
6514 msgstr ""
6515
6516 #. type: TH
6517 #: build/C/man2/sigpending.2:27
6518 #, no-wrap
6519 msgid "SIGPENDING"
6520 msgstr ""
6521
6522 #. type: TH
6523 #: build/C/man2/sigpending.2:27
6524 #, no-wrap
6525 msgid "2008-10-04"
6526 msgstr ""
6527
6528 #. type: Plain text
6529 #: build/C/man2/sigpending.2:30
6530 msgid "sigpending - examine pending signals"
6531 msgstr ""
6532
6533 #. type: Plain text
6534 #: build/C/man2/sigpending.2:34
6535 msgid "B<int sigpending(sigset_t *>I<set>B<);>"
6536 msgstr ""
6537
6538 #. type: Plain text
6539 #: build/C/man2/sigpending.2:43
6540 msgid ""
6541 "B<sigpending>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
6542 "_POSIX_SOURCE"
6543 msgstr ""
6544
6545 #. type: Plain text
6546 #: build/C/man2/sigpending.2:51
6547 msgid ""
6548 "B<sigpending>()  returns the set of signals that are pending for delivery to "
6549 "the calling thread (i.e., the signals which have been raised while "
6550 "blocked).  The mask of pending signals is returned in I<set>."
6551 msgstr ""
6552
6553 #. type: Plain text
6554 #: build/C/man2/sigpending.2:54
6555 msgid "B<sigpending>()  returns 0 on success and -1 on error."
6556 msgstr ""
6557
6558 #. type: Plain text
6559 #: build/C/man2/sigpending.2:59
6560 msgid ""
6561 "I<set> points to memory which is not a valid part of the process address "
6562 "space."
6563 msgstr ""
6564
6565 #. type: Plain text
6566 #: build/C/man2/sigpending.2:70
6567 msgid ""
6568 "The set of signals that is pending for a thread is the union of the set of "
6569 "signals that is pending for that thread and the set of signals that is "
6570 "pending for the process as a whole; see B<signal>(7)."
6571 msgstr ""
6572
6573 #. type: Plain text
6574 #: build/C/man2/sigpending.2:82
6575 msgid ""
6576 "In versions of glibc up to and including 2.2.1, there is a bug in the "
6577 "wrapper function for B<sigpending>()  which means that information about "
6578 "pending real-time signals is not correctly returned."
6579 msgstr ""
6580
6581 #. type: Plain text
6582 #: build/C/man2/sigpending.2:89
6583 msgid ""
6584 "B<kill>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
6585 "B<sigsuspend>(2), B<sigsetops>(3), B<signal>(7)"
6586 msgstr ""
6587
6588 #. type: TH
6589 #: build/C/man2/sigprocmask.2:27
6590 #, no-wrap
6591 msgid "SIGPROCMASK"
6592 msgstr ""
6593
6594 #. type: TH
6595 #: build/C/man2/sigprocmask.2:27
6596 #, no-wrap
6597 msgid "2012-04-15"
6598 msgstr ""
6599
6600 #. type: Plain text
6601 #: build/C/man2/sigprocmask.2:30
6602 msgid "sigprocmask - examine and change blocked signals"
6603 msgstr ""
6604
6605 #. type: Plain text
6606 #: build/C/man2/sigprocmask.2:35
6607 msgid ""
6608 "B<int sigprocmask(int >I<how>B<, const sigset_t *>I<set>B<,> B<sigset_t "
6609 "*>I<oldset>B<);>"
6610 msgstr ""
6611
6612 #. type: Plain text
6613 #: build/C/man2/sigprocmask.2:44
6614 msgid ""
6615 "B<sigprocmask>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
6616 "_POSIX_SOURCE"
6617 msgstr ""
6618
6619 #. type: Plain text
6620 #: build/C/man2/sigprocmask.2:53
6621 msgid ""
6622 "B<sigprocmask>()  is used to fetch and/or change the signal mask of the "
6623 "calling thread.  The signal mask is the set of signals whose delivery is "
6624 "currently blocked for the caller (see also B<signal>(7)  for more details)."
6625 msgstr ""
6626
6627 #. type: Plain text
6628 #: build/C/man2/sigprocmask.2:57
6629 msgid "The behavior of the call is dependent on the value of I<how>, as follows."
6630 msgstr ""
6631
6632 #. type: TP
6633 #: build/C/man2/sigprocmask.2:57
6634 #, no-wrap
6635 msgid "B<SIG_BLOCK>"
6636 msgstr ""
6637
6638 #. type: Plain text
6639 #: build/C/man2/sigprocmask.2:62
6640 msgid ""
6641 "The set of blocked signals is the union of the current set and the I<set> "
6642 "argument."
6643 msgstr ""
6644
6645 #. type: TP
6646 #: build/C/man2/sigprocmask.2:62
6647 #, no-wrap
6648 msgid "B<SIG_UNBLOCK>"
6649 msgstr ""
6650
6651 #. type: Plain text
6652 #: build/C/man2/sigprocmask.2:68
6653 msgid ""
6654 "The signals in I<set> are removed from the current set of blocked signals.  "
6655 "It is permissible to attempt to unblock a signal which is not blocked."
6656 msgstr ""
6657
6658 #. type: TP
6659 #: build/C/man2/sigprocmask.2:68
6660 #, no-wrap
6661 msgid "B<SIG_SETMASK>"
6662 msgstr ""
6663
6664 #. type: Plain text
6665 #: build/C/man2/sigprocmask.2:72
6666 msgid "The set of blocked signals is set to the argument I<set>."
6667 msgstr ""
6668
6669 #. type: Plain text
6670 #: build/C/man2/sigprocmask.2:77
6671 msgid ""
6672 "If I<oldset> is non-NULL, the previous value of the signal mask is stored in "
6673 "I<oldset>."
6674 msgstr ""
6675
6676 #. type: Plain text
6677 #: build/C/man2/sigprocmask.2:86
6678 msgid ""
6679 "If I<set> is NULL, then the signal mask is unchanged (i.e., I<how> is "
6680 "ignored), but the current value of the signal mask is nevertheless returned "
6681 "in I<oldset> (if it is not NULL)."
6682 msgstr ""
6683
6684 #. type: Plain text
6685 #: build/C/man2/sigprocmask.2:91
6686 msgid ""
6687 "The use of B<sigprocmask>()  is unspecified in a multithreaded process; see "
6688 "B<pthread_sigmask>(3)."
6689 msgstr ""
6690
6691 #. type: Plain text
6692 #: build/C/man2/sigprocmask.2:94
6693 msgid "B<sigprocmask>()  returns 0 on success and -1 on error."
6694 msgstr ""
6695
6696 #. type: Plain text
6697 #: build/C/man2/sigprocmask.2:102
6698 msgid ""
6699 "the I<set> or I<oldset> argument points outside the process's allocated "
6700 "address space."
6701 msgstr ""
6702
6703 #. type: Plain text
6704 #: build/C/man2/sigprocmask.2:107
6705 msgid "The value specified in I<how> was invalid."
6706 msgstr ""
6707
6708 #. type: Plain text
6709 #: build/C/man2/sigprocmask.2:113
6710 msgid ""
6711 "It is not possible to block B<SIGKILL> or B<SIGSTOP>.  Attempts to do so are "
6712 "silently ignored."
6713 msgstr ""
6714
6715 #. type: Plain text
6716 #: build/C/man2/sigprocmask.2:115
6717 msgid "Each of the threads in a process has its own signal mask."
6718 msgstr ""
6719
6720 #. type: Plain text
6721 #: build/C/man2/sigprocmask.2:135
6722 msgid ""
6723 "If B<SIGBUS>, B<SIGFPE>, B<SIGILL>, or B<SIGSEGV> are generated while they "
6724 "are blocked, the result is undefined, unless the signal was generated by "
6725 "B<kill>(2), B<sigqueue>(3), or B<raise>(3)."
6726 msgstr ""
6727
6728 #. type: Plain text
6729 #: build/C/man2/sigprocmask.2:149
6730 msgid ""
6731 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigpending>(2), "
6732 "B<sigsuspend>(2), B<pthread_sigmask>(3), B<sigqueue>(3), B<sigsetops>(3), "
6733 "B<signal>(7)"
6734 msgstr ""
6735
6736 #. type: TH
6737 #: build/C/man3/sigqueue.3:26
6738 #, no-wrap
6739 msgid "SIGQUEUE"
6740 msgstr ""
6741
6742 #. type: TH
6743 #: build/C/man3/sigqueue.3:26
6744 #, no-wrap
6745 msgid "2012-03-25"
6746 msgstr ""
6747
6748 #. type: Plain text
6749 #: build/C/man3/sigqueue.3:29
6750 msgid "sigqueue - queue a signal and data to a process"
6751 msgstr ""
6752
6753 #. type: Plain text
6754 #: build/C/man3/sigqueue.3:33
6755 msgid ""
6756 "B<int sigqueue(pid_t >I<pid>B<, int >I<sig>B<, const union sigval "
6757 ">I<value>B<);>"
6758 msgstr ""
6759
6760 #. type: Plain text
6761 #: build/C/man3/sigqueue.3:41
6762 msgid "B<sigqueue>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
6763 msgstr ""
6764
6765 #. type: Plain text
6766 #: build/C/man3/sigqueue.3:53
6767 msgid ""
6768 "B<sigqueue>()  sends the signal specified in I<sig> to the process whose PID "
6769 "is given in I<pid>.  The permissions required to send a signal are the same "
6770 "as for B<kill>(2).  As with B<kill>(2), the null signal (0) can be used to "
6771 "check if a process with a given PID exists."
6772 msgstr ""
6773
6774 #. type: Plain text
6775 #: build/C/man3/sigqueue.3:58
6776 msgid ""
6777 "The I<value> argument is used to specify an accompanying item of data "
6778 "(either an integer or a pointer value) to be sent with the signal, and has "
6779 "the following type:"
6780 msgstr ""
6781
6782 #. type: Plain text
6783 #: build/C/man3/sigqueue.3:65
6784 #, no-wrap
6785 msgid ""
6786 "union sigval {\n"
6787 "    int   sival_int;\n"
6788 "    void *sival_ptr;\n"
6789 "};\n"
6790 msgstr ""
6791
6792 #. type: Plain text
6793 #: build/C/man3/sigqueue.3:81
6794 msgid ""
6795 "If the receiving process has installed a handler for this signal using the "
6796 "B<SA_SIGINFO> flag to B<sigaction>(2), then it can obtain this data via the "
6797 "I<si_value> field of the I<siginfo_t> structure passed as the second "
6798 "argument to the handler.  Furthermore, the I<si_code> field of that "
6799 "structure will be set to B<SI_QUEUE>."
6800 msgstr ""
6801
6802 #. type: Plain text
6803 #: build/C/man3/sigqueue.3:89
6804 msgid ""
6805 "On success, B<sigqueue>()  returns 0, indicating that the signal was "
6806 "successfully queued to the receiving process.  Otherwise -1 is returned and "
6807 "I<errno> is set to indicate the error."
6808 msgstr ""
6809
6810 #. type: Plain text
6811 #: build/C/man3/sigqueue.3:100
6812 msgid "I<sig> was invalid."
6813 msgstr ""
6814
6815 #. type: Plain text
6816 #: build/C/man3/sigqueue.3:106
6817 msgid ""
6818 "The process does not have permission to send the signal to the receiving "
6819 "process.  For the required permissions, see B<kill>(2)."
6820 msgstr ""
6821
6822 #. type: Plain text
6823 #: build/C/man3/sigqueue.3:110
6824 msgid "No process has a PID matching I<pid>."
6825 msgstr ""
6826
6827 #. type: Plain text
6828 #: build/C/man3/sigqueue.3:112
6829 msgid "This system call first appeared in Linux 2.2."
6830 msgstr ""
6831
6832 #. type: Plain text
6833 #: build/C/man3/sigqueue.3:122
6834 msgid ""
6835 "If this function results in the sending of a signal to the process that "
6836 "invoked it, and that signal was not blocked by the calling thread, and no "
6837 "other threads were willing to handle this signal (either by having it "
6838 "unblocked, or by waiting for it using B<sigwait>(3)), then at least some "
6839 "signal must be delivered to this thread before this function returns."
6840 msgstr ""
6841
6842 #. type: Plain text
6843 #: build/C/man3/sigqueue.3:137
6844 msgid ""
6845 "On Linux, this function is implemented using the B<rt_sigqueueinfo>(2)  "
6846 "system call.  The system call differs in its third argument, which is the "
6847 "I<siginfo_t> structure that will be supplied to the receiving process's "
6848 "signal handler or returned by the receiving process's B<sigtimedwait>(2)  "
6849 "call.  Inside the glibc B<sigqueue>()  wrapper, this argument, I<uinfo>, is "
6850 "initialized as follows:"
6851 msgstr ""
6852
6853 #. type: Plain text
6854 #: build/C/man3/sigqueue.3:145
6855 #, no-wrap
6856 msgid ""
6857 "uinfo.si_signo = sig;      /* argument supplied to sigqueue() */\n"
6858 "uinfo.si_code = SI_QUEUE;\n"
6859 "uinfo.si_pid = getpid();   /* Process ID of sender */\n"
6860 "uinfo.si_uid = getuid();   /* Real UID of sender */\n"
6861 "uinfo.si_value = val;      /* argument supplied to sigqueue() */\n"
6862 msgstr ""
6863
6864 #. type: Plain text
6865 #: build/C/man3/sigqueue.3:154
6866 msgid ""
6867 "B<kill>(2), B<rt_sigqueueinfo>(2), B<sigaction>(2), B<signal>(2), "
6868 "B<pthread_sigqueue>(3), B<sigwait>(3), B<signal>(7)"
6869 msgstr ""
6870
6871 #. type: TH
6872 #: build/C/man2/sigreturn.2:27
6873 #, no-wrap
6874 msgid "SIGRETURN"
6875 msgstr ""
6876
6877 #. type: TH
6878 #: build/C/man2/sigreturn.2:27
6879 #, no-wrap
6880 msgid "2008-06-26"
6881 msgstr ""
6882
6883 #. type: Plain text
6884 #: build/C/man2/sigreturn.2:30
6885 msgid "sigreturn - return from signal handler and cleanup stack frame"
6886 msgstr ""
6887
6888 #. type: Plain text
6889 #: build/C/man2/sigreturn.2:32
6890 msgid "B<int sigreturn(unsigned long >I<__unused>B<);>"
6891 msgstr ""
6892
6893 #. type: Plain text
6894 #: build/C/man2/sigreturn.2:40
6895 msgid ""
6896 "When the Linux kernel creates the stack frame for a signal handler, a call "
6897 "to B<sigreturn>()  is inserted into the stack frame so that upon return from "
6898 "the signal handler, B<sigreturn>()  will be called."
6899 msgstr ""
6900
6901 #. type: Plain text
6902 #: build/C/man2/sigreturn.2:51
6903 msgid ""
6904 "This B<sigreturn>()  call undoes everything that was done\\(emchanging the "
6905 "process's signal mask, switching stacks (see B<sigaltstack>(2))\\(emin order "
6906 "to invoke the signal handler: it restores the process's signal mask, "
6907 "switches stacks, and restores the process's context (registers, processor "
6908 "flags), so that the process directly resumes execution at the point where it "
6909 "was interrupted by the signal."
6910 msgstr ""
6911
6912 #. type: Plain text
6913 #: build/C/man2/sigreturn.2:54
6914 msgid "B<sigreturn>()  never returns."
6915 msgstr ""
6916
6917 #. type: SH
6918 #: build/C/man2/sigreturn.2:54
6919 #, no-wrap
6920 msgid "FILES"
6921 msgstr ""
6922
6923 #. type: Plain text
6924 #: build/C/man2/sigreturn.2:56
6925 msgid "/usr/src/linux/arch/i386/kernel/signal.c"
6926 msgstr ""
6927
6928 #. type: Plain text
6929 #: build/C/man2/sigreturn.2:58
6930 msgid "/usr/src/linux/arch/alpha/kernel/entry.S"
6931 msgstr ""
6932
6933 #. type: Plain text
6934 #: build/C/man2/sigreturn.2:62
6935 msgid ""
6936 "B<sigreturn>()  is specific to Linux and should not be used in programs "
6937 "intended to be portable."
6938 msgstr ""
6939
6940 #. type: Plain text
6941 #: build/C/man2/sigreturn.2:72
6942 msgid ""
6943 "The B<sigreturn>()  call is used by the kernel to implement signal "
6944 "handlers.  It should B<never> be called directly.  Better yet, the specific "
6945 "use of the I<__unused> argument varies depending on the architecture."
6946 msgstr ""
6947
6948 #. type: Plain text
6949 #: build/C/man2/sigreturn.2:76
6950 msgid "B<kill>(2), B<sigaltstack>(2), B<signal>(2), B<signal>(7)"
6951 msgstr ""
6952
6953 #. type: TH
6954 #: build/C/man3/sigset.3:24
6955 #, no-wrap
6956 msgid "SIGSET"
6957 msgstr ""
6958
6959 #. type: Plain text
6960 #: build/C/man3/sigset.3:27
6961 msgid "sigset, sighold, sigrelse, sigignore - System V signal API"
6962 msgstr ""
6963
6964 #. type: Plain text
6965 #: build/C/man3/sigset.3:33
6966 msgid "B<sighandler_t sigset(int >I<sig>B<, sighandler_t >I<disp>B<);>"
6967 msgstr ""
6968
6969 #. type: Plain text
6970 #: build/C/man3/sigset.3:35
6971 msgid "B<int sighold(int >I<sig>B<);>"
6972 msgstr ""
6973
6974 #. type: Plain text
6975 #: build/C/man3/sigset.3:37
6976 msgid "B<int sigrelse(int >I<sig>B<);>"
6977 msgstr ""
6978
6979 #. type: Plain text
6980 #: build/C/man3/sigset.3:39
6981 msgid "B<int sigignore(int >I<sig>B<);>"
6982 msgstr ""
6983
6984 #. type: Plain text
6985 #: build/C/man3/sigset.3:50
6986 msgid "B<sigset>(), B<sighold>(), B<sigrelse>(), B<sigignore>():"
6987 msgstr ""
6988
6989 #. type: Plain text
6990 #: build/C/man3/sigset.3:54
6991 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
6992 msgstr ""
6993
6994 #. type: Plain text
6995 #: build/C/man3/sigset.3:63
6996 msgid ""
6997 "These functions are provided in glibc as a compatibility interface for "
6998 "programs that make use of the historical System V signal API.  This API is "
6999 "obsolete: new applications should use the POSIX signal API (B<sigaction>(2), "
7000 "B<sigprocmask>(2), etc.)"
7001 msgstr ""
7002
7003 #. type: Plain text
7004 #: build/C/man3/sigset.3:72
7005 msgid ""
7006 "The B<sigset>()  function modifies the disposition of the signal I<sig>.  "
7007 "The I<disp> argument can be the address of a signal handler function, or one "
7008 "of the following constants:"
7009 msgstr ""
7010
7011 #. type: TP
7012 #: build/C/man3/sigset.3:72
7013 #, no-wrap
7014 msgid "B<SIG_DFL>"
7015 msgstr ""
7016
7017 #. type: Plain text
7018 #: build/C/man3/sigset.3:77
7019 msgid "Reset the disposition of I<sig> to the default."
7020 msgstr ""
7021
7022 #. type: TP
7023 #: build/C/man3/sigset.3:77
7024 #, no-wrap
7025 msgid "B<SIG_IGN>"
7026 msgstr ""
7027
7028 #. type: Plain text
7029 #: build/C/man3/sigset.3:81
7030 msgid "Ignore I<sig>."
7031 msgstr ""
7032
7033 #. type: TP
7034 #: build/C/man3/sigset.3:81
7035 #, no-wrap
7036 msgid "B<SIG_HOLD>"
7037 msgstr ""
7038
7039 #. type: Plain text
7040 #: build/C/man3/sigset.3:88
7041 msgid ""
7042 "Add I<sig> to the process's signal mask, but leave the disposition of I<sig> "
7043 "unchanged."
7044 msgstr ""
7045
7046 #. type: Plain text
7047 #: build/C/man3/sigset.3:94
7048 msgid ""
7049 "If I<disp> specifies the address of a signal handler, then I<sig> is added "
7050 "to the process's signal mask during execution of the handler."
7051 msgstr ""
7052
7053 #. type: Plain text
7054 #: build/C/man3/sigset.3:102
7055 msgid ""
7056 "If I<disp> was specified as a value other than B<SIG_HOLD>, then I<sig> is "
7057 "removed from the process's signal mask."
7058 msgstr ""
7059
7060 #. type: Plain text
7061 #: build/C/man3/sigset.3:108 build/C/man3/sigvec.3:85
7062 msgid "The dispositions for B<SIGKILL> and B<SIGSTOP> cannot be changed."
7063 msgstr ""
7064
7065 #. type: Plain text
7066 #: build/C/man3/sigset.3:114
7067 msgid "The B<sighold>()  function adds I<sig> to the calling process's signal mask."
7068 msgstr ""
7069
7070 #. type: Plain text
7071 #: build/C/man3/sigset.3:120
7072 msgid ""
7073 "The B<sigrelse>()  function removes I<sig> from the calling process's signal "
7074 "mask."
7075 msgstr ""
7076
7077 #. type: Plain text
7078 #: build/C/man3/sigset.3:127
7079 msgid "The B<sigignore>()  function sets the disposition of I<sig> to B<SIG_IGN>."
7080 msgstr ""
7081
7082 #. type: Plain text
7083 #: build/C/man3/sigset.3:143
7084 msgid ""
7085 "On success, B<sigset>()  returns B<SIG_HOLD> if I<sig> was blocked before "
7086 "the call, or the signal's previous disposition if it was not blocked before "
7087 "the call.  On error, B<sigset>()  returns -1, with I<errno> set to indicate "
7088 "the error.  (But see BUGS below.)"
7089 msgstr ""
7090
7091 #. type: Plain text
7092 #: build/C/man3/sigset.3:152
7093 msgid ""
7094 "The B<sighold>(), B<sigrelse>(), and B<sigignore>()  functions return 0 on "
7095 "success; on error, these functions return -1 and set I<errno> to indicate "
7096 "the error."
7097 msgstr ""
7098
7099 #. type: Plain text
7100 #: build/C/man3/sigset.3:159
7101 msgid ""
7102 "For B<sigset>()  see the ERRORS under B<sigaction>(2)  and "
7103 "B<sigprocmask>(2)."
7104 msgstr ""
7105
7106 #. type: Plain text
7107 #: build/C/man3/sigset.3:166
7108 msgid "For B<sighold>()  and B<sigrelse>()  see the ERRORS under B<sigprocmask>(2)."
7109 msgstr ""
7110
7111 #. type: Plain text
7112 #: build/C/man3/sigset.3:171
7113 msgid "For B<sigignore>(), see the errors under B<sigaction>(2)."
7114 msgstr ""
7115
7116 #. type: Plain text
7117 #: build/C/man3/sigset.3:188
7118 msgid ""
7119 "SVr4, POSIX.1-2001.  These functions are obsolete: do not use them in new "
7120 "programs.  POSIX.1-2008 marks B<sighold>(), B<sigignore>(), B<sigpause>(), "
7121 "B<sigrelse>(), and B<sigset>()  as obsolete, recommending the use of "
7122 "B<sigaction>(2), B<sigprocmask>(2), B<pthread_sigmask>(3), and "
7123 "B<sigsuspend>(2)  instead."
7124 msgstr ""
7125
7126 #. type: Plain text
7127 #: build/C/man3/sigset.3:190
7128 msgid "These functions appeared in glibc version 2.1."
7129 msgstr ""
7130
7131 #. type: Plain text
7132 #: build/C/man3/sigset.3:196
7133 msgid ""
7134 "The I<sighandler_t> type is a GNU extension; it is only used on this page to "
7135 "make the B<sigset>()  prototype more easily readable."
7136 msgstr ""
7137
7138 #. type: Plain text
7139 #: build/C/man3/sigset.3:204
7140 msgid ""
7141 "The B<sigset>()  function provides reliable signal handling semantics (as "
7142 "when calling B<sigaction>(2)  with I<sa_mask> equal to 0)."
7143 msgstr ""
7144
7145 #. type: Plain text
7146 #: build/C/man3/sigset.3:222
7147 msgid ""
7148 "On System V, the B<signal>()  function provides unreliable semantics (as "
7149 "when calling B<sigaction>(2)  with I<sa_mask> equal to I<SA_RESETHAND | "
7150 "SA_NODEFER>).  On BSD, B<signal>()  provides reliable semantics.  "
7151 "POSIX.1-2001 leaves these aspects of B<signal>()  unspecified.  See "
7152 "B<signal>(2)  for further details."
7153 msgstr ""
7154
7155 #. type: Plain text
7156 #: build/C/man3/sigset.3:230 build/C/man3/sigvec.3:250
7157 msgid ""
7158 "In order to wait for a signal, BSD and System V both provided a function "
7159 "named B<sigpause>(3), but this function has a different argument on the two "
7160 "systems.  See B<sigpause>(3)  for details."
7161 msgstr ""
7162
7163 #. type: Plain text
7164 #: build/C/man3/sigset.3:239
7165 msgid ""
7166 "In versions of glibc before 2.2, B<sigset>()  did not unblock I<sig> if "
7167 "I<disp> was specified as a value other than B<SIG_HOLD>."
7168 msgstr ""
7169
7170 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1951
7171 #. type: Plain text
7172 #: build/C/man3/sigset.3:264
7173 msgid ""
7174 "In versions of glibc before 2.5, B<sigset>()  does not correctly return the "
7175 "previous disposition of the signal in two cases.  First, if I<disp> is "
7176 "specified as B<SIG_HOLD>, then a successful B<sigset>()  always returns "
7177 "B<SIG_HOLD>.  Instead, it should return the previous disposition of the "
7178 "signal (unless the signal was blocked, in which case B<SIG_HOLD> should be "
7179 "returned).  Second, if the signal is currently blocked, then the return "
7180 "value of a successful B<sigset>()  should be B<SIG_HOLD>.  Instead, the "
7181 "previous disposition of the signal is returned.  These problems have been "
7182 "fixed since glibc 2.5."
7183 msgstr ""
7184
7185 #. type: Plain text
7186 #: build/C/man3/sigset.3:273
7187 msgid ""
7188 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
7189 "B<raise>(3), B<sigpause>(3), B<sigvec>(3), B<signal>(7)"
7190 msgstr ""
7191
7192 #. type: TH
7193 #: build/C/man3/sigsetops.3:29
7194 #, no-wrap
7195 msgid "SIGSETOPS"
7196 msgstr ""
7197
7198 #. type: TH
7199 #: build/C/man3/sigsetops.3:29
7200 #, no-wrap
7201 msgid "2008-09-01"
7202 msgstr ""
7203
7204 #. type: Plain text
7205 #: build/C/man3/sigsetops.3:33
7206 msgid ""
7207 "sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - POSIX signal "
7208 "set operations."
7209 msgstr ""
7210
7211 #. type: Plain text
7212 #: build/C/man3/sigsetops.3:37
7213 msgid "B<int sigemptyset(sigset_t *>I<set>B<);>"
7214 msgstr ""
7215
7216 #. type: Plain text
7217 #: build/C/man3/sigsetops.3:39
7218 msgid "B<int sigfillset(sigset_t *>I<set>B<);>"
7219 msgstr ""
7220
7221 #. type: Plain text
7222 #: build/C/man3/sigsetops.3:41
7223 msgid "B<int sigaddset(sigset_t *>I<set>B<, int >I<signum>B<);>"
7224 msgstr ""
7225
7226 #. type: Plain text
7227 #: build/C/man3/sigsetops.3:43
7228 msgid "B<int sigdelset(sigset_t *>I<set>B<, int >I<signum>B<);>"
7229 msgstr ""
7230
7231 #. type: Plain text
7232 #: build/C/man3/sigsetops.3:45
7233 msgid "B<int sigismember(const sigset_t *>I<set>B<, int >I<signum>B<);>"
7234 msgstr ""
7235
7236 #. type: Plain text
7237 #: build/C/man3/sigsetops.3:57
7238 msgid ""
7239 "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>(), "
7240 "B<sigismember>():"
7241 msgstr ""
7242
7243 #. type: Plain text
7244 #: build/C/man3/sigsetops.3:59
7245 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
7246 msgstr ""
7247
7248 #. type: Plain text
7249 #: build/C/man3/sigsetops.3:63
7250 msgid "These functions allow the manipulation of POSIX signal sets."
7251 msgstr ""
7252
7253 #. type: Plain text
7254 #: build/C/man3/sigsetops.3:68
7255 msgid ""
7256 "B<sigemptyset>()  initializes the signal set given by I<set> to empty, with "
7257 "all signals excluded from the set."
7258 msgstr ""
7259
7260 #. type: Plain text
7261 #: build/C/man3/sigsetops.3:73
7262 msgid "B<sigfillset>()  initializes I<set> to full, including all signals."
7263 msgstr ""
7264
7265 #. type: Plain text
7266 #: build/C/man3/sigsetops.3:81
7267 msgid ""
7268 "B<sigaddset>()  and B<sigdelset>()  add and delete respectively signal "
7269 "I<signum> from I<set>."
7270 msgstr ""
7271
7272 #. type: Plain text
7273 #: build/C/man3/sigsetops.3:87
7274 msgid "B<sigismember>()  tests whether I<signum> is a member of I<set>."
7275 msgstr ""
7276
7277 #. type: Plain text
7278 #: build/C/man3/sigsetops.3:105
7279 msgid ""
7280 "Objects of type I<sigset_t> must be initialized by a call to either "
7281 "B<sigemptyset>()  or B<sigfillset>()  before being passed to the functions "
7282 "B<sigaddset>(), B<sigdelset>()  and B<sigismember>()  or the additional "
7283 "glibc functions described below (B<sigisemptyset>(), B<sigandset>(), and "
7284 "B<sigorset>()).  The results are undefined if this is not done."
7285 msgstr ""
7286
7287 #. type: Plain text
7288 #: build/C/man3/sigsetops.3:112
7289 msgid ""
7290 "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), and B<sigdelset>()  "
7291 "return 0 on success and -1 on error."
7292 msgstr ""
7293
7294 #. type: Plain text
7295 #: build/C/man3/sigsetops.3:121
7296 msgid ""
7297 "B<sigismember>()  returns 1 if I<signum> is a member of I<set>, 0 if "
7298 "I<signum> is not a member, and -1 on error."
7299 msgstr ""
7300
7301 #. type: Plain text
7302 #: build/C/man3/sigsetops.3:126
7303 msgid "I<sig> is not a valid signal."
7304 msgstr ""
7305
7306 #. type: SS
7307 #: build/C/man3/sigsetops.3:129
7308 #, no-wrap
7309 msgid "Glibc Notes"
7310 msgstr ""
7311
7312 #. type: Plain text
7313 #: build/C/man3/sigsetops.3:135
7314 msgid ""
7315 "If the B<_GNU_SOURCE> feature test macro is defined, then "
7316 "I<E<lt>signal.hE<gt>> exposes three other functions for manipulating signal "
7317 "sets."
7318 msgstr ""
7319
7320 #. type: TP
7321 #: build/C/man3/sigsetops.3:135
7322 #, no-wrap
7323 msgid "B<int sigisemptyset(sigset_t *>I<set>B<);>"
7324 msgstr ""
7325
7326 #. type: Plain text
7327 #: build/C/man3/sigsetops.3:140
7328 msgid "returns 1 if I<set> contains no signals, and 0 otherwise."
7329 msgstr ""
7330
7331 #. type: TP
7332 #: build/C/man3/sigsetops.3:140
7333 #, no-wrap
7334 msgid ""
7335 "B<int sigorset(sigset_t *>I<dest>B<, sigset_t *>I<left>B<, sigset_t "
7336 "*>I<right>B<);>"
7337 msgstr ""
7338
7339 #. type: Plain text
7340 #: build/C/man3/sigsetops.3:149
7341 msgid "places the union of the sets I<left> and I<right> in I<dest>."
7342 msgstr ""
7343
7344 #. type: TP
7345 #: build/C/man3/sigsetops.3:149
7346 #, no-wrap
7347 msgid ""
7348 "B<int sigandset(sigset_t *>I<dest>B<, sigset_t *>I<left>B<, sigset_t "
7349 "*>I<right>B<);>"
7350 msgstr ""
7351
7352 #. type: Plain text
7353 #: build/C/man3/sigsetops.3:158
7354 msgid "places the intersection of the sets I<left> and I<right> in I<dest>."
7355 msgstr ""
7356
7357 #. type: Plain text
7358 #: build/C/man3/sigsetops.3:163
7359 msgid "B<sigorset>()  and B<sigandset>()  return 0 on success, and -1 on failure."
7360 msgstr ""
7361
7362 #. type: Plain text
7363 #: build/C/man3/sigsetops.3:166
7364 msgid ""
7365 "These functions are nonstandard (a few other systems provide similar "
7366 "functions) and their use should be avoided in portable applications."
7367 msgstr ""
7368
7369 #. type: Plain text
7370 #: build/C/man3/sigsetops.3:170
7371 msgid "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2)"
7372 msgstr ""
7373
7374 #. type: TH
7375 #: build/C/man2/sigsuspend.2:27
7376 #, no-wrap
7377 msgid "SIGSUSPEND"
7378 msgstr ""
7379
7380 #. type: TH
7381 #: build/C/man2/sigsuspend.2:27
7382 #, no-wrap
7383 msgid "2008-08-29"
7384 msgstr ""
7385
7386 #. type: Plain text
7387 #: build/C/man2/sigsuspend.2:30
7388 msgid "sigsuspend - wait for a signal"
7389 msgstr ""
7390
7391 #. type: Plain text
7392 #: build/C/man2/sigsuspend.2:34
7393 msgid "B<int sigsuspend(const sigset_t *>I<mask>B<);>"
7394 msgstr ""
7395
7396 #. type: Plain text
7397 #: build/C/man2/sigsuspend.2:43
7398 msgid ""
7399 "B<sigsuspend>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
7400 "_POSIX_SOURCE"
7401 msgstr ""
7402
7403 #. type: Plain text
7404 #: build/C/man2/sigsuspend.2:51
7405 msgid ""
7406 "B<sigsuspend>()  temporarily replaces the signal mask of the calling process "
7407 "with the mask given by I<mask> and then suspends the process until delivery "
7408 "of a signal whose action is to invoke a signal handler or to terminate a "
7409 "process."
7410 msgstr ""
7411
7412 #. type: Plain text
7413 #: build/C/man2/sigsuspend.2:60
7414 msgid ""
7415 "If the signal terminates the process, then B<sigsuspend>()  does not "
7416 "return.  If the signal is caught, then B<sigsuspend>()  returns after the "
7417 "signal handler returns, and the signal mask is restored to the state before "
7418 "the call to B<sigsuspend>()."
7419 msgstr ""
7420
7421 #. type: Plain text
7422 #: build/C/man2/sigsuspend.2:68
7423 msgid ""
7424 "It is not possible to block B<SIGKILL> or B<SIGSTOP>; specifying these "
7425 "signals in I<mask>, has no effect on the process's signal mask."
7426 msgstr ""
7427
7428 #. type: Plain text
7429 #: build/C/man2/sigsuspend.2:72
7430 msgid "B<sigsuspend>()  always returns -1, normally with the error B<EINTR>."
7431 msgstr ""
7432
7433 #. type: Plain text
7434 #: build/C/man2/sigsuspend.2:77
7435 msgid ""
7436 "I<mask> points to memory which is not a valid part of the process address "
7437 "space."
7438 msgstr ""
7439
7440 #. type: Plain text
7441 #: build/C/man2/sigsuspend.2:80
7442 msgid "The call was interrupted by a signal."
7443 msgstr ""
7444
7445 #. type: Plain text
7446 #: build/C/man2/sigsuspend.2:100
7447 msgid ""
7448 "Normally, B<sigsuspend>()  is used in conjunction with B<sigprocmask>(2)  in "
7449 "order to prevent delivery of a signal during the execution of a critical "
7450 "code section.  The caller first blocks the signals with B<sigprocmask>(2).  "
7451 "When the critical code has completed, the caller then waits for the signals "
7452 "by calling B<sigsuspend>()  with the signal mask that was returned by "
7453 "B<sigprocmask>(2)  (in the I<oldset> argument)."
7454 msgstr ""
7455
7456 #. type: Plain text
7457 #: build/C/man2/sigsuspend.2:113
7458 msgid ""
7459 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
7460 "B<sigwaitinfo>(2), B<sigsetops>(3), B<sigwait>(3), B<signal>(7)"
7461 msgstr ""
7462
7463 #. type: TH
7464 #: build/C/man3/sigvec.3:24
7465 #, no-wrap
7466 msgid "SIGVEC"
7467 msgstr ""
7468
7469 #. type: Plain text
7470 #: build/C/man3/sigvec.3:27
7471 msgid "sigvec, sigblock, sigsetmask, siggetmask, sigmask - BSD signal API"
7472 msgstr ""
7473
7474 #. type: Plain text
7475 #: build/C/man3/sigvec.3:31
7476 msgid ""
7477 "B<int sigvec(int >I<sig>B<, struct sigvec *>I<vec>B<, struct sigvec "
7478 "*>I<ovec>B<);>"
7479 msgstr ""
7480
7481 #. type: Plain text
7482 #: build/C/man3/sigvec.3:33
7483 msgid "B<int sigmask(int >I<signum>B<);>"
7484 msgstr ""
7485
7486 #. type: Plain text
7487 #: build/C/man3/sigvec.3:35
7488 msgid "B<int sigblock(int >I<mask>B<);>"
7489 msgstr ""
7490
7491 #. type: Plain text
7492 #: build/C/man3/sigvec.3:37
7493 msgid "B<int sigsetmask(int >I<mask>B<);>"
7494 msgstr ""
7495
7496 #. type: Plain text
7497 #: build/C/man3/sigvec.3:39
7498 msgid "B<int siggetmask(void);>"
7499 msgstr ""
7500
7501 #. type: Plain text
7502 #: build/C/man3/sigvec.3:47
7503 msgid "All functions shown above: _BSD_SOURCE"
7504 msgstr ""
7505
7506 #. type: Plain text
7507 #: build/C/man3/sigvec.3:54
7508 msgid ""
7509 "These functions are provided in glibc as a compatibility interface for "
7510 "programs that make use of the historical BSD signal API.  This API is "
7511 "obsolete: new applications should use the POSIX signal API (B<sigaction>(2), "
7512 "B<sigprocmask>(2), etc.)"
7513 msgstr ""
7514
7515 #. type: Plain text
7516 #: build/C/man3/sigvec.3:79
7517 msgid ""
7518 "The B<sigvec>()  function sets and/or gets the disposition of the signal "
7519 "I<sig> (like the POSIX B<sigaction>(2)).  If I<vec> is not NULL, it points "
7520 "to a I<sigvec> structure that defines the new disposition for I<sig>.  If "
7521 "I<ovec> is not NULL, it points to a I<sigvec> structure that is used to "
7522 "return the previous disposition of I<sig>.  To obtain the current "
7523 "disposition of I<sig> without changing it, specify NULL for I<vec>, and a "
7524 "non-NULL pointer for I<ovec>."
7525 msgstr ""
7526
7527 #. type: Plain text
7528 #: build/C/man3/sigvec.3:89
7529 msgid "The I<sigvec> structure has the following form:"
7530 msgstr ""
7531
7532 #. type: Plain text
7533 #: build/C/man3/sigvec.3:97
7534 #, no-wrap
7535 msgid ""
7536 "struct sigvec {\n"
7537 "    void (*sv_handler)();  /* Signal disposition */\n"
7538 "    int    sv_mask;        /* Signals to be blocked in handler */\n"
7539 "    int    sv_flags;       /* Flags */\n"
7540 "};\n"
7541 msgstr ""
7542
7543 #. type: Plain text
7544 #: build/C/man3/sigvec.3:108
7545 msgid ""
7546 "The I<sv_handler> field specifies the disposition of the signal, and is "
7547 "either: the address of a signal handler function; or B<SIG_DFL> meaning the "
7548 "default disposition applies for the signal; or B<SIG_IGN> meaning that the "
7549 "signal is ignored."
7550 msgstr ""
7551
7552 #. type: Plain text
7553 #: build/C/man3/sigvec.3:122
7554 msgid ""
7555 "If I<sv_handler> specifies the address of a signal handler, then I<sv_mask> "
7556 "specifies a mask of signals that are to be blocked while the handler is "
7557 "executing.  In addition, the signal for which the handler is invoked is also "
7558 "blocked by default.  Attempts to block B<SIGKILL> or B<SIGSTOP> are silently "
7559 "ignored."
7560 msgstr ""
7561
7562 #. type: Plain text
7563 #: build/C/man3/sigvec.3:129
7564 msgid ""
7565 "If I<sv_handler> specifies the address of a signal handler, then the "
7566 "I<sv_flags> field specifies flags controlling what happens when the handler "
7567 "is called.  This field may contain zero or more of the following flags:"
7568 msgstr ""
7569
7570 #. type: TP
7571 #: build/C/man3/sigvec.3:129
7572 #, no-wrap
7573 msgid "B<SV_INTERRUPT>"
7574 msgstr ""
7575
7576 #. type: Plain text
7577 #: build/C/man3/sigvec.3:137
7578 msgid ""
7579 "If the signal handler interrupts a blocking system call, then upon return "
7580 "from the handler the system call will not be restarted: instead it will fail "
7581 "with the error B<EINTR>.  If this flag is not specified, then system calls "
7582 "are restarted by default."
7583 msgstr ""
7584
7585 #. type: TP
7586 #: build/C/man3/sigvec.3:137
7587 #, no-wrap
7588 msgid "B<SV_RESETHAND>"
7589 msgstr ""
7590
7591 #. type: Plain text
7592 #: build/C/man3/sigvec.3:146
7593 msgid ""
7594 "Reset the disposition of the signal to the default before calling the signal "
7595 "handler.  If this flag is not specified, then the handler remains "
7596 "established until explicitly removed by a later call to B<sigvec>()  or "
7597 "until the process performs an B<execve>(2)."
7598 msgstr ""
7599
7600 #. type: TP
7601 #: build/C/man3/sigvec.3:146
7602 #, no-wrap
7603 msgid "B<SV_ONSTACK>"
7604 msgstr ""
7605
7606 #. type: Plain text
7607 #: build/C/man3/sigvec.3:153
7608 msgid ""
7609 "Handle the signal on the alternate signal stack (historically established "
7610 "under BSD using the obsolete B<sigstack>()  function; the POSIX replacement "
7611 "is B<sigaltstack>(2))."
7612 msgstr ""
7613
7614 #. type: Plain text
7615 #: build/C/man3/sigvec.3:163
7616 msgid ""
7617 "The B<sigmask>()  function constructs and returns a \"signal mask\" for "
7618 "I<signum>.  For example, we can initialize the I<vec.sv_mask> field given to "
7619 "B<sigvec>()  using code such as the following:"
7620 msgstr ""
7621
7622 #. type: Plain text
7623 #: build/C/man3/sigvec.3:168
7624 #, no-wrap
7625 msgid ""
7626 "    vec.sv_mask = sigmask(SIGQUIT) | sigpause(SIGABRT);\n"
7627 "                /* Block SIGQUIT and SIGABRT during\n"
7628 "                   handler execution */\n"
7629 msgstr ""
7630
7631 #. type: Plain text
7632 #: build/C/man3/sigvec.3:183
7633 msgid ""
7634 "The B<sigblock>()  function adds the signals in I<mask> to the process's "
7635 "signal mask (like POSIX I<sigprocmask(SIG_BLOCK)>), and returns the "
7636 "process's previous signal mask.  Attempts to block B<SIGKILL> or B<SIGSTOP> "
7637 "are silently ignored."
7638 msgstr ""
7639
7640 #. type: Plain text
7641 #: build/C/man3/sigvec.3:191
7642 msgid ""
7643 "The B<sigsetmask>()  function sets the process's signal mask to the value "
7644 "given in I<mask> (like POSIX I<sigprocmask(SIG_SETMASK)>), and returns the "
7645 "process's previous signal mask."
7646 msgstr ""
7647
7648 #. type: Plain text
7649 #: build/C/man3/sigvec.3:197
7650 msgid ""
7651 "The B<siggetmask>()  function returns the process's current signal mask.  "
7652 "This call is equivalent to I<sigblock(0)>."
7653 msgstr ""
7654
7655 #. type: Plain text
7656 #: build/C/man3/sigvec.3:203
7657 msgid ""
7658 "The B<sigvec>()  function returns 0 on success; on error, it returns -1 and "
7659 "sets I<errno> to indicate the error."
7660 msgstr ""
7661
7662 #. type: Plain text
7663 #: build/C/man3/sigvec.3:209
7664 msgid ""
7665 "The B<sigblock>()  and B<sigsetmask>()  functions return the previous signal "
7666 "mask."
7667 msgstr ""
7668
7669 #. type: Plain text
7670 #: build/C/man3/sigvec.3:214
7671 msgid "The B<sigmask>()  function returns the signal mask for I<signum>."
7672 msgstr ""
7673
7674 #. type: Plain text
7675 #: build/C/man3/sigvec.3:219
7676 msgid "See the ERRORS under B<sigaction>(2)  and B<sigprocmask>(2)."
7677 msgstr ""
7678
7679 #. type: Plain text
7680 #: build/C/man3/sigvec.3:225
7681 msgid ""
7682 "All of these functions were in 4.3BSD, except B<siggetmask>(), whose origin "
7683 "is unclear.  These functions are obsolete: do not use them in new programs."
7684 msgstr ""
7685
7686 #. type: Plain text
7687 #: build/C/man3/sigvec.3:242
7688 msgid ""
7689 "On 4.3BSD, the B<signal>()  function provided reliable semantics (as when "
7690 "calling B<sigvec>()  with I<vec.sv_mask> equal to 0).  On System V, "
7691 "B<signal>()  provides unreliable semantics.  POSIX.1-2001 leaves these "
7692 "aspects of B<signal>()  unspecified.  See B<signal>(2)  for further details."
7693 msgstr ""
7694
7695 #. type: Plain text
7696 #: build/C/man3/sigvec.3:259
7697 msgid ""
7698 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
7699 "B<raise>(3), B<sigpause>(3), B<sigset>(3), B<signal>(7)"
7700 msgstr ""
7701
7702 #. type: TH
7703 #: build/C/man3/sigwait.3:24
7704 #, no-wrap
7705 msgid "SIGWAIT"
7706 msgstr ""
7707
7708 #. type: TH
7709 #: build/C/man3/sigwait.3:24
7710 #, no-wrap
7711 msgid "2010-09-10"
7712 msgstr ""
7713
7714 #. type: Plain text
7715 #: build/C/man3/sigwait.3:27
7716 msgid "sigwait - wait for a signal"
7717 msgstr ""
7718
7719 #. type: Plain text
7720 #: build/C/man3/sigwait.3:32
7721 #, no-wrap
7722 msgid "B< int sigwait(const sigset_t *>I<set>B<, int *>I<sig>B<);>\n"
7723 msgstr ""
7724
7725 #. type: Plain text
7726 #: build/C/man3/sigwait.3:42
7727 msgid "B<sigwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
7728 msgstr ""
7729
7730 #. type: Plain text
7731 #: build/C/man3/sigwait.3:53
7732 msgid ""
7733 "The B<sigwait>()  function suspends execution of the calling thread until "
7734 "the delivery of one of the signals specified in the signal set I<set>.  The "
7735 "function accepts the signal (removes it from the pending list of signals), "
7736 "and returns the signal number in I<sig>."
7737 msgstr ""
7738
7739 #. type: Plain text
7740 #: build/C/man3/sigwait.3:59
7741 msgid ""
7742 "The operation of B<sigwait>()  is the same as B<sigwaitinfo>(2), except "
7743 "that:"
7744 msgstr ""
7745
7746 #. type: Plain text
7747 #: build/C/man3/sigwait.3:64
7748 msgid ""
7749 "B<sigwait>()  only returns the signal number, rather than a I<siginfo_t> "
7750 "structure describing the signal."
7751 msgstr ""
7752
7753 #. type: Plain text
7754 #: build/C/man3/sigwait.3:66
7755 msgid "The return values of the two functions are different."
7756 msgstr ""
7757
7758 #. type: Plain text
7759 #: build/C/man3/sigwait.3:71
7760 msgid ""
7761 "On success, B<sigwait>()  returns 0.  On error, it returns a positive error "
7762 "number (listed in ERRORS)."
7763 msgstr ""
7764
7765 #.  Does not occur for glibc.
7766 #. type: Plain text
7767 #: build/C/man3/sigwait.3:77
7768 msgid "I<set> contains an invalid signal number."
7769 msgstr ""
7770
7771 #. type: Plain text
7772 #: build/C/man3/sigwait.3:83
7773 msgid "B<sigwait>()  is implemented using B<sigtimedwait>(2)."
7774 msgstr ""
7775
7776 #. type: Plain text
7777 #: build/C/man3/sigwait.3:86
7778 msgid "See B<pthread_sigmask>(3)."
7779 msgstr ""
7780
7781 #. type: Plain text
7782 #: build/C/man3/sigwait.3:93
7783 msgid ""
7784 "B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigsuspend>(2), "
7785 "B<sigwaitinfo>(2), B<sigsetops>(3), B<signal>(7)"
7786 msgstr ""
7787
7788 #. type: TH
7789 #: build/C/man2/sigwaitinfo.2:23
7790 #, no-wrap
7791 msgid "SIGWAITINFO"
7792 msgstr ""
7793
7794 #. type: TH
7795 #: build/C/man2/sigwaitinfo.2:23
7796 #, no-wrap
7797 msgid "2011-10-03"
7798 msgstr ""
7799
7800 #. type: Plain text
7801 #: build/C/man2/sigwaitinfo.2:26
7802 msgid "sigwaitinfo, sigtimedwait - synchronously wait for queued signals"
7803 msgstr ""
7804
7805 #. type: Plain text
7806 #: build/C/man2/sigwaitinfo.2:31
7807 #, no-wrap
7808 msgid "B<int sigwaitinfo(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<);>\n"
7809 msgstr ""
7810
7811 #. type: Plain text
7812 #: build/C/man2/sigwaitinfo.2:34
7813 #, no-wrap
7814 msgid ""
7815 "B<int sigtimedwait(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<, >\n"
7816 "B<                 const struct timespec *>I<timeout>B<);>\n"
7817 msgstr ""
7818
7819 #. type: Plain text
7820 #: build/C/man2/sigwaitinfo.2:44
7821 msgid "B<sigwaitinfo>(), B<sigtimedwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
7822 msgstr ""
7823
7824 #. type: Plain text
7825 #: build/C/man2/sigwaitinfo.2:54
7826 msgid ""
7827 "B<sigwaitinfo>()  suspends execution of the calling thread until one of the "
7828 "signals in I<set> is delivered.  (If one of the signals in I<set> is already "
7829 "pending for the calling thread, B<sigwaitinfo>()  will return immediately "
7830 "with information about that signal.)"
7831 msgstr ""
7832
7833 #. type: Plain text
7834 #: build/C/man2/sigwaitinfo.2:66
7835 msgid ""
7836 "B<sigwaitinfo>()  removes the delivered signal from the set of pending "
7837 "signals and returns the signal number as its function result.  If the "
7838 "I<info> argument is not NULL, then it returns a structure of type "
7839 "I<siginfo_t> (see B<sigaction>(2))  containing information about the signal."
7840 msgstr ""
7841
7842 #. type: Plain text
7843 #: build/C/man2/sigwaitinfo.2:72
7844 msgid ""
7845 "Signals returned via B<sigwaitinfo>()  are delivered in the usual order; see "
7846 "B<signal>(7)  for further details."
7847 msgstr ""
7848
7849 #. type: Plain text
7850 #: build/C/man2/sigwaitinfo.2:81
7851 msgid ""
7852 "B<sigtimedwait>()  operates in exactly the same way as B<sigwaitinfo>()  "
7853 "except that it has an additional argument, I<timeout>, which enables an "
7854 "upper bound to be placed on the time for which the thread is suspended.  "
7855 "This argument is of the following type:"
7856 msgstr ""
7857
7858 #. type: Plain text
7859 #: build/C/man2/sigwaitinfo.2:88
7860 #, no-wrap
7861 msgid ""
7862 "struct timespec {\n"
7863 "    long    tv_sec;         /* seconds */\n"
7864 "    long    tv_nsec;        /* nanoseconds */\n"
7865 "}\n"
7866 msgstr ""
7867
7868 #. type: Plain text
7869 #: build/C/man2/sigwaitinfo.2:98
7870 msgid ""
7871 "If both fields of this structure are specified as 0, a poll is performed: "
7872 "B<sigtimedwait>()  returns immediately, either with information about a "
7873 "signal that was pending for the caller, or with an error if none of the "
7874 "signals in I<set> was pending."
7875 msgstr ""
7876
7877 #. type: Plain text
7878 #: build/C/man2/sigwaitinfo.2:107
7879 msgid ""
7880 "On success, both B<sigwaitinfo>()  and B<sigtimedwait>()  return a signal "
7881 "number (i.e., a value greater than zero).  On failure both calls return -1, "
7882 "with I<errno> set to indicate the error."
7883 msgstr ""
7884
7885 #. type: Plain text
7886 #: build/C/man2/sigwaitinfo.2:116
7887 msgid ""
7888 "No signal in I<set> was delivered within the I<timeout> period specified to "
7889 "B<sigtimedwait>()."
7890 msgstr ""
7891
7892 #. type: Plain text
7893 #: build/C/man2/sigwaitinfo.2:122
7894 msgid ""
7895 "The wait was interrupted by a signal handler; see B<signal>(7).  (This "
7896 "handler was for a signal other than one of those in I<set>.)"
7897 msgstr ""
7898
7899 #. type: Plain text
7900 #: build/C/man2/sigwaitinfo.2:126
7901 msgid "I<timeout> was invalid."
7902 msgstr ""
7903
7904 #. type: Plain text
7905 #: build/C/man2/sigwaitinfo.2:145
7906 msgid ""
7907 "In normal usage, the calling program blocks the signals in I<set> via a "
7908 "prior call to B<sigprocmask>(2)  (so that the default disposition for these "
7909 "signals does not occur if they are delivered between successive calls to "
7910 "B<sigwaitinfo>()  or B<sigtimedwait>())  and does not establish handlers for "
7911 "these signals.  In a multithreaded program, the signal should be blocked in "
7912 "all threads to prevent the signal being delivered to a thread other than the "
7913 "one calling B<sigwaitinfo>()  or B<sigtimedwait>())."
7914 msgstr ""
7915
7916 #. type: Plain text
7917 #: build/C/man2/sigwaitinfo.2:150
7918 msgid ""
7919 "The set of signals that is pending for a given thread is the union of the "
7920 "set of signals that is pending specifically for that thread and the set of "
7921 "signals that is pending for the process as a whole (see B<signal>(7))."
7922 msgstr ""
7923
7924 #. type: Plain text
7925 #: build/C/man2/sigwaitinfo.2:156
7926 msgid "Attempts to wait for B<SIGKILL> and B<SIGSTOP> are silently ignored."
7927 msgstr ""
7928
7929 #. type: Plain text
7930 #: build/C/man2/sigwaitinfo.2:165
7931 msgid ""
7932 "If multiple threads of a process are blocked waiting for the same signal(s) "
7933 "in B<sigwaitinfo>()  or B<sigtimedwait>(), then exactly one of the threads "
7934 "will actually receive the signal if it is delivered to the process as a "
7935 "whole; which of the threads receives the signal is indeterminate."
7936 msgstr ""
7937
7938 #. type: Plain text
7939 #: build/C/man2/sigwaitinfo.2:174
7940 msgid ""
7941 "POSIX leaves the meaning of a NULL value for the I<timeout> argument of "
7942 "B<sigtimedwait>()  unspecified, permitting the possibility that this has the "
7943 "same meaning as a call to B<sigwaitinfo>(), and indeed this is what is done "
7944 "on Linux."
7945 msgstr ""
7946
7947 #. type: Plain text
7948 #: build/C/man2/sigwaitinfo.2:179
7949 msgid ""
7950 "On Linux, B<sigwaitinfo>()  is a library function implemented on top of "
7951 "B<sigtimedwait>()."
7952 msgstr ""
7953
7954 #. type: Plain text
7955 #: build/C/man2/sigwaitinfo.2:190
7956 msgid ""
7957 "B<kill>(2), B<sigaction>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), "
7958 "B<sigprocmask>(2), B<sigqueue>(3), B<sigsetops>(3), B<sigwait>(3), "
7959 "B<signal>(7), B<time>(7)"
7960 msgstr ""
7961
7962 #. type: TH
7963 #: build/C/man3/sysv_signal.3:23
7964 #, no-wrap
7965 msgid "SYSV_SIGNAL"
7966 msgstr ""
7967
7968 #. type: TH
7969 #: build/C/man3/sysv_signal.3:23
7970 #, no-wrap
7971 msgid "2007-05-04"
7972 msgstr ""
7973
7974 #. type: Plain text
7975 #: build/C/man3/sysv_signal.3:26
7976 msgid "sysv_signal - signal handling with System V semantics"
7977 msgstr ""
7978
7979 #. type: Plain text
7980 #: build/C/man3/sysv_signal.3:28
7981 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
7982 msgstr ""
7983
7984 #. type: Plain text
7985 #: build/C/man3/sysv_signal.3:34
7986 msgid "B<sighandler_t sysv_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
7987 msgstr ""
7988
7989 #. type: Plain text
7990 #: build/C/man3/sysv_signal.3:39
7991 msgid ""
7992 "The B<sysv_signal>()  function takes the same arguments, and performs the "
7993 "same task, as B<signal>(2)."
7994 msgstr ""
7995
7996 #. type: Plain text
7997 #: build/C/man3/sysv_signal.3:49
7998 msgid ""
7999 "However B<sysv_signal>()  provides the System V unreliable signal semantics, "
8000 "that is: a) the disposition of the signal is reset to the default when the "
8001 "handler is invoked; b) delivery of further instances of the signal is not "
8002 "blocked while the signal handler is executing; and c) if the handler "
8003 "interrupts (certain) blocking system calls, then the system call is not "
8004 "automatically restarted."
8005 msgstr ""
8006
8007 #. type: Plain text
8008 #: build/C/man3/sysv_signal.3:55
8009 msgid ""
8010 "The B<sysv_signal>()  function returns the previous value of the signal "
8011 "handler, or B<SIG_ERR> on error."
8012 msgstr ""
8013
8014 #. type: Plain text
8015 #: build/C/man3/sysv_signal.3:60
8016 msgid "This function is nonstandard."
8017 msgstr ""
8018
8019 #. type: Plain text
8020 #: build/C/man3/sysv_signal.3:66
8021 msgid "Use of B<sysv_signal>()  should be avoided; use B<sigaction>(2)  instead."
8022 msgstr ""
8023
8024 #. type: Plain text
8025 #: build/C/man3/sysv_signal.3:77
8026 msgid ""
8027 "On older Linux systems, B<sysv_signal>()  and B<signal>(2)  were "
8028 "equivalent.  But on newer systems, B<signal>(2)  provides reliable signal "
8029 "semantics; see B<signal>(2)  for details."
8030 msgstr ""
8031
8032 #. type: Plain text
8033 #: build/C/man3/sysv_signal.3:89
8034 msgid "B<sigaction>(2), B<signal>(2), B<bsd_signal>(3), B<signal>(7)"
8035 msgstr ""
8036
8037 #. type: TH
8038 #: build/C/man2/timer_create.2:29
8039 #, no-wrap
8040 msgid "TIMER_CREATE"
8041 msgstr ""
8042
8043 #. type: TH
8044 #: build/C/man2/timer_create.2:29
8045 #, no-wrap
8046 msgid "2010-09-27"
8047 msgstr ""
8048
8049 #. type: Plain text
8050 #: build/C/man2/timer_create.2:32
8051 msgid "timer_create - create a POSIX per-process timer"
8052 msgstr ""
8053
8054 #. type: Plain text
8055 #: build/C/man2/timer_create.2:36
8056 #, no-wrap
8057 msgid ""
8058 "B<#include E<lt>signal.hE<gt>>\n"
8059 "B<#include E<lt>time.hE<gt>>\n"
8060 msgstr ""
8061
8062 #. type: Plain text
8063 #: build/C/man2/timer_create.2:39
8064 #, no-wrap
8065 msgid ""
8066 "B<int timer_create(clockid_t >I<clockid>B<, struct sigevent *>I<sevp>B<,>\n"
8067 "B<                 timer_t *>I<timerid>B<);>\n"
8068 msgstr ""
8069
8070 #. type: Plain text
8071 #: build/C/man2/timer_create.2:42 build/C/man2/timer_delete.2:34 build/C/man2/timer_getoverrun.2:34 build/C/man2/timer_settime.2:38
8072 msgid "Link with I<-lrt>."
8073 msgstr ""
8074
8075 #. type: Plain text
8076 #: build/C/man2/timer_create.2:50
8077 msgid "B<timer_create>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8078 msgstr ""
8079
8080 #. type: Plain text
8081 #: build/C/man2/timer_create.2:58
8082 msgid ""
8083 "B<timer_create>()  creates a new per-process interval timer.  The ID of the "
8084 "new timer is returned in the buffer pointed to by I<timerid>, which must be "
8085 "a non-NULL pointer.  This ID is unique within the process, until the timer "
8086 "is deleted.  The new timer is initially disarmed."
8087 msgstr ""
8088
8089 #. type: Plain text
8090 #: build/C/man2/timer_create.2:63
8091 msgid ""
8092 "The I<clockid> argument specifies the clock that the new timer uses to "
8093 "measure time.  It can be specified as one of the following values:"
8094 msgstr ""
8095
8096 #. type: TP
8097 #: build/C/man2/timer_create.2:63
8098 #, no-wrap
8099 msgid "B<CLOCK_REALTIME>"
8100 msgstr ""
8101
8102 #. type: Plain text
8103 #: build/C/man2/timer_create.2:66
8104 msgid "A settable system-wide real-time clock."
8105 msgstr ""
8106
8107 #. type: TP
8108 #: build/C/man2/timer_create.2:66
8109 #, no-wrap
8110 msgid "B<CLOCK_MONOTONIC>"
8111 msgstr ""
8112
8113 #.  Note: the CLOCK_MONOTONIC_RAW clock added for clock_gettime()
8114 #.  in 2.6.28 is not supported for POSIX timers -- mtk, Feb 2009
8115 #. type: Plain text
8116 #: build/C/man2/timer_create.2:73
8117 msgid ""
8118 "A nonsettable monotonically increasing clock that measures time from some "
8119 "unspecified point in the past that does not change after system startup."
8120 msgstr ""
8121
8122 #. type: TP
8123 #: build/C/man2/timer_create.2:73
8124 #, no-wrap
8125 msgid "B<CLOCK_PROCESS_CPUTIME_ID> (since Linux 2.6.12)"
8126 msgstr ""
8127
8128 #. type: Plain text
8129 #: build/C/man2/timer_create.2:77
8130 msgid ""
8131 "A clock that measures (user and system) CPU time consumed by (all of the "
8132 "threads in) the calling process."
8133 msgstr ""
8134
8135 #. type: TP
8136 #: build/C/man2/timer_create.2:77
8137 #, no-wrap
8138 msgid "B<CLOCK_THREAD_CPUTIME_ID> (since Linux 2.6.12)"
8139 msgstr ""
8140
8141 #.  The CLOCK_MONOTONIC_RAW that was added in 2.6.28 can't be used
8142 #.  to create a timer -- mtk, Feb 2009
8143 #. type: Plain text
8144 #: build/C/man2/timer_create.2:83
8145 msgid ""
8146 "A clock that measures (user and system) CPU time consumed by the calling "
8147 "thread."
8148 msgstr ""
8149
8150 #. type: Plain text
8151 #: build/C/man2/timer_create.2:92
8152 msgid ""
8153 "As well as the above values, I<clockid> can be specified as the I<clockid> "
8154 "returned by a call to B<clock_getcpuclockid>(3)  or "
8155 "B<pthread_getcpuclockid>(3)."
8156 msgstr ""
8157
8158 #. type: Plain text
8159 #: build/C/man2/timer_create.2:101
8160 msgid ""
8161 "The I<sevp> argument points to a I<sigevent> structure that specifies how "
8162 "the caller should be notified when the timer expires.  For the definition "
8163 "and general details of this structure, see B<sigevent>(7)."
8164 msgstr ""
8165
8166 #. type: Plain text
8167 #: build/C/man2/timer_create.2:105
8168 msgid "The I<sevp.sigev_notify> field can have the following values:"
8169 msgstr ""
8170
8171 #. type: Plain text
8172 #: build/C/man2/timer_create.2:110
8173 msgid ""
8174 "Don't asynchronously notify when the timer expires.  Progress of the timer "
8175 "can be monitored using B<timer_gettime>(2)."
8176 msgstr ""
8177
8178 #. type: Plain text
8179 #: build/C/man2/timer_create.2:128
8180 msgid ""
8181 "Upon timer expiration, generate the signal I<sigev_signo> for the process.  "
8182 "See B<sigevent>(7)  for general details.  The I<si_code> field of the "
8183 "I<siginfo_t> structure will be set to B<SI_TIMER>.  At any point in time, at "
8184 "most one signal is queued to the process for a given timer; see "
8185 "B<timer_getoverrun>(2)  for more details."
8186 msgstr ""
8187
8188 #. type: Plain text
8189 #: build/C/man2/timer_create.2:136
8190 msgid ""
8191 "Upon timer expiration, invoke I<sigev_notify_function> as if it were the "
8192 "start function of a new thread.  See B<sigevent>(7)  for details."
8193 msgstr ""
8194
8195 #. type: Plain text
8196 #: build/C/man2/timer_create.2:150
8197 msgid ""
8198 "As for B<SIGEV_SIGNAL>, but the signal is targeted at the thread whose ID is "
8199 "given in I<sigev_notify_thread_id>, which must be a thread in the same "
8200 "process as the caller.  The I<sigev_notify_thread_id> field specifies a "
8201 "kernel thread ID, that is, the value returned by B<clone>(2)  or "
8202 "B<gettid>(2).  This flag is only intended for use by threading libraries."
8203 msgstr ""
8204
8205 #. type: Plain text
8206 #: build/C/man2/timer_create.2:165
8207 msgid ""
8208 "Specifying I<sevp> as NULL is equivalent to specifying a pointer to a "
8209 "I<sigevent> structure in which I<sigev_notify> is B<SIGEV_SIGNAL>, "
8210 "I<sigev_signo> is B<SIGALRM>, and I<sigev_value.sival_int> is the timer ID."
8211 msgstr ""
8212
8213 #. type: Plain text
8214 #: build/C/man2/timer_create.2:173
8215 msgid ""
8216 "On success, B<timer_create>()  returns 0, and the ID of the new timer is "
8217 "placed in I<*timerid>.  On failure, -1 is returned, and I<errno> is set to "
8218 "indicate the error."
8219 msgstr ""
8220
8221 #. type: Plain text
8222 #: build/C/man2/timer_create.2:177
8223 msgid "Temporary error during kernel allocation of timer structures."
8224 msgstr ""
8225
8226 #. type: Plain text
8227 #: build/C/man2/timer_create.2:185
8228 msgid ""
8229 "Clock ID, I<sigev_notify>, I<sigev_signo>, or I<sigev_notify_thread_id> is "
8230 "invalid."
8231 msgstr ""
8232
8233 #.  glibc layer: malloc()
8234 #. type: Plain text
8235 #: build/C/man2/timer_create.2:189
8236 msgid "Could not allocate memory."
8237 msgstr ""
8238
8239 #. type: Plain text
8240 #: build/C/man2/timer_create.2:191 build/C/man2/timer_delete.2:64 build/C/man2/timer_getoverrun.2:94
8241 msgid "This system call is available since Linux 2.6."
8242 msgstr ""
8243
8244 #. type: Plain text
8245 #: build/C/man2/timer_create.2:196
8246 msgid "A program may create multiple interval timers using B<timer_create>()."
8247 msgstr ""
8248
8249 #. type: Plain text
8250 #: build/C/man2/timer_create.2:201
8251 msgid ""
8252 "Timers are not inherited by the child of a B<fork>(2), and are disarmed and "
8253 "deleted during an B<execve>(2)."
8254 msgstr ""
8255
8256 #. type: Plain text
8257 #: build/C/man2/timer_create.2:209
8258 msgid ""
8259 "The kernel preallocates a \"queued real-time signal\" for each timer created "
8260 "using B<timer_create>().  Consequently, the number of timers is limited by "
8261 "the B<RLIMIT_SIGPENDING> resource limit (see B<setrlimit>(2))."
8262 msgstr ""
8263
8264 #. type: Plain text
8265 #: build/C/man2/timer_create.2:214
8266 msgid ""
8267 "The timers created by B<timer_create>()  are commonly known as \"POSIX "
8268 "(interval) timers\".  The POSIX timers API consists of the following "
8269 "interfaces:"
8270 msgstr ""
8271
8272 #. type: Plain text
8273 #: build/C/man2/timer_create.2:217
8274 msgid "B<timer_create>(): Create a timer."
8275 msgstr ""
8276
8277 #. type: Plain text
8278 #: build/C/man2/timer_create.2:220
8279 msgid "B<timer_settime>(2): Arm (start) or disarm (stop) a timer."
8280 msgstr ""
8281
8282 #. type: Plain text
8283 #: build/C/man2/timer_create.2:224
8284 msgid ""
8285 "B<timer_gettime>(2): Fetch the time remaining until the next expiration of a "
8286 "timer, along with the interval setting of the timer."
8287 msgstr ""
8288
8289 #. type: Plain text
8290 #: build/C/man2/timer_create.2:227
8291 msgid ""
8292 "B<timer_getoverrun>(2): Return the overrun count for the last timer "
8293 "expiration."
8294 msgstr ""
8295
8296 #. type: Plain text
8297 #: build/C/man2/timer_create.2:230
8298 msgid "B<timer_delete>(2): Disarm and delete a timer."
8299 msgstr ""
8300
8301 #. type: Plain text
8302 #: build/C/man2/timer_create.2:233
8303 msgid ""
8304 "Part of the implementation of the POSIX timers API is provided by glibc.  In "
8305 "particular:"
8306 msgstr ""
8307
8308 #. type: Plain text
8309 #: build/C/man2/timer_create.2:237
8310 msgid ""
8311 "The functionality for B<SIGEV_THREAD> is implemented within glibc, rather "
8312 "than the kernel."
8313 msgstr ""
8314
8315 #.  See the glibc source file kernel-posix-timers.h for the structure
8316 #.  that glibc uses to map userspace timer IDs to kernel timer IDs
8317 #.  The kernel-level timer ID is exposed via siginfo.si_tid.
8318 #. type: Plain text
8319 #: build/C/man2/timer_create.2:243
8320 msgid ""
8321 "The timer IDs presented at user level are maintained by glibc, which maps "
8322 "these IDs to the timer IDs employed by the kernel."
8323 msgstr ""
8324
8325 #. type: Plain text
8326 #: build/C/man2/timer_create.2:251
8327 msgid ""
8328 "The POSIX timers system calls first appeared in Linux 2.6.  Prior to this, "
8329 "glibc provided an incomplete userspace implementation (B<CLOCK_REALTIME> "
8330 "timers only) using POSIX threads, and current glibc falls back to this "
8331 "implementation on systems running pre-2.6 Linux kernels."
8332 msgstr ""
8333
8334 #. type: Plain text
8335 #: build/C/man2/timer_create.2:263
8336 msgid ""
8337 "The program below takes two arguments: a sleep period in seconds, and a "
8338 "timer frequency in nanoseconds.  The program establishes a handler for the "
8339 "signal it uses for the timer, blocks that signal, creates and arms a timer "
8340 "that expires with the given frequency, sleeps for the specified number of "
8341 "seconds, and then unblocks the timer signal.  Assuming that the timer "
8342 "expired at least once while the program slept, the signal handler will be "
8343 "invoked, and the handler displays some information about the timer "
8344 "notification.  The program terminates after one invocation of the signal "
8345 "handler."
8346 msgstr ""
8347
8348 #. type: Plain text
8349 #: build/C/man2/timer_create.2:268
8350 msgid ""
8351 "In the following example run, the program sleeps for 1 second, after "
8352 "creating a timer that has a frequency of 100 nanoseconds.  By the time the "
8353 "signal is unblocked and delivered, there have been around ten million "
8354 "overruns."
8355 msgstr ""
8356
8357 #. type: Plain text
8358 #: build/C/man2/timer_create.2:280
8359 #, no-wrap
8360 msgid ""
8361 "$ B<./a.out 1 100>\n"
8362 "Establishing handler for signal 34\n"
8363 "Blocking signal 34\n"
8364 "timer ID is 0x804c008\n"
8365 "Sleeping for 1 seconds\n"
8366 "Unblocking signal 34\n"
8367 "Caught signal 34\n"
8368 "    sival_ptr = 0xbfb174f4;     *sival_ptr = 0x804c008\n"
8369 "    overrun count = 10004886\n"
8370 msgstr ""
8371
8372 #. type: SS
8373 #: build/C/man2/timer_create.2:282
8374 #, no-wrap
8375 msgid "Program Source"
8376 msgstr ""
8377
8378 #. type: Plain text
8379 #: build/C/man2/timer_create.2:290
8380 #, no-wrap
8381 msgid ""
8382 "#include E<lt>stdlib.hE<gt>\n"
8383 "#include E<lt>unistd.hE<gt>\n"
8384 "#include E<lt>stdio.hE<gt>\n"
8385 "#include E<lt>signal.hE<gt>\n"
8386 "#include E<lt>time.hE<gt>\n"
8387 msgstr ""
8388
8389 #. type: Plain text
8390 #: build/C/man2/timer_create.2:293
8391 #, no-wrap
8392 msgid ""
8393 "#define CLOCKID CLOCK_REALTIME\n"
8394 "#define SIG SIGRTMIN\n"
8395 msgstr ""
8396
8397 #. type: Plain text
8398 #: build/C/man2/timer_create.2:296
8399 #, no-wrap
8400 msgid ""
8401 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
8402 "                        } while (0)\n"
8403 msgstr ""
8404
8405 #. type: Plain text
8406 #: build/C/man2/timer_create.2:302
8407 #, no-wrap
8408 msgid ""
8409 "static void\n"
8410 "print_siginfo(siginfo_t *si)\n"
8411 "{\n"
8412 "    timer_t *tidp;\n"
8413 "    int or;\n"
8414 msgstr ""
8415
8416 #. type: Plain text
8417 #: build/C/man2/timer_create.2:304
8418 #, no-wrap
8419 msgid "    tidp = si-E<gt>si_value.sival_ptr;\n"
8420 msgstr ""
8421
8422 #. type: Plain text
8423 #: build/C/man2/timer_create.2:307
8424 #, no-wrap
8425 msgid ""
8426 "    printf(\"    sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n"
8427 "    printf(\"    *sival_ptr = 0x%lx\\en\", (long) *tidp);\n"
8428 msgstr ""
8429
8430 #. type: Plain text
8431 #: build/C/man2/timer_create.2:314
8432 #, no-wrap
8433 msgid ""
8434 "    or = timer_getoverrun(*tidp);\n"
8435 "    if (or == -1)\n"
8436 "        errExit(\"timer_getoverrun\");\n"
8437 "    else\n"
8438 "        printf(\"    overrun count = %d\\en\", or);\n"
8439 "}\n"
8440 msgstr ""
8441
8442 #. type: Plain text
8443 #: build/C/man2/timer_create.2:321
8444 #, no-wrap
8445 msgid ""
8446 "static void\n"
8447 "handler(int sig, siginfo_t *si, void *uc)\n"
8448 "{\n"
8449 "    /* Note: calling printf() from a signal handler is not\n"
8450 "       strictly correct, since printf() is not async-signal-safe;\n"
8451 "       see signal(7) */\n"
8452 msgstr ""
8453
8454 #. type: Plain text
8455 #: build/C/man2/timer_create.2:326
8456 #, no-wrap
8457 msgid ""
8458 "    printf(\"Caught signal %d\\en\", sig);\n"
8459 "    print_siginfo(si);\n"
8460 "    signal(sig, SIG_IGN);\n"
8461 "}\n"
8462 msgstr ""
8463
8464 #. type: Plain text
8465 #: build/C/man2/timer_create.2:336
8466 #, no-wrap
8467 msgid ""
8468 "int\n"
8469 "main(int argc, char *argv[])\n"
8470 "{\n"
8471 "    timer_t timerid;\n"
8472 "    struct sigevent sev;\n"
8473 "    struct itimerspec its;\n"
8474 "    long long freq_nanosecs;\n"
8475 "    sigset_t mask;\n"
8476 "    struct sigaction sa;\n"
8477 msgstr ""
8478
8479 #. type: Plain text
8480 #: build/C/man2/timer_create.2:342
8481 #, no-wrap
8482 msgid ""
8483 "    if (argc != 3) {\n"
8484 "        fprintf(stderr, \"Usage: %s E<lt>sleep-secsE<gt> "
8485 "E<lt>freq-nanosecsE<gt>\\en\",\n"
8486 "                argv[0]);\n"
8487 "        exit(EXIT_FAILURE);\n"
8488 "    }\n"
8489 msgstr ""
8490
8491 #. type: Plain text
8492 #: build/C/man2/timer_create.2:344
8493 #, no-wrap
8494 msgid "    /* Establish handler for timer signal */\n"
8495 msgstr ""
8496
8497 #. type: Plain text
8498 #: build/C/man2/timer_create.2:351
8499 #, no-wrap
8500 msgid ""
8501 "    printf(\"Establishing handler for signal %d\\en\", SIG);\n"
8502 "    sa.sa_flags = SA_SIGINFO;\n"
8503 "    sa.sa_sigaction = handler;\n"
8504 "    sigemptyset(&sa.sa_mask);\n"
8505 "    if (sigaction(SIG, &sa, NULL) == -1)\n"
8506 "        errExit(\"sigaction\");\n"
8507 msgstr ""
8508
8509 #. type: Plain text
8510 #: build/C/man2/timer_create.2:353
8511 #, no-wrap
8512 msgid "    /* Block timer signal temporarily */\n"
8513 msgstr ""
8514
8515 #. type: Plain text
8516 #: build/C/man2/timer_create.2:359
8517 #, no-wrap
8518 msgid ""
8519 "    printf(\"Blocking signal %d\\en\", SIG);\n"
8520 "    sigemptyset(&mask);\n"
8521 "    sigaddset(&mask, SIG);\n"
8522 "    if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n"
8523 "        errExit(\"sigprocmask\");\n"
8524 msgstr ""
8525
8526 #. type: Plain text
8527 #: build/C/man2/timer_create.2:361
8528 #, no-wrap
8529 msgid "    /* Create the timer */\n"
8530 msgstr ""
8531
8532 #. type: Plain text
8533 #: build/C/man2/timer_create.2:367
8534 #, no-wrap
8535 msgid ""
8536 "    sev.sigev_notify = SIGEV_SIGNAL;\n"
8537 "    sev.sigev_signo = SIG;\n"
8538 "    sev.sigev_value.sival_ptr = &timerid;\n"
8539 "    if (timer_create(CLOCKID, &sev, &timerid) == -1)\n"
8540 "        errExit(\"timer_create\");\n"
8541 msgstr ""
8542
8543 #. type: Plain text
8544 #: build/C/man2/timer_create.2:369
8545 #, no-wrap
8546 msgid "    printf(\"timer ID is 0x%lx\\en\", (long) timerid);\n"
8547 msgstr ""
8548
8549 #. type: Plain text
8550 #: build/C/man2/timer_create.2:371
8551 #, no-wrap
8552 msgid "    /* Start the timer */\n"
8553 msgstr ""
8554
8555 #. type: Plain text
8556 #: build/C/man2/timer_create.2:377
8557 #, no-wrap
8558 msgid ""
8559 "    freq_nanosecs = atoll(argv[2]);\n"
8560 "    its.it_value.tv_sec = freq_nanosecs / 1000000000;\n"
8561 "    its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n"
8562 "    its.it_interval.tv_sec = its.it_value.tv_sec;\n"
8563 "    its.it_interval.tv_nsec = its.it_value.tv_nsec;\n"
8564 msgstr ""
8565
8566 #. type: Plain text
8567 #: build/C/man2/timer_create.2:380
8568 #, no-wrap
8569 msgid ""
8570 "    if (timer_settime(timerid, 0, &its, NULL) == -1)\n"
8571 "         errExit(\"timer_settime\");\n"
8572 msgstr ""
8573
8574 #. type: Plain text
8575 #: build/C/man2/timer_create.2:383
8576 #, no-wrap
8577 msgid ""
8578 "    /* Sleep for a while; meanwhile, the timer may expire\n"
8579 "       multiple times */\n"
8580 msgstr ""
8581
8582 #. type: Plain text
8583 #: build/C/man2/timer_create.2:386
8584 #, no-wrap
8585 msgid ""
8586 "    printf(\"Sleeping for %d seconds\\en\", atoi(argv[1]));\n"
8587 "    sleep(atoi(argv[1]));\n"
8588 msgstr ""
8589
8590 #. type: Plain text
8591 #: build/C/man2/timer_create.2:389
8592 #, no-wrap
8593 msgid ""
8594 "    /* Unlock the timer signal, so that timer notification\n"
8595 "       can be delivered */\n"
8596 msgstr ""
8597
8598 #. type: Plain text
8599 #: build/C/man2/timer_create.2:393
8600 #, no-wrap
8601 msgid ""
8602 "    printf(\"Unblocking signal %d\\en\", SIG);\n"
8603 "    if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n"
8604 "        errExit(\"sigprocmask\");\n"
8605 msgstr ""
8606
8607 #. type: Plain text
8608 #: build/C/man2/timer_create.2:396 build/C/man2/timerfd_create.2:533
8609 #, no-wrap
8610 msgid ""
8611 "    exit(EXIT_SUCCESS);\n"
8612 "}\n"
8613 msgstr ""
8614
8615 #. type: Plain text
8616 #: build/C/man2/timer_create.2:409
8617 msgid ""
8618 "B<clock_gettime>(2), B<setitimer>(2), B<timer_delete>(2), "
8619 "B<timer_getoverrun>(2), B<timer_settime>(2), B<timerfd_create>(2), "
8620 "B<clock_getcpuclockid>(3), B<pthread_getcpuclockid>(3), B<pthreads>(7), "
8621 "B<sigevent>(7), B<signal>(7), B<time>(7)"
8622 msgstr ""
8623
8624 #. type: TH
8625 #: build/C/man2/timer_delete.2:23
8626 #, no-wrap
8627 msgid "TIMER_DELETE"
8628 msgstr ""
8629
8630 #. type: TH
8631 #: build/C/man2/timer_delete.2:23 build/C/man2/timer_getoverrun.2:23 build/C/man2/timer_settime.2:23
8632 #, no-wrap
8633 msgid "2009-02-20"
8634 msgstr ""
8635
8636 #. type: Plain text
8637 #: build/C/man2/timer_delete.2:26
8638 msgid "timer_delete - delete a POSIX per-process timer"
8639 msgstr ""
8640
8641 #. type: Plain text
8642 #: build/C/man2/timer_delete.2:29 build/C/man2/timer_getoverrun.2:29 build/C/man2/timer_settime.2:30
8643 #, no-wrap
8644 msgid "B<#include E<lt>time.hE<gt>>\n"
8645 msgstr ""
8646
8647 #. type: Plain text
8648 #: build/C/man2/timer_delete.2:31
8649 #, no-wrap
8650 msgid "B<int timer_delete(timer_t >I<timerid>B<);>\n"
8651 msgstr ""
8652
8653 #. type: Plain text
8654 #: build/C/man2/timer_delete.2:42
8655 msgid "B<timer_delete>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8656 msgstr ""
8657
8658 #. type: Plain text
8659 #: build/C/man2/timer_delete.2:50
8660 msgid ""
8661 "B<timer_delete>()  deletes the timer whose ID is given in I<timerid>.  If "
8662 "the timer was armed at the time of this call, it is disarmed before being "
8663 "deleted.  The treatment of any pending signal generated by the deleted timer "
8664 "is unspecified."
8665 msgstr ""
8666
8667 #. type: Plain text
8668 #: build/C/man2/timer_delete.2:57
8669 msgid ""
8670 "On success, B<timer_delete>()  returns 0.  On failure, -1 is returned, and "
8671 "I<errno> is set to indicate the error."
8672 msgstr ""
8673
8674 #. type: Plain text
8675 #: build/C/man2/timer_delete.2:62 build/C/man2/timer_getoverrun.2:92
8676 msgid "I<timerid> is not a valid timer ID."
8677 msgstr ""
8678
8679 #. type: Plain text
8680 #: build/C/man2/timer_delete.2:71
8681 msgid ""
8682 "B<clock_gettime>(2), B<timer_create>(2), B<timer_getoverrun>(2), "
8683 "B<timer_settime>(2), B<time>(7)"
8684 msgstr ""
8685
8686 #. type: TH
8687 #: build/C/man2/timer_getoverrun.2:23
8688 #, no-wrap
8689 msgid "TIMER_GETOVERRUN"
8690 msgstr ""
8691
8692 #. type: Plain text
8693 #: build/C/man2/timer_getoverrun.2:26
8694 msgid "timer_getoverrun - get overrun count for a POSIX per-process timer"
8695 msgstr ""
8696
8697 #. type: Plain text
8698 #: build/C/man2/timer_getoverrun.2:31
8699 #, no-wrap
8700 msgid "B<int timer_getoverrun(timer_t >I<timerid>B<);>\n"
8701 msgstr ""
8702
8703 #. type: Plain text
8704 #: build/C/man2/timer_getoverrun.2:42
8705 msgid "B<timer_getoverrun>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8706 msgstr ""
8707
8708 #. type: Plain text
8709 #: build/C/man2/timer_getoverrun.2:53
8710 msgid ""
8711 "B<timer_getoverrun>()  returns the \"overrun count\" for the timer referred "
8712 "to by I<timerid>.  An application can use the overrun count to accurately "
8713 "calculate the number of timer expirations that would have occurred over a "
8714 "given time interval.  Timer overruns can occur both when receiving "
8715 "expiration notifications via signals (B<SIGEV_SIGNAL>), and via threads "
8716 "(B<SIGEV_THREAD>)."
8717 msgstr ""
8718
8719 #. type: Plain text
8720 #: build/C/man2/timer_getoverrun.2:73
8721 msgid ""
8722 "When expiration notifications are delivered via a signal, overruns can occur "
8723 "as follows.  Regardless of whether or not a real-time signal is used for "
8724 "timer notifications, the system queues at most one signal per timer.  (This "
8725 "is the behavior specified by POSIX.1-2001.  The alternative, queuing one "
8726 "signal for each timer expiration, could easily result in overflowing the "
8727 "allowed limits for queued signals on the system.)  Because of system "
8728 "scheduling delays, or because the signal may be temporarily blocked, there "
8729 "can be a delay between the time when the notification signal is generated "
8730 "and the time when it is delivered (e.g., caught by a signal handler) or "
8731 "accepted (e.g., using B<sigwaitinfo>(2)).  In this interval, further timer "
8732 "expirations may occur.  The timer overrun count is the number of additional "
8733 "timer expirations that occurred between the time when the signal was "
8734 "generated and when it was delivered or accepted."
8735 msgstr ""
8736
8737 #. type: Plain text
8738 #: build/C/man2/timer_getoverrun.2:79
8739 msgid ""
8740 "Timer overruns can also occur when expiration notifications are delivered "
8741 "via invocation of a thread, since there may be an arbitrary delay between an "
8742 "expiration of the timer and the invocation of the notification thread, and "
8743 "in that delay interval, additional timer expirations may occur"
8744 msgstr ""
8745
8746 #. type: Plain text
8747 #: build/C/man2/timer_getoverrun.2:87
8748 msgid ""
8749 "On success, B<timer_getoverrun>()  returns the overrun count of the "
8750 "specified timer; this count may be 0 if no overruns have occurred.  On "
8751 "failure, -1 is returned, and I<errno> is set to indicate the error."
8752 msgstr ""
8753
8754 #. type: Plain text
8755 #: build/C/man2/timer_getoverrun.2:108
8756 msgid ""
8757 "When timer notifications are delivered via signals (B<SIGEV_SIGNAL>), on "
8758 "Linux it is also possible to obtain the overrun count via the I<si_overrun> "
8759 "field of the I<siginfo_t> structure (see B<sigaction>(2)).  This allows an "
8760 "application to avoid the overhead of making a system call to obtain the "
8761 "overrun count, but is a nonportable extension to POSIX.1-2001."
8762 msgstr ""
8763
8764 #.  FIXME . Austin bug filed, 11 Feb 09
8765 #. type: Plain text
8766 #: build/C/man2/timer_getoverrun.2:112
8767 msgid ""
8768 "POSIX.1-2001 only discusses timer overruns in the context of timer "
8769 "notifications using signals."
8770 msgstr ""
8771
8772 #.  Bug filed: http://bugzilla.kernel.org/show_bug.cgi?id=12665
8773 #.  http://thread.gmane.org/gmane.linux.kernel/113276/
8774 #. type: Plain text
8775 #: build/C/man2/timer_getoverrun.2:125
8776 msgid ""
8777 "POSIX.1-2001 specifies that if the timer overrun count is equal to or "
8778 "greater than an implementation-defined maximum, B<DELAYTIMER_MAX>, then "
8779 "B<timer_getoverrun>()  should return B<DELAYTIMER_MAX>.  However, Linux does "
8780 "not implement this feature: instead, if the timer overrun value exceeds the "
8781 "maximum representable integer, the counter cycles, starting once more from "
8782 "low values."
8783 msgstr ""
8784
8785 #. type: Plain text
8786 #: build/C/man2/timer_getoverrun.2:128 build/C/man2/timer_settime.2:208
8787 msgid "See B<timer_create>(2)."
8788 msgstr ""
8789
8790 #. type: Plain text
8791 #: build/C/man2/timer_getoverrun.2:137
8792 msgid ""
8793 "B<clock_gettime>(2), B<sigaction>(2), B<signalfd>(2), B<sigwaitinfo>(2), "
8794 "B<timer_create>(2), B<timer_delete>(2), B<timer_settime>(2), B<signal>(7), "
8795 "B<time>(7)"
8796 msgstr ""
8797
8798 #. type: TH
8799 #: build/C/man2/timer_settime.2:23
8800 #, no-wrap
8801 msgid "TIMER_SETTIME"
8802 msgstr ""
8803
8804 #. type: Plain text
8805 #: build/C/man2/timer_settime.2:27
8806 msgid ""
8807 "timer_settime, timer_gettime - arm/disarm and fetch state of POSIX "
8808 "per-process timer"
8809 msgstr ""
8810
8811 #. type: Plain text
8812 #: build/C/man2/timer_settime.2:35
8813 #, no-wrap
8814 msgid ""
8815 "B<int timer_settime(timer_t >I<timerid>B<, int >I<flags>B<,>\n"
8816 "B<                  const struct itimerspec *>I<new_value>B<,>\n"
8817 "B<                  struct itimerspec * >I<old_value>B<);>\n"
8818 "B<int timer_gettime(timer_t >I<timerid>B<, struct itimerspec "
8819 "*>I<curr_value>B<);>\n"
8820 msgstr ""
8821
8822 #. type: Plain text
8823 #: build/C/man2/timer_settime.2:47
8824 msgid "B<timer_settime>(), B<timer_gettime>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8825 msgstr ""
8826
8827 #. type: Plain text
8828 #: build/C/man2/timer_settime.2:60
8829 msgid ""
8830 "B<timer_settime>()  arms or disarms the timer identified by I<timerid>.  The "
8831 "I<new_value> argument is an I<itimerspec> structure that specifies the new "
8832 "initial value and the new interval for the timer.  The I<itimerspec> "
8833 "structure is defined as follows:"
8834 msgstr ""
8835
8836 #. type: Plain text
8837 #: build/C/man2/timer_settime.2:67 build/C/man2/timerfd_create.2:127
8838 #, no-wrap
8839 msgid ""
8840 "struct timespec {\n"
8841 "    time_t tv_sec;                /* Seconds */\n"
8842 "    long   tv_nsec;               /* Nanoseconds */\n"
8843 "};\n"
8844 msgstr ""
8845
8846 #. type: Plain text
8847 #: build/C/man2/timer_settime.2:72
8848 #, no-wrap
8849 msgid ""
8850 "struct itimerspec {\n"
8851 "    struct timespec it_interval;  /* Timer interval */\n"
8852 "    struct timespec it_value;     /* Initial expiration */\n"
8853 "};\n"
8854 msgstr ""
8855
8856 #. type: Plain text
8857 #: build/C/man2/timer_settime.2:84
8858 msgid ""
8859 "Each of the substructures of the I<itimerspec> structure is a I<timespec> "
8860 "structure that allows a time value to be specified in seconds and "
8861 "nanoseconds.  These time values are measured according to the clock that was "
8862 "specified when the timer was created by B<timer_create>(2)"
8863 msgstr ""
8864
8865 #. type: Plain text
8866 #: build/C/man2/timer_settime.2:98
8867 msgid ""
8868 "If I<new_value-E<gt>it_value> specifies a nonzero value (i.e., either "
8869 "subfield is nonzero), then B<timer_settime>()  arms (starts) the timer, "
8870 "setting it to initially expire at the given time.  (If the timer was already "
8871 "armed, then the previous settings are overwritten.)  If "
8872 "I<new_value-E<gt>it_value> specifies a zero value (i.e., both subfields are "
8873 "zero), then the timer is disarmed."
8874 msgstr ""
8875
8876 #. type: Plain text
8877 #: build/C/man2/timer_settime.2:110
8878 msgid ""
8879 "The I<new_value-E<gt>it_interval> field specifies the period of the timer, "
8880 "in seconds and nanoseconds.  If this field is nonzero, then each time that "
8881 "an armed timer expires, the timer is reloaded from the value specified in "
8882 "I<new_value-E<gt>it_interval>.  If I<new_value-E<gt>it_interval> specifies a "
8883 "zero value then the timer expires just once, at the time specified by "
8884 "I<it_value>."
8885 msgstr ""
8886
8887 #.  By experiment: the overrun count is set correctly, for CLOCK_REALTIME.
8888 #. type: Plain text
8889 #: build/C/man2/timer_settime.2:131
8890 msgid ""
8891 "By default, the initial expiration time specified in "
8892 "I<new_value-E<gt>it_value> is interpreted relative to the current time on "
8893 "the timer's clock at the time of the call.  This can be modified by "
8894 "specifying B<TIMER_ABSTIME> in I<flags>, in which case "
8895 "I<new_value-E<gt>it_value> is interpreted as an absolute value as measured "
8896 "on the timer's clock; that is, the timer will expire when the clock value "
8897 "reaches the value specified by I<new_value-E<gt>it_value>.  If the specified "
8898 "absolute time has already passed, then the timer expires immediately, and "
8899 "the overrun count (see B<timer_getoverrun>(2))  will be set correctly."
8900 msgstr ""
8901
8902 #.  Similar remarks might apply with respect to process and thread CPU time
8903 #.  clocks, but these clocks are not currently (2.6.28) settable on Linux.
8904 #. type: Plain text
8905 #: build/C/man2/timer_settime.2:141
8906 msgid ""
8907 "If the value of the B<CLOCK_REALTIME> clock is adjusted while an absolute "
8908 "timer based on that clock is armed, then the expiration of the timer will be "
8909 "appropriately adjusted.  Adjustments to the B<CLOCK_REALTIME> clock have no "
8910 "effect on relative timers based on that clock."
8911 msgstr ""
8912
8913 #. type: Plain text
8914 #: build/C/man2/timer_settime.2:149
8915 msgid ""
8916 "If I<old_value> is not NULL, then it returns the previous interval of the "
8917 "timer (in I<old_value-E<gt>it_interval>)  and the amount of time until the "
8918 "timer would previously have next expired (in I<old_value-E<gt>it_value>)."
8919 msgstr ""
8920
8921 #. type: Plain text
8922 #: build/C/man2/timer_settime.2:169
8923 msgid ""
8924 "B<timer_gettime>()  returns the time until next expiration, and the "
8925 "interval, for the timer specified by I<timerid>, in the buffer pointed to by "
8926 "I<curr_value>.  The time remaining until the next timer expiration is "
8927 "returned in I<curr_value-E<gt>it_value>; this is always a relative value, "
8928 "regardless of whether the B<TIMER_ABSTIME> flag was used when arming the "
8929 "timer.  If the value returned in I<curr_value-E<gt>it_value> is zero, then "
8930 "the timer is currently disarmed.  The timer interval is returned in "
8931 "I<curr_value-E<gt>it_interval>.  If the value returned in "
8932 "I<curr_value-E<gt>it_interval> is zero, then this is a \"one-shot\" timer."
8933 msgstr ""
8934
8935 #. type: Plain text
8936 #: build/C/man2/timer_settime.2:178
8937 msgid ""
8938 "On success, B<timer_settime>()  and B<timer_gettime>()  return 0.  On error, "
8939 "-1 is returned, and I<errno> is set to indicate the error."
8940 msgstr ""
8941
8942 #. type: Plain text
8943 #: build/C/man2/timer_settime.2:180
8944 msgid "These functions may fail with the following errors:"
8945 msgstr ""
8946
8947 #. type: Plain text
8948 #: build/C/man2/timer_settime.2:187
8949 msgid "I<new_value>, I<old_value>, or I<curr_value> is not a valid pointer."
8950 msgstr ""
8951
8952 #.  FIXME . eventually: invalid value in flags
8953 #. type: Plain text
8954 #: build/C/man2/timer_settime.2:192
8955 msgid "I<timerid> is invalid."
8956 msgstr ""
8957
8958 #. type: Plain text
8959 #: build/C/man2/timer_settime.2:195
8960 msgid "B<timer_settime>()  may fail with the following errors:"
8961 msgstr ""
8962
8963 #. type: Plain text
8964 #: build/C/man2/timer_settime.2:201
8965 msgid ""
8966 "I<new_value.it_value> is negative; or I<new_value.it_value.tv_nsec> is "
8967 "negative or greater than 999,999,999."
8968 msgstr ""
8969
8970 #. type: Plain text
8971 #: build/C/man2/timer_settime.2:203
8972 msgid "These system calls are available since Linux 2.6."
8973 msgstr ""
8974
8975 #. type: Plain text
8976 #: build/C/man2/timer_settime.2:211
8977 msgid "B<timer_create>(2), B<timer_getoverrun>(2), B<time>(7)"
8978 msgstr ""
8979
8980 #. type: TH
8981 #: build/C/man2/timerfd_create.2:20
8982 #, no-wrap
8983 msgid "TIMERFD_CREATE"
8984 msgstr ""
8985
8986 #. type: TH
8987 #: build/C/man2/timerfd_create.2:20
8988 #, no-wrap
8989 msgid "2011-09-14"
8990 msgstr ""
8991
8992 #. type: Plain text
8993 #: build/C/man2/timerfd_create.2:24
8994 msgid ""
8995 "timerfd_create, timerfd_settime, timerfd_gettime - timers that notify via "
8996 "file descriptors"
8997 msgstr ""
8998
8999 #. type: Plain text
9000 #: build/C/man2/timerfd_create.2:27
9001 #, no-wrap
9002 msgid "B<#include E<lt>sys/timerfd.hE<gt>>\n"
9003 msgstr ""
9004
9005 #. type: Plain text
9006 #: build/C/man2/timerfd_create.2:29
9007 #, no-wrap
9008 msgid "B<int timerfd_create(int >I<clockid>B<, int >I<flags>B<);>\n"
9009 msgstr ""
9010
9011 #. type: Plain text
9012 #: build/C/man2/timerfd_create.2:33
9013 #, no-wrap
9014 msgid ""
9015 "B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n"
9016 "B<                    const struct itimerspec *>I<new_value>B<,>\n"
9017 "B<                    struct itimerspec *>I<old_value>B<);>\n"
9018 msgstr ""
9019
9020 #. type: Plain text
9021 #: build/C/man2/timerfd_create.2:35
9022 #, no-wrap
9023 msgid "B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n"
9024 msgstr ""
9025
9026 #. type: Plain text
9027 #: build/C/man2/timerfd_create.2:48
9028 msgid ""
9029 "These system calls create and operate on a timer that delivers timer "
9030 "expiration notifications via a file descriptor.  They provide an alternative "
9031 "to the use of B<setitimer>(2)  or B<timer_create>(2), with the advantage "
9032 "that the file descriptor may be monitored by B<select>(2), B<poll>(2), and "
9033 "B<epoll>(7)."
9034 msgstr ""
9035
9036 #. type: Plain text
9037 #: build/C/man2/timerfd_create.2:60
9038 msgid ""
9039 "The use of these three system calls is analogous to the use of "
9040 "B<timer_create>(2), B<timer_settime>(2), and B<timer_gettime>(2).  (There is "
9041 "no analog of B<timer_getoverrun>(2), since that functionality is provided by "
9042 "B<read>(2), as described below.)"
9043 msgstr ""
9044
9045 #. type: SS
9046 #: build/C/man2/timerfd_create.2:60
9047 #, no-wrap
9048 msgid "timerfd_create()"
9049 msgstr ""
9050
9051 #. type: Plain text
9052 #: build/C/man2/timerfd_create.2:79
9053 msgid ""
9054 "B<timerfd_create>()  creates a new timer object, and returns a file "
9055 "descriptor that refers to that timer.  The I<clockid> argument specifies the "
9056 "clock that is used to mark the progress of the timer, and must be either "
9057 "B<CLOCK_REALTIME> or B<CLOCK_MONOTONIC>.  B<CLOCK_REALTIME> is a settable "
9058 "system-wide clock.  B<CLOCK_MONOTONIC> is a nonsettable clock that is not "
9059 "affected by discontinuous changes in the system clock (e.g., manual changes "
9060 "to system time).  The current value of each of these clocks can be retrieved "
9061 "using B<clock_gettime>(2)."
9062 msgstr ""
9063
9064 #. type: Plain text
9065 #: build/C/man2/timerfd_create.2:84
9066 msgid ""
9067 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
9068 "I<flags> to change the behavior of B<timerfd_create>():"
9069 msgstr ""
9070
9071 #. type: TP
9072 #: build/C/man2/timerfd_create.2:84
9073 #, no-wrap
9074 msgid "B<TFD_NONBLOCK>"
9075 msgstr ""
9076
9077 #. type: TP
9078 #: build/C/man2/timerfd_create.2:92
9079 #, no-wrap
9080 msgid "B<TFD_CLOEXEC>"
9081 msgstr ""
9082
9083 #. type: Plain text
9084 #: build/C/man2/timerfd_create.2:106
9085 msgid ""
9086 "In Linux versions up to and including 2.6.26, I<flags> must be specified as "
9087 "zero."
9088 msgstr ""
9089
9090 #. type: SS
9091 #: build/C/man2/timerfd_create.2:106
9092 #, no-wrap
9093 msgid "timerfd_settime()"
9094 msgstr ""
9095
9096 #. type: Plain text
9097 #: build/C/man2/timerfd_create.2:111
9098 msgid ""
9099 "B<timerfd_settime>()  arms (starts) or disarms (stops)  the timer referred "
9100 "to by the file descriptor I<fd>."
9101 msgstr ""
9102
9103 #. type: Plain text
9104 #: build/C/man2/timerfd_create.2:120
9105 msgid ""
9106 "The I<new_value> argument specifies the initial expiration and interval for "
9107 "the timer.  The I<itimer> structure used for this argument contains two "
9108 "fields, each of which is in turn a structure of type I<timespec>:"
9109 msgstr ""
9110
9111 #. type: Plain text
9112 #: build/C/man2/timerfd_create.2:132
9113 #, no-wrap
9114 msgid ""
9115 "struct itimerspec {\n"
9116 "    struct timespec it_interval;  /* Interval for periodic timer */\n"
9117 "    struct timespec it_value;     /* Initial expiration */\n"
9118 "};\n"
9119 msgstr ""
9120
9121 #. type: Plain text
9122 #: build/C/man2/timerfd_create.2:144
9123 msgid ""
9124 "I<new_value.it_value> specifies the initial expiration of the timer, in "
9125 "seconds and nanoseconds.  Setting either field of I<new_value.it_value> to a "
9126 "nonzero value arms the timer.  Setting both fields of I<new_value.it_value> "
9127 "to zero disarms the timer."
9128 msgstr ""
9129
9130 #. type: Plain text
9131 #: build/C/man2/timerfd_create.2:153
9132 msgid ""
9133 "Setting one or both fields of I<new_value.it_interval> to nonzero values "
9134 "specifies the period, in seconds and nanoseconds, for repeated timer "
9135 "expirations after the initial expiration.  If both fields of "
9136 "I<new_value.it_interval> are zero, the timer expires just once, at the time "
9137 "specified by I<new_value.it_value>."
9138 msgstr ""
9139
9140 #. type: Plain text
9141 #: build/C/man2/timerfd_create.2:169
9142 msgid ""
9143 "The I<flags> argument is either 0, to start a relative timer "
9144 "(I<new_value.it_value> specifies a time relative to the current value of the "
9145 "clock specified by I<clockid>), or B<TFD_TIMER_ABSTIME>, to start an "
9146 "absolute timer (I<new_value.it_value> specifies an absolute time for the "
9147 "clock specified by I<clockid>; that is, the timer will expire when the value "
9148 "of that clock reaches the value specified in I<new_value.it_value>)."
9149 msgstr ""
9150
9151 #. type: Plain text
9152 #: build/C/man2/timerfd_create.2:180
9153 msgid ""
9154 "If the I<old_value> argument is not NULL, then the I<itimerspec> structure "
9155 "that it points to is used to return the setting of the timer that was "
9156 "current at the time of the call; see the description of B<timerfd_gettime>()  "
9157 "following."
9158 msgstr ""
9159
9160 #. type: SS
9161 #: build/C/man2/timerfd_create.2:180
9162 #, no-wrap
9163 msgid "timerfd_gettime()"
9164 msgstr ""
9165
9166 #. type: Plain text
9167 #: build/C/man2/timerfd_create.2:189
9168 msgid ""
9169 "B<timerfd_gettime>()  returns, in I<curr_value>, an I<itimerspec> structure "
9170 "that contains the current setting of the timer referred to by the file "
9171 "descriptor I<fd>."
9172 msgstr ""
9173
9174 #. type: Plain text
9175 #: build/C/man2/timerfd_create.2:199
9176 msgid ""
9177 "The I<it_value> field returns the amount of time until the timer will next "
9178 "expire.  If both fields of this structure are zero, then the timer is "
9179 "currently disarmed.  This field always contains a relative value, regardless "
9180 "of whether the B<TFD_TIMER_ABSTIME> flag was specified when setting the "
9181 "timer."
9182 msgstr ""
9183
9184 #. type: Plain text
9185 #: build/C/man2/timerfd_create.2:206
9186 msgid ""
9187 "The I<it_interval> field returns the interval of the timer.  If both fields "
9188 "of this structure are zero, then the timer is set to expire just once, at "
9189 "the time specified by I<curr_value.it_value>."
9190 msgstr ""
9191
9192 #. type: SS
9193 #: build/C/man2/timerfd_create.2:206
9194 #, no-wrap
9195 msgid "Operating on a timer file descriptor"
9196 msgstr ""
9197
9198 #. type: Plain text
9199 #: build/C/man2/timerfd_create.2:210
9200 msgid ""
9201 "The file descriptor returned by B<timerfd_create>()  supports the following "
9202 "operations:"
9203 msgstr ""
9204
9205 #. type: Plain text
9206 #: build/C/man2/timerfd_create.2:224
9207 msgid ""
9208 "If the timer has already expired one or more times since its settings were "
9209 "last modified using B<timerfd_settime>(), or since the last successful "
9210 "B<read>(2), then the buffer given to B<read>(2)  returns an unsigned 8-byte "
9211 "integer (I<uint64_t>)  containing the number of expirations that have "
9212 "occurred.  (The returned value is in host byte order, i.e., the native byte "
9213 "order for integers on the host machine.)"
9214 msgstr ""
9215
9216 #. type: Plain text
9217 #: build/C/man2/timerfd_create.2:237
9218 msgid ""
9219 "If no timer expirations have occurred at the time of the B<read>(2), then "
9220 "the call either blocks until the next timer expiration, or fails with the "
9221 "error B<EAGAIN> if the file descriptor has been made nonblocking (via the "
9222 "use of the B<fcntl>(2)  B<F_SETFL> operation to set the B<O_NONBLOCK> flag)."
9223 msgstr ""
9224
9225 #. type: Plain text
9226 #: build/C/man2/timerfd_create.2:243
9227 msgid ""
9228 "A B<read>(2)  will fail with the error B<EINVAL> if the size of the supplied "
9229 "buffer is less than 8 bytes."
9230 msgstr ""
9231
9232 #. type: Plain text
9233 #: build/C/man2/timerfd_create.2:254
9234 msgid ""
9235 "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the "
9236 "B<poll>(2)  B<POLLIN> flag)  if one or more timer expirations have occurred."
9237 msgstr ""
9238
9239 #. type: Plain text
9240 #: build/C/man2/timerfd_create.2:261
9241 msgid ""
9242 "The file descriptor also supports the other file-descriptor multiplexing "
9243 "APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
9244 msgstr ""
9245
9246 #. type: Plain text
9247 #: build/C/man2/timerfd_create.2:268
9248 msgid ""
9249 "When the file descriptor is no longer required it should be closed.  When "
9250 "all file descriptors associated with the same timer object have been closed, "
9251 "the timer is disarmed and its resources are freed by the kernel."
9252 msgstr ""
9253
9254 #. type: Plain text
9255 #: build/C/man2/timerfd_create.2:280
9256 msgid ""
9257 "After a B<fork>(2), the child inherits a copy of the file descriptor created "
9258 "by B<timerfd_create>().  The file descriptor refers to the same underlying "
9259 "timer object as the corresponding file descriptor in the parent, and "
9260 "B<read>(2)s in the child will return information about expirations of the "
9261 "timer."
9262 msgstr ""
9263
9264 #. type: Plain text
9265 #: build/C/man2/timerfd_create.2:286
9266 msgid ""
9267 "A file descriptor created by B<timerfd_create>()  is preserved across "
9268 "B<execve>(2), and continues to generate timer expirations if the timer was "
9269 "armed."
9270 msgstr ""
9271
9272 #. type: Plain text
9273 #: build/C/man2/timerfd_create.2:293
9274 msgid ""
9275 "On success, B<timerfd_create>()  returns a new file descriptor.  On error, "
9276 "-1 is returned and I<errno> is set to indicate the error."
9277 msgstr ""
9278
9279 #. type: Plain text
9280 #: build/C/man2/timerfd_create.2:301
9281 msgid ""
9282 "B<timerfd_settime>()  and B<timerfd_gettime>()  return 0 on success; on "
9283 "error they return -1, and set I<errno> to indicate the error."
9284 msgstr ""
9285
9286 #. type: Plain text
9287 #: build/C/man2/timerfd_create.2:304
9288 msgid "B<timerfd_create>()  can fail with the following errors:"
9289 msgstr ""
9290
9291 #. type: Plain text
9292 #: build/C/man2/timerfd_create.2:312
9293 msgid "The I<clockid> argument is neither B<CLOCK_MONOTONIC> nor B<CLOCK_REALTIME>;"
9294 msgstr ""
9295
9296 #. type: Plain text
9297 #: build/C/man2/timerfd_create.2:332
9298 msgid "There was insufficient kernel memory to create the timer."
9299 msgstr ""
9300
9301 #. type: Plain text
9302 #: build/C/man2/timerfd_create.2:337
9303 msgid ""
9304 "B<timerfd_settime>()  and B<timerfd_gettime>()  can fail with the following "
9305 "errors:"
9306 msgstr ""
9307
9308 #. type: Plain text
9309 #: build/C/man2/timerfd_create.2:341
9310 msgid "I<fd> is not a valid file descriptor."
9311 msgstr ""
9312
9313 #. type: Plain text
9314 #: build/C/man2/timerfd_create.2:352
9315 msgid "I<fd> is not a valid timerfd file descriptor."
9316 msgstr ""
9317
9318 #. type: Plain text
9319 #: build/C/man2/timerfd_create.2:355
9320 msgid "B<timerfd_settime>()  can also fail with the following errors:"
9321 msgstr ""
9322
9323 #. type: Plain text
9324 #: build/C/man2/timerfd_create.2:361
9325 msgid ""
9326 "I<new_value> is not properly initialized (one of the I<tv_nsec> falls "
9327 "outside the range zero to 999,999,999)."
9328 msgstr ""
9329
9330 #.  This case only checked since 2.6.29, and 2.2.2[78].some-stable-version.
9331 #.  In older kernel versions, no check was made for invalid flags.
9332 #. type: Plain text
9333 #: build/C/man2/timerfd_create.2:367
9334 msgid "I<flags> is invalid."
9335 msgstr ""
9336
9337 #. type: Plain text
9338 #: build/C/man2/timerfd_create.2:370
9339 msgid ""
9340 "These system calls are available on Linux since kernel 2.6.25.  Library "
9341 "support is provided by glibc since version 2.8."
9342 msgstr ""
9343
9344 #. type: Plain text
9345 #: build/C/man2/timerfd_create.2:381
9346 msgid ""
9347 "The following program creates a timer and then monitors its progress.  The "
9348 "program accepts up to three command-line arguments.  The first argument "
9349 "specifies the number of seconds for the initial expiration of the timer.  "
9350 "The second argument specifies the interval for the timer, in seconds.  The "
9351 "third argument specifies the number of times the program should allow the "
9352 "timer to expire before terminating.  The second and third command-line "
9353 "arguments are optional."
9354 msgstr ""
9355
9356 #. type: Plain text
9357 #: build/C/man2/timerfd_create.2:383 build/C/man2/wait.2:541
9358 msgid "The following shell session demonstrates the use of the program:"
9359 msgstr ""
9360
9361 #. type: Plain text
9362 #: build/C/man2/timerfd_create.2:398
9363 #, no-wrap
9364 msgid ""
9365 "$B< a.out 3 1 100>\n"
9366 "0.000: timer started\n"
9367 "3.000: read: 1; total=1\n"
9368 "4.000: read: 1; total=2\n"
9369 "B<^Z >                 # type control-Z to suspend the program\n"
9370 "[1]+  Stopped                 ./timerfd3_demo 3 1 100\n"
9371 "$ B<fg>                # Resume execution after a few seconds\n"
9372 "a.out 3 1 100\n"
9373 "9.660: read: 5; total=7\n"
9374 "10.000: read: 1; total=8\n"
9375 "11.000: read: 1; total=9\n"
9376 "B<^C >                 # type control-C to suspend the program\n"
9377 msgstr ""
9378
9379 #.  The commented out code here is what we currently need until
9380 #.  the required stuff is in glibc
9381 #
9382 #
9383 #. /* Link with -lrt */
9384 #. #define _GNU_SOURCE
9385 #. #include <sys/syscall.h>
9386 #. #include <unistd.h>
9387 #. #include <time.h>
9388 #. #if defined(__i386__)
9389 #. #define __NR_timerfd_create 322
9390 #. #define __NR_timerfd_settime 325
9391 #. #define __NR_timerfd_gettime 326
9392 #. #endif
9393 #
9394 #. static int
9395 #. timerfd_create(int clockid, int flags)
9396 #. {
9397 #.     return syscall(__NR_timerfd_create, clockid, flags);
9398 #. }
9399 #
9400 #. static int
9401 #. timerfd_settime(int fd, int flags, struct itimerspec *new_value,
9402 #.         struct itimerspec *curr_value)
9403 #. {
9404 #.     return syscall(__NR_timerfd_settime, fd, flags, new_value,
9405 #.                    curr_value);
9406 #. }
9407 #
9408 #. static int
9409 #. timerfd_gettime(int fd, struct itimerspec *curr_value)
9410 #. {
9411 #.     return syscall(__NR_timerfd_gettime, fd, curr_value);
9412 #. }
9413 #
9414 #. #define TFD_TIMER_ABSTIME (1 << 0)
9415 #
9416 #. ////////////////////////////////////////////////////////////
9417 #. type: Plain text
9418 #: build/C/man2/timerfd_create.2:447
9419 #, no-wrap
9420 msgid ""
9421 "#include E<lt>sys/timerfd.hE<gt>\n"
9422 "#include E<lt>time.hE<gt>\n"
9423 "#include E<lt>unistd.hE<gt>\n"
9424 "#include E<lt>stdlib.hE<gt>\n"
9425 "#include E<lt>stdio.hE<gt>\n"
9426 "#include E<lt>stdint.hE<gt>        /* Definition of uint64_t */\n"
9427 msgstr ""
9428
9429 #. type: Plain text
9430 #: build/C/man2/timerfd_create.2:450
9431 #, no-wrap
9432 msgid ""
9433 "#define handle_error(msg) \\e\n"
9434 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
9435 msgstr ""
9436
9437 #. type: Plain text
9438 #: build/C/man2/timerfd_create.2:458
9439 #, no-wrap
9440 msgid ""
9441 "static void\n"
9442 "print_elapsed_time(void)\n"
9443 "{\n"
9444 "    static struct timespec start;\n"
9445 "    struct timespec curr;\n"
9446 "    static int first_call = 1;\n"
9447 "    int secs, nsecs;\n"
9448 msgstr ""
9449
9450 #. type: Plain text
9451 #: build/C/man2/timerfd_create.2:464
9452 #, no-wrap
9453 msgid ""
9454 "    if (first_call) {\n"
9455 "        first_call = 0;\n"
9456 "        if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
9457 "            handle_error(\"clock_gettime\");\n"
9458 "    }\n"
9459 msgstr ""
9460
9461 #. type: Plain text
9462 #: build/C/man2/timerfd_create.2:467
9463 #, no-wrap
9464 msgid ""
9465 "    if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
9466 "        handle_error(\"clock_gettime\");\n"
9467 msgstr ""
9468
9469 #. type: Plain text
9470 #: build/C/man2/timerfd_create.2:476
9471 #, no-wrap
9472 msgid ""
9473 "    secs = curr.tv_sec - start.tv_sec;\n"
9474 "    nsecs = curr.tv_nsec - start.tv_nsec;\n"
9475 "    if (nsecs E<lt> 0) {\n"
9476 "        secs--;\n"
9477 "        nsecs += 1000000000;\n"
9478 "    }\n"
9479 "    printf(\"%d.%03d: \", secs, (nsecs + 500000) / 1000000);\n"
9480 "}\n"
9481 msgstr ""
9482
9483 #. type: Plain text
9484 #: build/C/man2/timerfd_create.2:485
9485 #, no-wrap
9486 msgid ""
9487 "int\n"
9488 "main(int argc, char *argv[])\n"
9489 "{\n"
9490 "    struct itimerspec new_value;\n"
9491 "    int max_exp, fd;\n"
9492 "    struct timespec now;\n"
9493 "    uint64_t exp, tot_exp;\n"
9494 "    ssize_t s;\n"
9495 msgstr ""
9496
9497 #. type: Plain text
9498 #: build/C/man2/timerfd_create.2:491
9499 #, no-wrap
9500 msgid ""
9501 "    if ((argc != 2) && (argc != 4)) {\n"
9502 "        fprintf(stderr, \"%s init-secs [interval-secs max-exp]\\en\",\n"
9503 "                argv[0]);\n"
9504 "        exit(EXIT_FAILURE);\n"
9505 "    }\n"
9506 msgstr ""
9507
9508 #. type: Plain text
9509 #: build/C/man2/timerfd_create.2:494
9510 #, no-wrap
9511 msgid ""
9512 "    if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
9513 "        handle_error(\"clock_gettime\");\n"
9514 msgstr ""
9515
9516 #. type: Plain text
9517 #: build/C/man2/timerfd_create.2:497
9518 #, no-wrap
9519 msgid ""
9520 "    /* Create a CLOCK_REALTIME absolute timer with initial\n"
9521 "       expiration and interval as specified in command line */\n"
9522 msgstr ""
9523
9524 #. type: Plain text
9525 #: build/C/man2/timerfd_create.2:508
9526 #, no-wrap
9527 msgid ""
9528 "    new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
9529 "    new_value.it_value.tv_nsec = now.tv_nsec;\n"
9530 "    if (argc == 2) {\n"
9531 "        new_value.it_interval.tv_sec = 0;\n"
9532 "        max_exp = 1;\n"
9533 "    } else {\n"
9534 "        new_value.it_interval.tv_sec = atoi(argv[2]);\n"
9535 "        max_exp = atoi(argv[3]);\n"
9536 "    }\n"
9537 "    new_value.it_interval.tv_nsec = 0;\n"
9538 msgstr ""
9539
9540 #. type: Plain text
9541 #: build/C/man2/timerfd_create.2:512
9542 #, no-wrap
9543 msgid ""
9544 "    fd = timerfd_create(CLOCK_REALTIME, 0);\n"
9545 "    if (fd == -1)\n"
9546 "        handle_error(\"timerfd_create\");\n"
9547 msgstr ""
9548
9549 #. type: Plain text
9550 #: build/C/man2/timerfd_create.2:515
9551 #, no-wrap
9552 msgid ""
9553 "    if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
9554 "        handle_error(\"timerfd_settime\");\n"
9555 msgstr ""
9556
9557 #. type: Plain text
9558 #: build/C/man2/timerfd_create.2:518
9559 #, no-wrap
9560 msgid ""
9561 "    print_elapsed_time();\n"
9562 "    printf(\"timer started\\en\");\n"
9563 msgstr ""
9564
9565 #. type: Plain text
9566 #: build/C/man2/timerfd_create.2:523
9567 #, no-wrap
9568 msgid ""
9569 "    for (tot_exp = 0; tot_exp E<lt> max_exp;) {\n"
9570 "        s = read(fd, &exp, sizeof(uint64_t));\n"
9571 "        if (s != sizeof(uint64_t))\n"
9572 "            handle_error(\"read\");\n"
9573 msgstr ""
9574
9575 #. type: Plain text
9576 #: build/C/man2/timerfd_create.2:530
9577 #, no-wrap
9578 msgid ""
9579 "        tot_exp += exp;\n"
9580 "        print_elapsed_time();\n"
9581 "        printf(\"read: %llu; total=%llu\\en\",\n"
9582 "                (unsigned long long) exp,\n"
9583 "                (unsigned long long) tot_exp);\n"
9584 "    }\n"
9585 msgstr ""
9586
9587 #.  2.6.29
9588 #. type: Plain text
9589 #: build/C/man2/timerfd_create.2:540
9590 msgid ""
9591 "Currently, B<timerfd_create>()  supports fewer types of clock IDs than "
9592 "B<timer_create>(2)."
9593 msgstr ""
9594
9595 #. type: Plain text
9596 #: build/C/man2/timerfd_create.2:551
9597 msgid ""
9598 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), "
9599 "B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), "
9600 "B<timer_settime>(2), B<epoll>(7), B<time>(7)"
9601 msgstr ""
9602
9603 #. type: TH
9604 #: build/C/man2/tkill.2:29
9605 #, no-wrap
9606 msgid "TKILL"
9607 msgstr ""
9608
9609 #. type: Plain text
9610 #: build/C/man2/tkill.2:32
9611 msgid "tkill, tgkill - send a signal to a thread"
9612 msgstr ""
9613
9614 #. type: Plain text
9615 #: build/C/man2/tkill.2:35
9616 #, no-wrap
9617 msgid "B<int tkill(int >I<tid>B<, int >I<sig>B<);>\n"
9618 msgstr ""
9619
9620 #. type: Plain text
9621 #: build/C/man2/tkill.2:37
9622 #, no-wrap
9623 msgid "B<int tgkill(int >I<tgid>B<, int >I<tid>B<, int >I<sig>B<);>\n"
9624 msgstr ""
9625
9626 #. type: Plain text
9627 #: build/C/man2/tkill.2:51
9628 msgid ""
9629 "B<tgkill>()  sends the signal I<sig> to the thread with the thread ID I<tid> "
9630 "in the thread group I<tgid>.  (By contrast, B<kill>(2)  can only be used to "
9631 "send a signal to a process (i.e., thread group)  as a whole, and the signal "
9632 "will be delivered to an arbitrary thread within that process.)"
9633 msgstr ""
9634
9635 #. type: Plain text
9636 #: build/C/man2/tkill.2:59
9637 msgid ""
9638 "B<tkill>()  is an obsolete predecessor to B<tgkill>().  It only allows the "
9639 "target thread ID to be specified, which may result in the wrong thread being "
9640 "signaled if a thread terminates and its thread ID is recycled.  Avoid using "
9641 "this system call."
9642 msgstr ""
9643
9644 #. type: Plain text
9645 #: build/C/man2/tkill.2:66
9646 msgid "If I<tgid> is specified as -1, B<tgkill>()  is equivalent to B<tkill>()."
9647 msgstr ""
9648
9649 #. type: Plain text
9650 #: build/C/man2/tkill.2:69
9651 msgid ""
9652 "These are the raw system call interfaces, meant for internal thread library "
9653 "use."
9654 msgstr ""
9655
9656 #. type: Plain text
9657 #: build/C/man2/tkill.2:77
9658 msgid "An invalid thread ID, thread group ID, or signal was specified."
9659 msgstr ""
9660
9661 #. type: Plain text
9662 #: build/C/man2/tkill.2:82
9663 msgid "Permission denied.  For the required permissions, see B<kill>(2)."
9664 msgstr ""
9665
9666 #. type: Plain text
9667 #: build/C/man2/tkill.2:85
9668 msgid "No process with the specified thread ID (and thread group ID) exists."
9669 msgstr ""
9670
9671 #. type: Plain text
9672 #: build/C/man2/tkill.2:90
9673 msgid ""
9674 "B<tkill>()  is supported since Linux 2.4.19 / 2.5.4.  B<tgkill>()  was added "
9675 "in Linux 2.5.75."
9676 msgstr ""
9677
9678 #. type: Plain text
9679 #: build/C/man2/tkill.2:96
9680 msgid ""
9681 "B<tkill>()  and B<tgkill>()  are Linux-specific and should not be used in "
9682 "programs that are intended to be portable."
9683 msgstr ""
9684
9685 #. type: Plain text
9686 #: build/C/man2/tkill.2:102
9687 msgid ""
9688 "See the description of B<CLONE_THREAD> in B<clone>(2)  for an explanation of "
9689 "thread groups."
9690 msgstr ""
9691
9692 #. type: Plain text
9693 #: build/C/man2/tkill.2:105
9694 msgid ""
9695 "Glibc does not provide wrappers for these system calls; call them using "
9696 "B<syscall>(2)."
9697 msgstr ""
9698
9699 #. type: Plain text
9700 #: build/C/man2/tkill.2:109
9701 msgid "B<clone>(2), B<gettid>(2), B<kill>(2), B<rt_sigqueueinfo>(2)"
9702 msgstr ""
9703
9704 #. type: TH
9705 #: build/C/man2/wait.2:50
9706 #, no-wrap
9707 msgid "WAIT"
9708 msgstr ""
9709
9710 #. type: Plain text
9711 #: build/C/man2/wait.2:53
9712 msgid "wait, waitpid, waitid - wait for process to change state"
9713 msgstr ""
9714
9715 #. type: Plain text
9716 #: build/C/man2/wait.2:55
9717 msgid "B<#include E<lt>sys/types.hE<gt>>"
9718 msgstr ""
9719
9720 #. type: Plain text
9721 #: build/C/man2/wait.2:57
9722 msgid "B<#include E<lt>sys/wait.hE<gt>>"
9723 msgstr ""
9724
9725 #. type: Plain text
9726 #: build/C/man2/wait.2:59
9727 msgid "B<pid_t wait(int *>I<status>B<);>"
9728 msgstr ""
9729
9730 #. type: Plain text
9731 #: build/C/man2/wait.2:61
9732 msgid "B<pid_t waitpid(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<);>"
9733 msgstr ""
9734
9735 #. type: Plain text
9736 #: build/C/man2/wait.2:64
9737 msgid ""
9738 "B<int waitid(idtype_t >I<idtype>B<, id_t >I<id>B<, siginfo_t *>I<infop>B<, "
9739 "int >I<options>B<);>"
9740 msgstr ""
9741
9742 #. type: Plain text
9743 #: build/C/man2/wait.2:73
9744 msgid "B<waitid>():"
9745 msgstr ""
9746
9747 #. type: Plain text
9748 #: build/C/man2/wait.2:77
9749 msgid ""
9750 "_SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9751 "_XOPEN_SOURCE_EXTENDED"
9752 msgstr ""
9753
9754 #. type: Plain text
9755 #: build/C/man2/wait.2:92
9756 msgid ""
9757 "All of these system calls are used to wait for state changes in a child of "
9758 "the calling process, and obtain information about the child whose state has "
9759 "changed.  A state change is considered to be: the child terminated; the "
9760 "child was stopped by a signal; or the child was resumed by a signal.  In the "
9761 "case of a terminated child, performing a wait allows the system to release "
9762 "the resources associated with the child; if a wait is not performed, then "
9763 "the terminated child remains in a \"zombie\" state (see NOTES below)."
9764 msgstr ""
9765
9766 #. type: Plain text
9767 #: build/C/man2/wait.2:104
9768 msgid ""
9769 "If a child has already changed state, then these calls return immediately.  "
9770 "Otherwise they block until either a child changes state or a signal handler "
9771 "interrupts the call (assuming that system calls are not automatically "
9772 "restarted using the B<SA_RESTART> flag of B<sigaction>(2)).  In the "
9773 "remainder of this page, a child whose state has changed and which has not "
9774 "yet been waited upon by one of these system calls is termed I<waitable>."
9775 msgstr ""
9776
9777 #. type: SS
9778 #: build/C/man2/wait.2:104
9779 #, no-wrap
9780 msgid "wait() and waitpid()"
9781 msgstr ""
9782
9783 #. type: Plain text
9784 #: build/C/man2/wait.2:112
9785 msgid ""
9786 "The B<wait>()  system call suspends execution of the calling process until "
9787 "one of its children terminates.  The call I<wait(&status)> is equivalent to:"
9788 msgstr ""
9789
9790 #. type: Plain text
9791 #: build/C/man2/wait.2:115
9792 #, no-wrap
9793 msgid "    waitpid(-1, &status, 0);\n"
9794 msgstr ""
9795
9796 #. type: Plain text
9797 #: build/C/man2/wait.2:129
9798 msgid ""
9799 "The B<waitpid>()  system call suspends execution of the calling process "
9800 "until a child specified by I<pid> argument has changed state.  By default, "
9801 "B<waitpid>()  waits only for terminated children, but this behavior is "
9802 "modifiable via the I<options> argument, as described below."
9803 msgstr ""
9804
9805 #. type: Plain text
9806 #: build/C/man2/wait.2:133
9807 msgid "The value of I<pid> can be:"
9808 msgstr ""
9809
9810 #. type: IP
9811 #: build/C/man2/wait.2:133
9812 #, no-wrap
9813 msgid "E<lt> -1"
9814 msgstr ""
9815
9816 #. type: Plain text
9817 #: build/C/man2/wait.2:137
9818 msgid ""
9819 "meaning wait for any child process whose process group ID is equal to the "
9820 "absolute value of I<pid>."
9821 msgstr ""
9822
9823 #. type: IP
9824 #: build/C/man2/wait.2:137
9825 #, no-wrap
9826 msgid "-1"
9827 msgstr ""
9828
9829 #. type: Plain text
9830 #: build/C/man2/wait.2:139
9831 msgid "meaning wait for any child process."
9832 msgstr ""
9833
9834 #. type: IP
9835 #: build/C/man2/wait.2:139
9836 #, no-wrap
9837 msgid "0"
9838 msgstr ""
9839
9840 #. type: Plain text
9841 #: build/C/man2/wait.2:142
9842 msgid ""
9843 "meaning wait for any child process whose process group ID is equal to that "
9844 "of the calling process."
9845 msgstr ""
9846
9847 #. type: IP
9848 #: build/C/man2/wait.2:142
9849 #, no-wrap
9850 msgid "E<gt> 0"
9851 msgstr ""
9852
9853 #. type: Plain text
9854 #: build/C/man2/wait.2:146
9855 msgid "meaning wait for the child whose process ID is equal to the value of I<pid>."
9856 msgstr ""
9857
9858 #. type: Plain text
9859 #: build/C/man2/wait.2:150
9860 msgid "The value of I<options> is an OR of zero or more of the following constants:"
9861 msgstr ""
9862
9863 #. type: TP
9864 #: build/C/man2/wait.2:150 build/C/man2/wait.2:279
9865 #, no-wrap
9866 msgid "B<WNOHANG>"
9867 msgstr ""
9868
9869 #. type: Plain text
9870 #: build/C/man2/wait.2:153
9871 msgid "return immediately if no child has exited."
9872 msgstr ""
9873
9874 #. type: TP
9875 #: build/C/man2/wait.2:153
9876 #, no-wrap
9877 msgid "B<WUNTRACED>"
9878 msgstr ""
9879
9880 #. type: Plain text
9881 #: build/C/man2/wait.2:162
9882 msgid ""
9883 "also return if a child has stopped (but not traced via B<ptrace>(2)).  "
9884 "Status for I<traced> children which have stopped is provided even if this "
9885 "option is not specified."
9886 msgstr ""
9887
9888 #. type: TP
9889 #: build/C/man2/wait.2:162
9890 #, no-wrap
9891 msgid "B<WCONTINUED> (since Linux 2.6.10)"
9892 msgstr ""
9893
9894 #. type: Plain text
9895 #: build/C/man2/wait.2:166
9896 msgid "also return if a stopped child has been resumed by delivery of B<SIGCONT>."
9897 msgstr ""
9898
9899 #. type: Plain text
9900 #: build/C/man2/wait.2:168
9901 msgid "(For Linux-only options, see below.)"
9902 msgstr ""
9903
9904 #. type: Plain text
9905 #: build/C/man2/wait.2:182
9906 msgid ""
9907 "If I<status> is not NULL, B<wait>()  and B<waitpid>()  store status "
9908 "information in the I<int> to which it points.  This integer can be inspected "
9909 "with the following macros (which take the integer itself as an argument, not "
9910 "a pointer to it, as is done in B<wait>()  and B<waitpid>()!):"
9911 msgstr ""
9912
9913 #. type: TP
9914 #: build/C/man2/wait.2:182
9915 #, no-wrap
9916 msgid "B<WIFEXITED(>I<status>B<)>"
9917 msgstr ""
9918
9919 #. type: Plain text
9920 #: build/C/man2/wait.2:190
9921 msgid ""
9922 "returns true if the child terminated normally, that is, by calling "
9923 "B<exit>(3)  or B<_exit>(2), or by returning from main()."
9924 msgstr ""
9925
9926 #. type: TP
9927 #: build/C/man2/wait.2:190
9928 #, no-wrap
9929 msgid "B<WEXITSTATUS(>I<status>B<)>"
9930 msgstr ""
9931
9932 #. type: Plain text
9933 #: build/C/man2/wait.2:203
9934 msgid ""
9935 "returns the exit status of the child.  This consists of the least "
9936 "significant 8 bits of the I<status> argument that the child specified in a "
9937 "call to B<exit>(3)  or B<_exit>(2)  or as the argument for a return "
9938 "statement in main().  This macro should only be employed if B<WIFEXITED> "
9939 "returned true."
9940 msgstr ""
9941
9942 #. type: TP
9943 #: build/C/man2/wait.2:203
9944 #, no-wrap
9945 msgid "B<WIFSIGNALED(>I<status>B<)>"
9946 msgstr ""
9947
9948 #. type: Plain text
9949 #: build/C/man2/wait.2:206
9950 msgid "returns true if the child process was terminated by a signal."
9951 msgstr ""
9952
9953 #. type: TP
9954 #: build/C/man2/wait.2:206
9955 #, no-wrap
9956 msgid "B<WTERMSIG(>I<status>B<)>"
9957 msgstr ""
9958
9959 #. type: Plain text
9960 #: build/C/man2/wait.2:213
9961 msgid ""
9962 "returns the number of the signal that caused the child process to "
9963 "terminate.  This macro should only be employed if B<WIFSIGNALED> returned "
9964 "true."
9965 msgstr ""
9966
9967 #. type: TP
9968 #: build/C/man2/wait.2:213
9969 #, no-wrap
9970 msgid "B<WCOREDUMP(>I<status>B<)>"
9971 msgstr ""
9972
9973 #. type: Plain text
9974 #: build/C/man2/wait.2:222
9975 msgid ""
9976 "returns true if the child produced a core dump.  This macro should only be "
9977 "employed if B<WIFSIGNALED> returned true.  This macro is not specified in "
9978 "POSIX.1-2001 and is not available on some UNIX implementations (e.g., AIX, "
9979 "SunOS).  Only use this enclosed in #ifdef WCOREDUMP ... #endif."
9980 msgstr ""
9981
9982 #. type: TP
9983 #: build/C/man2/wait.2:222
9984 #, no-wrap
9985 msgid "B<WIFSTOPPED(>I<status>B<)>"
9986 msgstr ""
9987
9988 #. type: Plain text
9989 #: build/C/man2/wait.2:229
9990 msgid ""
9991 "returns true if the child process was stopped by delivery of a signal; this "
9992 "is only possible if the call was done using B<WUNTRACED> or when the child "
9993 "is being traced (see B<ptrace>(2))."
9994 msgstr ""
9995
9996 #. type: TP
9997 #: build/C/man2/wait.2:229
9998 #, no-wrap
9999 msgid "B<WSTOPSIG(>I<status>B<)>"
10000 msgstr ""
10001
10002 #. type: Plain text
10003 #: build/C/man2/wait.2:235
10004 msgid ""
10005 "returns the number of the signal which caused the child to stop.  This macro "
10006 "should only be employed if B<WIFSTOPPED> returned true."
10007 msgstr ""
10008
10009 #. type: TP
10010 #: build/C/man2/wait.2:235
10011 #, no-wrap
10012 msgid "B<WIFCONTINUED(>I<status>B<)>"
10013 msgstr ""
10014
10015 #. type: Plain text
10016 #: build/C/man2/wait.2:240
10017 msgid ""
10018 "(since Linux 2.6.10)  returns true if the child process was resumed by "
10019 "delivery of B<SIGCONT>."
10020 msgstr ""
10021
10022 #. type: SS
10023 #: build/C/man2/wait.2:240
10024 #, no-wrap
10025 msgid "waitid()"
10026 msgstr ""
10027
10028 #. type: Plain text
10029 #: build/C/man2/wait.2:245
10030 msgid ""
10031 "The B<waitid>()  system call (available since Linux 2.6.9) provides more "
10032 "precise control over which child state changes to wait for."
10033 msgstr ""
10034
10035 #. type: Plain text
10036 #: build/C/man2/wait.2:251
10037 msgid ""
10038 "The I<idtype> and I<id> arguments select the child(ren) to wait for, as "
10039 "follows:"
10040 msgstr ""
10041
10042 #. type: IP
10043 #: build/C/man2/wait.2:251
10044 #, no-wrap
10045 msgid "I<idtype> == B<P_PID>"
10046 msgstr ""
10047
10048 #. type: Plain text
10049 #: build/C/man2/wait.2:254
10050 msgid "Wait for the child whose process ID matches I<id>."
10051 msgstr ""
10052
10053 #. type: IP
10054 #: build/C/man2/wait.2:254
10055 #, no-wrap
10056 msgid "I<idtype> == B<P_PGID>"
10057 msgstr ""
10058
10059 #. type: Plain text
10060 #: build/C/man2/wait.2:257
10061 msgid "Wait for any child whose process group ID matches I<id>."
10062 msgstr ""
10063
10064 #. type: IP
10065 #: build/C/man2/wait.2:257
10066 #, no-wrap
10067 msgid "I<idtype> == B<P_ALL>"
10068 msgstr ""
10069
10070 #. type: Plain text
10071 #: build/C/man2/wait.2:261
10072 msgid "Wait for any child; I<id> is ignored."
10073 msgstr ""
10074
10075 #. type: Plain text
10076 #: build/C/man2/wait.2:265
10077 msgid ""
10078 "The child state changes to wait for are specified by ORing one or more of "
10079 "the following flags in I<options>:"
10080 msgstr ""
10081
10082 #. type: TP
10083 #: build/C/man2/wait.2:265
10084 #, no-wrap
10085 msgid "B<WEXITED>"
10086 msgstr ""
10087
10088 #. type: Plain text
10089 #: build/C/man2/wait.2:268
10090 msgid "Wait for children that have terminated."
10091 msgstr ""
10092
10093 #. type: TP
10094 #: build/C/man2/wait.2:268
10095 #, no-wrap
10096 msgid "B<WSTOPPED>"
10097 msgstr ""
10098
10099 #. type: Plain text
10100 #: build/C/man2/wait.2:271
10101 msgid "Wait for children that have been stopped by delivery of a signal."
10102 msgstr ""
10103
10104 #. type: TP
10105 #: build/C/man2/wait.2:271
10106 #, no-wrap
10107 msgid "B<WCONTINUED>"
10108 msgstr ""
10109
10110 #. type: Plain text
10111 #: build/C/man2/wait.2:276
10112 msgid ""
10113 "Wait for (previously stopped) children that have been resumed by delivery of "
10114 "B<SIGCONT>."
10115 msgstr ""
10116
10117 #. type: Plain text
10118 #: build/C/man2/wait.2:279
10119 msgid "The following flags may additionally be ORed in I<options>:"
10120 msgstr ""
10121
10122 #. type: Plain text
10123 #: build/C/man2/wait.2:283
10124 msgid "As for B<waitpid>()."
10125 msgstr ""
10126
10127 #. type: TP
10128 #: build/C/man2/wait.2:283
10129 #, no-wrap
10130 msgid "B<WNOWAIT>"
10131 msgstr ""
10132
10133 #. type: Plain text
10134 #: build/C/man2/wait.2:287
10135 msgid ""
10136 "Leave the child in a waitable state; a later wait call can be used to again "
10137 "retrieve the child status information."
10138 msgstr ""
10139
10140 #. type: Plain text
10141 #: build/C/man2/wait.2:294
10142 msgid ""
10143 "Upon successful return, B<waitid>()  fills in the following fields of the "
10144 "I<siginfo_t> structure pointed to by I<infop>:"
10145 msgstr ""
10146
10147 #. type: Plain text
10148 #: build/C/man2/wait.2:297
10149 msgid "The process ID of the child."
10150 msgstr ""
10151
10152 #. type: Plain text
10153 #: build/C/man2/wait.2:301
10154 msgid ""
10155 "The real user ID of the child.  (This field is not set on most other "
10156 "implementations.)"
10157 msgstr ""
10158
10159 #. type: Plain text
10160 #: build/C/man2/wait.2:305
10161 msgid "Always set to B<SIGCHLD>."
10162 msgstr ""
10163
10164 #. type: TP
10165 #: build/C/man2/wait.2:305
10166 #, no-wrap
10167 msgid "I<si_status>"
10168 msgstr ""
10169
10170 #. type: Plain text
10171 #: build/C/man2/wait.2:315
10172 msgid ""
10173 "Either the exit status of the child, as given to B<_exit>(2)  (or "
10174 "B<exit>(3)), or the signal that caused the child to terminate, stop, or "
10175 "continue.  The I<si_code> field can be used to determine how to interpret "
10176 "this field."
10177 msgstr ""
10178
10179 #. type: Plain text
10180 #: build/C/man2/wait.2:332
10181 msgid ""
10182 "Set to one of: B<CLD_EXITED> (child called B<_exit>(2)); B<CLD_KILLED> "
10183 "(child killed by signal); B<CLD_DUMPED> (child killed by signal, and dumped "
10184 "core); B<CLD_STOPPED> (child stopped by signal); B<CLD_TRAPPED> (traced "
10185 "child has trapped); or B<CLD_CONTINUED> (child continued by B<SIGCONT>)."
10186 msgstr ""
10187
10188 #.  POSIX.1-2001 leaves this possibility unspecified; most
10189 #.  implementations (including Linux) zero out the structure
10190 #.  in this case, but at least one implementation (AIX 5.1)
10191 #.  does not -- MTK Nov 04
10192 #. type: Plain text
10193 #: build/C/man2/wait.2:354
10194 msgid ""
10195 "If B<WNOHANG> was specified in I<options> and there were no children in a "
10196 "waitable state, then B<waitid>()  returns 0 immediately and the state of the "
10197 "I<siginfo_t> structure pointed to by I<infop> is unspecified.  To "
10198 "distinguish this case from that where a child was in a waitable state, zero "
10199 "out the I<si_pid> field before the call and check for a nonzero value in "
10200 "this field after the call returns."
10201 msgstr ""
10202
10203 #. type: Plain text
10204 #: build/C/man2/wait.2:358
10205 msgid ""
10206 "B<wait>(): on success, returns the process ID of the terminated child; on "
10207 "error, -1 is returned."
10208 msgstr ""
10209
10210 #. type: Plain text
10211 #: build/C/man2/wait.2:367
10212 msgid ""
10213 "B<waitpid>(): on success, returns the process ID of the child whose state "
10214 "has changed; if B<WNOHANG> was specified and one or more child(ren) "
10215 "specified by I<pid> exist, but have not yet changed state, then 0 is "
10216 "returned.  On error, -1 is returned."
10217 msgstr ""
10218
10219 #.  FIXME: As reported by Vegard Nossum, if infop is NULL, then waitid()
10220 #.  returns the PID of the child.  Either this is a bug, or it is intended
10221 #.  behavior that needs to be documented.  See my Jan 2009 LKML mail
10222 #.  "waitid() return value strangeness when infop is NULL".
10223 #. type: Plain text
10224 #: build/C/man2/wait.2:383
10225 msgid ""
10226 "B<waitid>(): returns 0 on success or if B<WNOHANG> was specified and no "
10227 "child(ren) specified by I<id> has yet changed state; on error, -1 is "
10228 "returned.  Each of these calls sets I<errno> to an appropriate value in the "
10229 "case of an error."
10230 msgstr ""
10231
10232 #. type: TP
10233 #: build/C/man2/wait.2:384 build/C/man2/wait.2:389
10234 #, no-wrap
10235 msgid "B<ECHILD>"
10236 msgstr ""
10237
10238 #. type: Plain text
10239 #: build/C/man2/wait.2:389
10240 msgid ""
10241 "(for B<wait>())  The calling process does not have any unwaited-for "
10242 "children."
10243 msgstr ""
10244
10245 #. type: Plain text
10246 #: build/C/man2/wait.2:409
10247 msgid ""
10248 "(for B<waitpid>()  or B<waitid>())  The process specified by I<pid> "
10249 "(B<waitpid>())  or I<idtype> and I<id> (B<waitid>())  does not exist or is "
10250 "not a child of the calling process.  (This can happen for one's own child if "
10251 "the action for B<SIGCHLD> is set to B<SIG_IGN>.  See also the I<Linux Notes> "
10252 "section about threads.)"
10253 msgstr ""
10254
10255 #. type: Plain text
10256 #: build/C/man2/wait.2:416
10257 msgid ""
10258 "B<WNOHANG> was not set and an unblocked signal or a B<SIGCHLD> was caught; "
10259 "see B<signal>(7)."
10260 msgstr ""
10261
10262 #. type: Plain text
10263 #: build/C/man2/wait.2:421
10264 msgid "The I<options> argument was invalid."
10265 msgstr ""
10266
10267 #. type: Plain text
10268 #: build/C/man2/wait.2:436
10269 msgid ""
10270 "A child that terminates, but has not been waited for becomes a \"zombie\".  "
10271 "The kernel maintains a minimal set of information about the zombie process "
10272 "(PID, termination status, resource usage information)  in order to allow the "
10273 "parent to later perform a wait to obtain information about the child.  As "
10274 "long as a zombie is not removed from the system via a wait, it will consume "
10275 "a slot in the kernel process table, and if this table fills, it will not be "
10276 "possible to create further processes.  If a parent process terminates, then "
10277 "its \"zombie\" children (if any)  are adopted by B<init>(8), which "
10278 "automatically performs a wait to remove the zombies."
10279 msgstr ""
10280
10281 #. type: Plain text
10282 #: build/C/man2/wait.2:477
10283 msgid ""
10284 "POSIX.1-2001 specifies that if the disposition of B<SIGCHLD> is set to "
10285 "B<SIG_IGN> or the B<SA_NOCLDWAIT> flag is set for B<SIGCHLD> (see "
10286 "B<sigaction>(2)), then children that terminate do not become zombies and a "
10287 "call to B<wait>()  or B<waitpid>()  will block until all children have "
10288 "terminated, and then fail with I<errno> set to B<ECHILD>.  (The original "
10289 "POSIX standard left the behavior of setting B<SIGCHLD> to B<SIG_IGN> "
10290 "unspecified.  Note that even though the default disposition of B<SIGCHLD> is "
10291 "\"ignore\", explicitly setting the disposition to B<SIG_IGN> results in "
10292 "different treatment of zombie process children.)  Linux 2.6 conforms to this "
10293 "specification.  However, Linux 2.4 (and earlier) does not: if a B<wait>()  "
10294 "or B<waitpid>()  call is made while B<SIGCHLD> is being ignored, the call "
10295 "behaves just as though B<SIGCHLD> were not being ignored, that is, the call "
10296 "blocks until the next child terminates and then returns the process ID and "
10297 "status of that child."
10298 msgstr ""
10299
10300 #. type: Plain text
10301 #: build/C/man2/wait.2:493
10302 msgid ""
10303 "In the Linux kernel, a kernel-scheduled thread is not a distinct construct "
10304 "from a process.  Instead, a thread is simply a process that is created using "
10305 "the Linux-unique B<clone>(2)  system call; other routines such as the "
10306 "portable B<pthread_create>(3)  call are implemented using B<clone>(2).  "
10307 "Before Linux 2.4, a thread was just a special case of a process, and as a "
10308 "consequence one thread could not wait on the children of another thread, "
10309 "even when the latter belongs to the same thread group.  However, POSIX "
10310 "prescribes such functionality, and since Linux 2.4 a thread can, and by "
10311 "default will, wait on children of other threads in the same thread group."
10312 msgstr ""
10313
10314 #. type: Plain text
10315 #: build/C/man2/wait.2:500
10316 msgid ""
10317 "The following Linux-specific I<options> are for use with children created "
10318 "using B<clone>(2); they cannot be used with B<waitid>():"
10319 msgstr ""
10320
10321 #. type: TP
10322 #: build/C/man2/wait.2:500
10323 #, no-wrap
10324 msgid "B<__WCLONE>"
10325 msgstr ""
10326
10327 #.  since 0.99pl10
10328 #. type: Plain text
10329 #: build/C/man2/wait.2:511
10330 msgid ""
10331 "Wait for \"clone\" children only.  If omitted then wait for \"non-clone\" "
10332 "children only.  (A \"clone\" child is one which delivers no signal, or a "
10333 "signal other than B<SIGCHLD> to its parent upon termination.)  This option "
10334 "is ignored if B<__WALL> is also specified."
10335 msgstr ""
10336
10337 #. type: TP
10338 #: build/C/man2/wait.2:511
10339 #, no-wrap
10340 msgid "B<__WALL> (since Linux 2.4)"
10341 msgstr ""
10342
10343 #.  since patch-2.3.48
10344 #. type: Plain text
10345 #: build/C/man2/wait.2:516
10346 msgid "Wait for all children, regardless of type (\"clone\" or \"non-clone\")."
10347 msgstr ""
10348
10349 #. type: TP
10350 #: build/C/man2/wait.2:516
10351 #, no-wrap
10352 msgid "B<__WNOTHREAD> (since Linux 2.4)"
10353 msgstr ""
10354
10355 #.  since patch-2.4.0-test8
10356 #. type: Plain text
10357 #: build/C/man2/wait.2:522
10358 msgid ""
10359 "Do not wait for children of other threads in the same thread group.  This "
10360 "was the default before Linux 2.4."
10361 msgstr ""
10362
10363 #.  fork.2 refers to this example program.
10364 #. type: Plain text
10365 #: build/C/man2/wait.2:539
10366 msgid ""
10367 "The following program demonstrates the use of B<fork>(2)  and B<waitpid>().  "
10368 "The program creates a child process.  If no command-line argument is "
10369 "supplied to the program, then the child suspends its execution using "
10370 "B<pause>(2), to allow the user to send signals to the child.  Otherwise, if "
10371 "a command-line argument is supplied, then the child exits immediately, using "
10372 "the integer supplied on the command line as the exit status.  The parent "
10373 "process executes a loop that monitors the child using B<waitpid>(), and uses "
10374 "the W*() macros described above to analyze the wait status value."
10375 msgstr ""
10376
10377 #. type: Plain text
10378 #: build/C/man2/wait.2:555
10379 #, no-wrap
10380 msgid ""
10381 "$B< ./a.out &>\n"
10382 "Child PID is 32360\n"
10383 "[1] 32359\n"
10384 "$B< kill -STOP 32360>\n"
10385 "stopped by signal 19\n"
10386 "$B< kill -CONT 32360>\n"
10387 "continued\n"
10388 "$B< kill -TERM 32360>\n"
10389 "killed by signal 15\n"
10390 "[1]+  Done                    ./a.out\n"
10391 "$\n"
10392 msgstr ""
10393
10394 #. type: Plain text
10395 #: build/C/man2/wait.2:564
10396 #, no-wrap
10397 msgid ""
10398 "#include E<lt>sys/wait.hE<gt>\n"
10399 "#include E<lt>stdlib.hE<gt>\n"
10400 "#include E<lt>unistd.hE<gt>\n"
10401 "#include E<lt>stdio.hE<gt>\n"
10402 msgstr ""
10403
10404 #. type: Plain text
10405 #: build/C/man2/wait.2:570
10406 #, no-wrap
10407 msgid ""
10408 "int\n"
10409 "main(int argc, char *argv[])\n"
10410 "{\n"
10411 "    pid_t cpid, w;\n"
10412 "    int status;\n"
10413 msgstr ""
10414
10415 #. type: Plain text
10416 #: build/C/man2/wait.2:576
10417 #, no-wrap
10418 msgid ""
10419 "    cpid = fork();\n"
10420 "    if (cpid == -1) {\n"
10421 "        perror(\"fork\");\n"
10422 "        exit(EXIT_FAILURE);\n"
10423 "    }\n"
10424 msgstr ""
10425
10426 #. type: Plain text
10427 #: build/C/man2/wait.2:582
10428 #, no-wrap
10429 msgid ""
10430 "    if (cpid == 0) {            /* Code executed by child */\n"
10431 "        printf(\"Child PID is %ld\\en\", (long) getpid());\n"
10432 "        if (argc == 1)\n"
10433 "            pause();                    /* Wait for signals */\n"
10434 "        _exit(atoi(argv[1]));\n"
10435 msgstr ""
10436
10437 #. type: Plain text
10438 #: build/C/man2/wait.2:590
10439 #, no-wrap
10440 msgid ""
10441 "    } else {                    /* Code executed by parent */\n"
10442 "        do {\n"
10443 "            w = waitpid(cpid, &status, WUNTRACED | WCONTINUED);\n"
10444 "            if (w == -1) {\n"
10445 "                perror(\"waitpid\");\n"
10446 "                exit(EXIT_FAILURE);\n"
10447 "            }\n"
10448 msgstr ""
10449
10450 #. type: Plain text
10451 #: build/C/man2/wait.2:604
10452 #, no-wrap
10453 msgid ""
10454 "            if (WIFEXITED(status)) {\n"
10455 "                printf(\"exited, status=%d\\en\", WEXITSTATUS(status));\n"
10456 "            } else if (WIFSIGNALED(status)) {\n"
10457 "                printf(\"killed by signal %d\\en\", WTERMSIG(status));\n"
10458 "            } else if (WIFSTOPPED(status)) {\n"
10459 "                printf(\"stopped by signal %d\\en\", WSTOPSIG(status));\n"
10460 "            } else if (WIFCONTINUED(status)) {\n"
10461 "                printf(\"continued\\en\");\n"
10462 "            }\n"
10463 "        } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n"
10464 "        exit(EXIT_SUCCESS);\n"
10465 "    }\n"
10466 "}\n"
10467 msgstr ""
10468
10469 #. type: Plain text
10470 #: build/C/man2/wait.2:616
10471 msgid ""
10472 "B<_exit>(2), B<clone>(2), B<fork>(2), B<kill>(2), B<ptrace>(2), "
10473 "B<sigaction>(2), B<signal>(2), B<wait4>(2), B<pthread_create>(3), "
10474 "B<credentials>(7), B<signal>(7)"
10475 msgstr ""
10476
10477 #. type: TH
10478 #: build/C/man2/wait4.2:34
10479 #, no-wrap
10480 msgid "WAIT4"
10481 msgstr ""
10482
10483 #. type: Plain text
10484 #: build/C/man2/wait4.2:37
10485 msgid "wait3, wait4 - wait for process to change state, BSD style"
10486 msgstr ""
10487
10488 #. type: Plain text
10489 #: build/C/man2/wait4.2:43
10490 #, no-wrap
10491 msgid ""
10492 "B<#include E<lt>sys/types.hE<gt>>\n"
10493 "B<#include E<lt>sys/time.hE<gt>>\n"
10494 "B<#include E<lt>sys/resource.hE<gt>>\n"
10495 "B<#include E<lt>sys/wait.hE<gt>>\n"
10496 msgstr ""
10497
10498 #. type: Plain text
10499 #: build/C/man2/wait4.2:46
10500 #, no-wrap
10501 msgid ""
10502 "B<pid_t wait3(int *>I<status>B<, int >I<options>B<,>\n"
10503 "B<            struct rusage *>I<rusage>B<);>\n"
10504 msgstr ""
10505
10506 #. type: Plain text
10507 #: build/C/man2/wait4.2:49
10508 #, no-wrap
10509 msgid ""
10510 "B<pid_t wait4(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<,>\n"
10511 "B<            struct rusage *>I<rusage>B<);>\n"
10512 msgstr ""
10513
10514 #. type: Plain text
10515 #: build/C/man2/wait4.2:58
10516 msgid "B<wait3>():"
10517 msgstr ""
10518
10519 #. type: Plain text
10520 #: build/C/man2/wait4.2:64
10521 msgid "B<wait4>():"
10522 msgstr ""
10523
10524 #. type: Plain text
10525 #: build/C/man2/wait4.2:66
10526 msgid "_BSD_SOURCE"
10527 msgstr ""
10528
10529 #. type: Plain text
10530 #: build/C/man2/wait4.2:78
10531 msgid ""
10532 "The B<wait3>()  and B<wait4>()  system calls are similar to B<waitpid>(2), "
10533 "but additionally return resource usage information about the child in the "
10534 "structure pointed to by I<rusage>."
10535 msgstr ""
10536
10537 #. type: Plain text
10538 #: build/C/man2/wait4.2:84
10539 msgid ""
10540 "Other than the use of the I<rusage> argument, the following B<wait3>()  "
10541 "call:"
10542 msgstr ""
10543
10544 #. type: Plain text
10545 #: build/C/man2/wait4.2:87
10546 #, no-wrap
10547 msgid "    wait3(status, options, rusage);\n"
10548 msgstr ""
10549
10550 #. type: Plain text
10551 #: build/C/man2/wait4.2:90 build/C/man2/wait4.2:104
10552 msgid "is equivalent to:"
10553 msgstr ""
10554
10555 #. type: Plain text
10556 #: build/C/man2/wait4.2:93
10557 #, no-wrap
10558 msgid "    waitpid(-1, status, options);\n"
10559 msgstr ""
10560
10561 #. type: Plain text
10562 #: build/C/man2/wait4.2:98
10563 msgid "Similarly, the following B<wait4>()  call:"
10564 msgstr ""
10565
10566 #. type: Plain text
10567 #: build/C/man2/wait4.2:101
10568 #, no-wrap
10569 msgid "    wait4(pid, status, options, rusage);\n"
10570 msgstr ""
10571
10572 #. type: Plain text
10573 #: build/C/man2/wait4.2:107
10574 #, no-wrap
10575 msgid "    waitpid(pid, status, options);\n"
10576 msgstr ""
10577
10578 #. type: Plain text
10579 #: build/C/man2/wait4.2:117
10580 msgid ""
10581 "In other words, B<wait3>()  waits of any child, while B<wait4>()  can be "
10582 "used to select a specific child, or children, on which to wait.  See "
10583 "B<wait>(2)  for further details."
10584 msgstr ""
10585
10586 #. type: Plain text
10587 #: build/C/man2/wait4.2:127
10588 msgid ""
10589 "If I<rusage> is not NULL, the I<struct rusage> to which it points will be "
10590 "filled with accounting information about the child.  See B<getrusage>(2)  "
10591 "for details."
10592 msgstr ""
10593
10594 #. type: Plain text
10595 #: build/C/man2/wait4.2:130 build/C/man2/wait4.2:133
10596 msgid "As for B<waitpid>(2)."
10597 msgstr ""
10598
10599 #. type: Plain text
10600 #: build/C/man2/wait4.2:135
10601 msgid "4.3BSD."
10602 msgstr ""
10603
10604 #. type: Plain text
10605 #: build/C/man2/wait4.2:147
10606 msgid ""
10607 "Including I<E<lt>sys/time.hE<gt>> is not required these days, but increases "
10608 "portability.  (Indeed, I<E<lt>sys/resource.hE<gt>> defines the I<rusage> "
10609 "structure with fields of type I<struct timeval> defined in "
10610 "I<E<lt>sys/time.hE<gt>>.)"
10611 msgstr ""
10612
10613 #. type: Plain text
10614 #: build/C/man2/wait4.2:153
10615 msgid ""
10616 "On Linux, B<wait3>()  is a library function implemented on top of the "
10617 "B<wait4>()  system call."
10618 msgstr ""
10619
10620 #. type: Plain text
10621 #: build/C/man2/wait4.2:159
10622 msgid ""
10623 "B<fork>(2), B<getrusage>(2), B<sigaction>(2), B<signal>(2), B<wait>(2), "
10624 "B<signal>(7)"
10625 msgstr ""