OSDN Git Service

93252d2455cbec36151303c7abc39462fb21d388
[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: 2015-01-04 23:49+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=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: build/C/man3/bsd_signal.3:25
21 #, no-wrap
22 msgid "BSD_SIGNAL"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man3/bsd_signal.3:25
27 #, no-wrap
28 msgid "2013-10-22"
29 msgstr ""
30
31 #. type: TH
32 #: build/C/man3/bsd_signal.3:25 build/C/man2/eventfd.2:22 build/C/man2/getitimer.2:12 build/C/man3/gsignal.3:27 build/C/man2/kill.2:44 build/C/man2/killpg.2:42 build/C/man2/pause.2:30 build/C/man2/prctl.2:52 build/C/man3/profil.3:28 build/C/man3/psignal.3:30 build/C/man3/raise.3:29 build/C/man2/restart_syscall.2:33 build/C/man2/rt_sigqueueinfo.2:25 build/C/man2/s390_runtime_instr.2:25 build/C/man2/sgetmask.2:26 build/C/man2/sigaction.2:47 build/C/man2/sigaltstack.2:27 build/C/man7/sigevent.7:26 build/C/man3/siginterrupt.3:31 build/C/man2/signal.2:36 build/C/man7/signal.7:46 build/C/man2/signalfd.2:20 build/C/man3/sigpause.3:25 build/C/man2/sigpending.2:29 build/C/man2/sigprocmask.2:29 build/C/man3/sigqueue.3:28 build/C/man2/sigreturn.2:30 build/C/man3/sigset.3:26 build/C/man3/sigsetops.3:31 build/C/man2/sigsuspend.2:29 build/C/man3/sigvec.3:26 build/C/man3/sigwait.3:26 build/C/man2/sigwaitinfo.2:25 build/C/man3/sysv_signal.3:25 build/C/man2/timer_create.2:33 build/C/man2/timer_delete.2:26 build/C/man2/timer_getoverrun.2:26 build/C/man2/timer_settime.2:26 build/C/man2/timerfd_create.2:22 build/C/man2/tkill.2:29 build/C/man2/wait.2:49 build/C/man2/wait4.2:33
33 #, no-wrap
34 msgid "Linux Programmer's Manual"
35 msgstr ""
36
37 #. type: SH
38 #: build/C/man3/bsd_signal.3:26 build/C/man2/eventfd.2:23 build/C/man2/getitimer.2:13 build/C/man3/gsignal.3:28 build/C/man2/kill.2:45 build/C/man2/killpg.2:43 build/C/man2/pause.2:31 build/C/man2/prctl.2:53 build/C/man3/profil.3:29 build/C/man3/psignal.3:31 build/C/man3/raise.3:30 build/C/man2/restart_syscall.2:34 build/C/man2/rt_sigqueueinfo.2:26 build/C/man2/s390_runtime_instr.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/man7/signal.7:47 build/C/man2/signalfd.2:21 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:31 build/C/man3/sigset.3:27 build/C/man3/sigsetops.3:32 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:34 build/C/man2/timer_delete.2:27 build/C/man2/timer_getoverrun.2:27 build/C/man2/timer_settime.2:27 build/C/man2/timerfd_create.2:23 build/C/man2/tkill.2:30 build/C/man2/wait.2:50 build/C/man2/wait4.2:34
39 #, no-wrap
40 msgid "NAME"
41 msgstr ""
42
43 #. type: Plain text
44 #: build/C/man3/bsd_signal.3:28
45 msgid "bsd_signal - signal handling with BSD semantics"
46 msgstr ""
47
48 #. type: SH
49 #: build/C/man3/bsd_signal.3:28 build/C/man2/eventfd.2:25 build/C/man2/getitimer.2:15 build/C/man3/gsignal.3:30 build/C/man2/kill.2:47 build/C/man2/killpg.2:45 build/C/man2/pause.2:33 build/C/man2/prctl.2:55 build/C/man3/profil.3:31 build/C/man3/psignal.3:33 build/C/man3/raise.3:32 build/C/man2/restart_syscall.2:36 build/C/man2/rt_sigqueueinfo.2:28 build/C/man2/s390_runtime_instr.2:28 build/C/man2/sgetmask.2:29 build/C/man2/sigaction.2:50 build/C/man2/sigaltstack.2:30 build/C/man7/sigevent.7:29 build/C/man3/siginterrupt.3:34 build/C/man2/signal.2:39 build/C/man2/signalfd.2:23 build/C/man3/sigpause.3:28 build/C/man2/sigpending.2:32 build/C/man2/sigprocmask.2:32 build/C/man3/sigqueue.3:31 build/C/man2/sigreturn.2:33 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/sigwait.3:29 build/C/man2/sigwaitinfo.2:28 build/C/man3/sysv_signal.3:28 build/C/man2/timer_create.2:36 build/C/man2/timer_delete.2:29 build/C/man2/timer_getoverrun.2:29 build/C/man2/timer_settime.2:30 build/C/man2/timerfd_create.2:26 build/C/man2/tkill.2:32 build/C/man2/wait.2:52 build/C/man2/wait4.2:36
50 #, no-wrap
51 msgid "SYNOPSIS"
52 msgstr ""
53
54 #. type: Plain text
55 #: build/C/man3/bsd_signal.3:30
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:32 build/C/man2/killpg.2:47 build/C/man2/sigaltstack.2:32 build/C/man2/signal.2:41 build/C/man2/sigpending.2:34 build/C/man2/sigprocmask.2:34 build/C/man3/sigqueue.3:33 build/C/man3/sigset.3:31 build/C/man3/sigsetops.3:37 build/C/man2/sigsuspend.2:34 build/C/man3/sigvec.3:31 build/C/man3/sysv_signal.3:32
61 msgid "B<#include E<lt>signal.hE<gt>>"
62 msgstr ""
63
64 #. type: Plain text
65 #: build/C/man3/bsd_signal.3:34 build/C/man2/signal.2:43 build/C/man3/sigset.3:33 build/C/man3/sysv_signal.3:34
66 msgid "B<typedef void (*sighandler_t)(int);>"
67 msgstr ""
68
69 #. type: Plain text
70 #: build/C/man3/bsd_signal.3:36
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:36 build/C/man2/eventfd.2:29 build/C/man2/getitimer.2:24 build/C/man3/gsignal.3:49 build/C/man2/kill.2:65 build/C/man2/killpg.2:60 build/C/man2/pause.2:37 build/C/man2/prctl.2:62 build/C/man3/profil.3:46 build/C/man3/psignal.3:56 build/C/man3/raise.3:38 build/C/man2/restart_syscall.2:41 build/C/man2/rt_sigqueueinfo.2:38 build/C/man2/s390_runtime_instr.2:34 build/C/man2/sgetmask.2:36 build/C/man2/sigaction.2:70 build/C/man2/sigaltstack.2:51 build/C/man7/sigevent.7:52 build/C/man3/siginterrupt.3:55 build/C/man2/signal.2:45 build/C/man7/signal.7:49 build/C/man2/signalfd.2:27 build/C/man3/sigpause.3:36 build/C/man2/sigpending.2:46 build/C/man2/sigprocmask.2:47 build/C/man3/sigqueue.3:43 build/C/man2/sigreturn.2:35 build/C/man3/sigset.3:58 build/C/man3/sigsetops.3:63 build/C/man2/sigsuspend.2:46 build/C/man3/sigvec.3:49 build/C/man3/sigwait.3:45 build/C/man2/sigwaitinfo.2:46 build/C/man3/sysv_signal.3:36 build/C/man2/timer_create.2:54 build/C/man2/timer_delete.2:45 build/C/man2/timer_getoverrun.2:45 build/C/man2/timer_settime.2:50 build/C/man2/timerfd_create.2:38 build/C/man2/tkill.2:41 build/C/man2/wait.2:83 build/C/man2/wait4.2:67
76 #, no-wrap
77 msgid "DESCRIPTION"
78 msgstr ""
79
80 #. type: Plain text
81 #: build/C/man3/bsd_signal.3:41
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:54
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:54 build/C/man2/eventfd.2:222 build/C/man2/getitimer.2:129 build/C/man2/kill.2:100 build/C/man2/killpg.2:89 build/C/man2/pause.2:42 build/C/man2/prctl.2:804 build/C/man3/profil.3:68 build/C/man3/psignal.3:89 build/C/man3/raise.3:61 build/C/man2/restart_syscall.2:88 build/C/man2/rt_sigqueueinfo.2:129 build/C/man2/s390_runtime_instr.2:54 build/C/man2/sgetmask.2:59 build/C/man2/sigaction.2:671 build/C/man2/sigaltstack.2:133 build/C/man3/siginterrupt.3:73 build/C/man2/signal.2:97 build/C/man2/signalfd.2:251 build/C/man3/sigpause.3:48 build/C/man2/sigpending.2:53 build/C/man2/sigprocmask.2:93 build/C/man3/sigqueue.3:83 build/C/man2/sigreturn.2:65 build/C/man3/sigset.3:129 build/C/man3/sigsetops.3:107 build/C/man2/sigsuspend.2:70 build/C/man3/sigvec.3:199 build/C/man3/sigwait.3:69 build/C/man2/sigwaitinfo.2:105 build/C/man3/sysv_signal.3:51 build/C/man2/timer_create.2:169 build/C/man2/timer_delete.2:53 build/C/man2/timer_getoverrun.2:82 build/C/man2/timer_settime.2:173 build/C/man2/timerfd_create.2:294 build/C/man2/tkill.2:88 build/C/man2/wait.2:355 build/C/man2/wait4.2:132
101 #, no-wrap
102 msgid "RETURN VALUE"
103 msgstr ""
104
105 #. type: Plain text
106 #: build/C/man3/bsd_signal.3:60
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:60 build/C/man2/eventfd.2:229 build/C/man2/getitimer.2:134 build/C/man2/kill.2:105 build/C/man2/killpg.2:94 build/C/man2/pause.2:53 build/C/man2/prctl.2:824 build/C/man2/restart_syscall.2:92 build/C/man2/rt_sigqueueinfo.2:134 build/C/man2/s390_runtime_instr.2:65 build/C/man2/sgetmask.2:64 build/C/man2/sigaction.2:676 build/C/man2/sigaltstack.2:137 build/C/man3/siginterrupt.3:83 build/C/man2/signal.2:105 build/C/man2/signalfd.2:265 build/C/man2/sigpending.2:59 build/C/man2/sigprocmask.2:99 build/C/man3/sigqueue.3:91 build/C/man3/sigset.3:154 build/C/man3/sigsetops.3:127 build/C/man2/sigsuspend.2:76 build/C/man3/sigvec.3:216 build/C/man3/sigwait.3:74 build/C/man2/sigwaitinfo.2:114 build/C/man3/sysv_signal.3:57 build/C/man2/timer_create.2:177 build/C/man2/timer_delete.2:60 build/C/man2/timer_getoverrun.2:90 build/C/man2/timer_settime.2:182 build/C/man2/timerfd_create.2:309 build/C/man2/tkill.2:92 build/C/man2/wait.2:385 build/C/man2/wait4.2:135
114 #, no-wrap
115 msgid "ERRORS"
116 msgstr ""
117
118 #. type: Plain text
119 #: build/C/man3/bsd_signal.3:63 build/C/man3/sysv_signal.3:60
120 msgid "As for B<signal>(2)."
121 msgstr ""
122
123 #. type: SH
124 #: build/C/man3/bsd_signal.3:63 build/C/man3/raise.3:64 build/C/man3/siginterrupt.3:87 build/C/man3/sigpause.3:56 build/C/man3/sigqueue.3:114 build/C/man3/sigsetops.3:132 build/C/man3/sigvec.3:221 build/C/man3/sigwait.3:80 build/C/man3/sysv_signal.3:60
125 #, no-wrap
126 msgid "ATTRIBUTES"
127 msgstr ""
128
129 #. type: SS
130 #: build/C/man3/bsd_signal.3:64 build/C/man3/raise.3:65 build/C/man3/siginterrupt.3:88 build/C/man3/sigpause.3:57 build/C/man3/sigqueue.3:115 build/C/man3/sigsetops.3:133 build/C/man3/sigvec.3:222 build/C/man3/sigwait.3:81 build/C/man3/sysv_signal.3:61
131 #, no-wrap
132 msgid "Multithreading (see pthreads(7))"
133 msgstr ""
134
135 #. type: Plain text
136 #: build/C/man3/bsd_signal.3:68
137 msgid "The B<bsd_signal>()  function is thread-safe."
138 msgstr ""
139
140 #. type: SH
141 #: build/C/man3/bsd_signal.3:68 build/C/man2/eventfd.2:266 build/C/man2/getitimer.2:155 build/C/man3/gsignal.3:95 build/C/man2/kill.2:121 build/C/man2/killpg.2:111 build/C/man2/pause.2:57 build/C/man2/prctl.2:1070 build/C/man3/profil.3:70 build/C/man3/psignal.3:99 build/C/man3/raise.3:69 build/C/man2/restart_syscall.2:100 build/C/man2/rt_sigqueueinfo.2:176 build/C/man2/s390_runtime_instr.2:81 build/C/man2/sgetmask.2:73 build/C/man2/sigaction.2:688 build/C/man2/sigaltstack.2:158 build/C/man7/sigevent.7:130 build/C/man3/siginterrupt.3:93 build/C/man2/signal.2:110 build/C/man7/signal.7:872 build/C/man2/signalfd.2:307 build/C/man3/sigpause.3:61 build/C/man2/sigpending.2:64 build/C/man2/sigprocmask.2:112 build/C/man3/sigqueue.3:119 build/C/man2/sigreturn.2:68 build/C/man3/sigset.3:173 build/C/man3/sigsetops.3:145 build/C/man2/sigsuspend.2:84 build/C/man3/sigvec.3:241 build/C/man3/sigwait.3:85 build/C/man2/sigwaitinfo.2:133 build/C/man3/sysv_signal.3:65 build/C/man2/timer_create.2:195 build/C/man2/timer_delete.2:67 build/C/man2/timer_getoverrun.2:97 build/C/man2/timer_settime.2:207 build/C/man2/timerfd_create.2:378 build/C/man2/tkill.2:109 build/C/man2/wait.2:423 build/C/man2/wait4.2:138
142 #, no-wrap
143 msgid "CONFORMING TO"
144 msgstr ""
145
146 #. type: Plain text
147 #: build/C/man3/bsd_signal.3:75
148 msgid ""
149 "4.2BSD, POSIX.1-2001.  POSIX.1-2008 removes the specification of "
150 "B<bsd_signal>(), recommending the use of B<sigaction>(2)  instead."
151 msgstr ""
152
153 #. type: SH
154 #: build/C/man3/bsd_signal.3:75 build/C/man2/eventfd.2:271 build/C/man2/getitimer.2:165 build/C/man2/kill.2:123 build/C/man2/killpg.2:115 build/C/man3/raise.3:71 build/C/man2/restart_syscall.2:102 build/C/man2/rt_sigqueueinfo.2:178 build/C/man2/s390_runtime_instr.2:84 build/C/man2/sgetmask.2:75 build/C/man2/sigaction.2:691 build/C/man2/sigaltstack.2:160 build/C/man2/signal.2:112 build/C/man2/signalfd.2:312 build/C/man3/sigpause.3:65 build/C/man2/sigpending.2:66 build/C/man2/sigprocmask.2:114 build/C/man3/sigqueue.3:121 build/C/man2/sigreturn.2:74 build/C/man3/sigset.3:190 build/C/man3/sigsetops.3:147 build/C/man2/sigsuspend.2:86 build/C/man3/sigvec.3:247 build/C/man3/sigwait.3:87 build/C/man2/sigwaitinfo.2:135 build/C/man3/sysv_signal.3:67 build/C/man2/timer_create.2:197 build/C/man2/timer_getoverrun.2:99 build/C/man2/tkill.2:115 build/C/man2/wait.2:425 build/C/man2/wait4.2:147
155 #, no-wrap
156 msgid "NOTES"
157 msgstr ""
158
159 #. type: Plain text
160 #: build/C/man3/bsd_signal.3:81
161 msgid "Use of B<bsd_signal>()  should be avoided; use B<sigaction>(2)  instead."
162 msgstr ""
163
164 #. type: Plain text
165 #: build/C/man3/bsd_signal.3:92
166 msgid ""
167 "On modern Linux systems, B<bsd_signal>()  and B<signal>(2)  are equivalent.  "
168 "But on older systems, B<signal>(2)  provided unreliable signal semantics; "
169 "see B<signal>(2)  for details."
170 msgstr ""
171
172 #. type: Plain text
173 #: build/C/man3/bsd_signal.3:99 build/C/man3/sysv_signal.3:92
174 msgid ""
175 "The use of I<sighandler_t> is a GNU extension; this type is defined only if "
176 "the B<_GNU_SOURCE> feature test macro is defined."
177 msgstr ""
178
179 #. type: SH
180 #: build/C/man3/bsd_signal.3:99 build/C/man2/eventfd.2:417 build/C/man2/getitimer.2:246 build/C/man3/gsignal.3:103 build/C/man2/kill.2:171 build/C/man2/killpg.2:134 build/C/man2/pause.2:59 build/C/man2/prctl.2:1084 build/C/man3/profil.3:81 build/C/man3/psignal.3:113 build/C/man3/raise.3:82 build/C/man2/restart_syscall.2:135 build/C/man2/rt_sigqueueinfo.2:188 build/C/man2/s390_runtime_instr.2:88 build/C/man2/sgetmask.2:89 build/C/man2/sigaction.2:804 build/C/man2/sigaltstack.2:234 build/C/man7/sigevent.7:132 build/C/man3/siginterrupt.3:102 build/C/man2/signal.2:278 build/C/man7/signal.7:884 build/C/man2/signalfd.2:433 build/C/man3/sigpause.3:111 build/C/man2/sigpending.2:91 build/C/man2/sigprocmask.2:144 build/C/man3/sigqueue.3:154 build/C/man2/sigreturn.2:123 build/C/man3/sigset.3:266 build/C/man3/sigsetops.3:186 build/C/man2/sigsuspend.2:108 build/C/man3/sigvec.3:272 build/C/man3/sigwait.3:94 build/C/man2/sigwaitinfo.2:201 build/C/man3/sysv_signal.3:92 build/C/man2/timer_create.2:410 build/C/man2/timer_delete.2:69 build/C/man2/timer_getoverrun.2:131 build/C/man2/timer_settime.2:212 build/C/man2/timerfd_create.2:548 build/C/man2/tkill.2:124 build/C/man2/wait.2:635 build/C/man2/wait4.2:165
181 #, no-wrap
182 msgid "SEE ALSO"
183 msgstr ""
184
185 #. type: Plain text
186 #: build/C/man3/bsd_signal.3:104
187 msgid "B<sigaction>(2), B<signal>(2), B<sysv_signal>(3), B<signal>(7)"
188 msgstr ""
189
190 #. type: SH
191 #: build/C/man3/bsd_signal.3:104 build/C/man2/eventfd.2:428 build/C/man2/getitimer.2:253 build/C/man3/gsignal.3:107 build/C/man2/kill.2:181 build/C/man2/killpg.2:140 build/C/man2/pause.2:64 build/C/man2/prctl.2:1087 build/C/man3/profil.3:87 build/C/man3/psignal.3:118 build/C/man3/raise.3:89 build/C/man2/restart_syscall.2:144 build/C/man2/rt_sigqueueinfo.2:196 build/C/man2/s390_runtime_instr.2:91 build/C/man2/sgetmask.2:92 build/C/man2/sigaction.2:825 build/C/man2/sigaltstack.2:241 build/C/man7/sigevent.7:142 build/C/man3/siginterrupt.3:104 build/C/man2/signal.2:297 build/C/man7/signal.7:919 build/C/man2/signalfd.2:446 build/C/man3/sigpause.3:119 build/C/man2/sigpending.2:99 build/C/man2/sigprocmask.2:155 build/C/man3/sigqueue.3:162 build/C/man2/sigreturn.2:130 build/C/man3/sigset.3:276 build/C/man3/sigsetops.3:191 build/C/man2/sigsuspend.2:118 build/C/man3/sigvec.3:282 build/C/man3/sigwait.3:102 build/C/man2/sigwaitinfo.2:213 build/C/man3/sysv_signal.3:97 build/C/man2/timer_create.2:425 build/C/man2/timer_delete.2:75 build/C/man2/timer_getoverrun.2:141 build/C/man2/timer_settime.2:216 build/C/man2/timerfd_create.2:560 build/C/man2/tkill.2:129 build/C/man2/wait.2:647 build/C/man2/wait4.2:172
192 #, no-wrap
193 msgid "COLOPHON"
194 msgstr ""
195
196 #. type: Plain text
197 #: build/C/man3/bsd_signal.3:112 build/C/man2/eventfd.2:436 build/C/man2/getitimer.2:261 build/C/man3/gsignal.3:115 build/C/man2/kill.2:189 build/C/man2/killpg.2:148 build/C/man2/pause.2:72 build/C/man2/prctl.2:1095 build/C/man3/profil.3:95 build/C/man3/psignal.3:126 build/C/man3/raise.3:97 build/C/man2/restart_syscall.2:152 build/C/man2/rt_sigqueueinfo.2:204 build/C/man2/s390_runtime_instr.2:99 build/C/man2/sgetmask.2:100 build/C/man2/sigaction.2:833 build/C/man2/sigaltstack.2:249 build/C/man7/sigevent.7:150 build/C/man3/siginterrupt.3:112 build/C/man2/signal.2:305 build/C/man7/signal.7:927 build/C/man2/signalfd.2:454 build/C/man3/sigpause.3:127 build/C/man2/sigpending.2:107 build/C/man2/sigprocmask.2:163 build/C/man3/sigqueue.3:170 build/C/man2/sigreturn.2:138 build/C/man3/sigset.3:284 build/C/man3/sigsetops.3:199 build/C/man2/sigsuspend.2:126 build/C/man3/sigvec.3:290 build/C/man3/sigwait.3:110 build/C/man2/sigwaitinfo.2:221 build/C/man3/sysv_signal.3:105 build/C/man2/timer_create.2:433 build/C/man2/timer_delete.2:83 build/C/man2/timer_getoverrun.2:149 build/C/man2/timer_settime.2:224 build/C/man2/timerfd_create.2:568 build/C/man2/tkill.2:137 build/C/man2/wait.2:655 build/C/man2/wait4.2:180
198 msgid ""
199 "This page is part of release 3.76 of the Linux I<man-pages> project.  A "
200 "description of the project, information about reporting bugs, and the latest "
201 "version of this page, can be found at "
202 "\\%http://www.kernel.org/doc/man-pages/."
203 msgstr ""
204
205 #. type: TH
206 #: build/C/man2/eventfd.2:22
207 #, no-wrap
208 msgid "EVENTFD"
209 msgstr ""
210
211 #. type: TH
212 #: build/C/man2/eventfd.2:22 build/C/man2/getitimer.2:12 build/C/man3/profil.3:28 build/C/man2/signalfd.2:20
213 #, no-wrap
214 msgid "2014-07-08"
215 msgstr ""
216
217 #. type: TH
218 #: build/C/man2/eventfd.2:22 build/C/man2/getitimer.2:12 build/C/man2/kill.2:44 build/C/man2/killpg.2:42 build/C/man2/pause.2:30 build/C/man2/prctl.2:52 build/C/man3/profil.3:28 build/C/man2/restart_syscall.2:33 build/C/man2/rt_sigqueueinfo.2:25 build/C/man2/sgetmask.2:26 build/C/man2/sigaction.2:47 build/C/man2/sigaltstack.2:27 build/C/man2/signal.2:36 build/C/man7/signal.7:46 build/C/man2/signalfd.2:20 build/C/man3/sigpause.3:25 build/C/man2/sigpending.2:29 build/C/man2/sigprocmask.2:29 build/C/man3/sigqueue.3:28 build/C/man2/sigreturn.2:30 build/C/man3/sigset.3:26 build/C/man3/sigsetops.3:31 build/C/man2/sigsuspend.2:29 build/C/man3/sigvec.3:26 build/C/man3/sigwait.3:26 build/C/man2/sigwaitinfo.2:25 build/C/man2/timer_create.2:33 build/C/man2/timer_delete.2:26 build/C/man2/timer_getoverrun.2:26 build/C/man2/timer_settime.2:26 build/C/man2/timerfd_create.2:22 build/C/man2/tkill.2:29 build/C/man2/wait.2:49 build/C/man2/wait4.2:33
219 #, no-wrap
220 msgid "Linux"
221 msgstr ""
222
223 #. type: Plain text
224 #: build/C/man2/eventfd.2:25
225 msgid "eventfd - create a file descriptor for event notification"
226 msgstr ""
227
228 #. type: Plain text
229 #: build/C/man2/eventfd.2:27
230 msgid "B<#include E<lt>sys/eventfd.hE<gt>>"
231 msgstr ""
232
233 #. type: Plain text
234 #: build/C/man2/eventfd.2:29
235 msgid "B<int eventfd(unsigned int >I<initval>B<, int >I<flags>B<);>"
236 msgstr ""
237
238 #. type: Plain text
239 #: build/C/man2/eventfd.2:39
240 msgid ""
241 "B<eventfd>()  creates an \"eventfd object\" that can be used as an event "
242 "wait/notify mechanism by user-space applications, and by the kernel to "
243 "notify user-space applications of events.  The object contains an unsigned "
244 "64-bit integer (I<uint64_t>)  counter that is maintained by the kernel.  "
245 "This counter is initialized with the value specified in the argument "
246 "I<initval>."
247 msgstr ""
248
249 #. type: Plain text
250 #: build/C/man2/eventfd.2:44
251 msgid ""
252 "The following values may be bitwise ORed in I<flags> to change the behavior "
253 "of B<eventfd>():"
254 msgstr ""
255
256 #. type: TP
257 #: build/C/man2/eventfd.2:44
258 #, no-wrap
259 msgid "B<EFD_CLOEXEC> (since Linux 2.6.27)"
260 msgstr ""
261
262 #. type: Plain text
263 #: build/C/man2/eventfd.2:54 build/C/man2/signalfd.2:95 build/C/man2/timerfd_create.2:110
264 msgid ""
265 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See "
266 "the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this "
267 "may be useful."
268 msgstr ""
269
270 #. type: TP
271 #: build/C/man2/eventfd.2:54
272 #, no-wrap
273 msgid "B<EFD_NONBLOCK> (since Linux 2.6.27)"
274 msgstr ""
275
276 #. type: Plain text
277 #: build/C/man2/eventfd.2:62 build/C/man2/signalfd.2:85 build/C/man2/timerfd_create.2:100
278 msgid ""
279 "Set the B<O_NONBLOCK> file status flag on the new open file description.  "
280 "Using this flag saves extra calls to B<fcntl>(2)  to achieve the same "
281 "result."
282 msgstr ""
283
284 #. type: TP
285 #: build/C/man2/eventfd.2:62
286 #, no-wrap
287 msgid "B<EFD_SEMAPHORE> (since Linux 2.6.30)"
288 msgstr ""
289
290 #. type: Plain text
291 #: build/C/man2/eventfd.2:66
292 msgid ""
293 "Provide semaphore-like semantics for reads from the new file descriptor.  "
294 "See below."
295 msgstr ""
296
297 #. type: Plain text
298 #: build/C/man2/eventfd.2:70 build/C/man2/signalfd.2:99
299 msgid ""
300 "In Linux up to version 2.6.26, the I<flags> argument is unused, and must be "
301 "specified as zero."
302 msgstr ""
303
304 #. type: Plain text
305 #: build/C/man2/eventfd.2:76
306 msgid ""
307 "As its return value, B<eventfd>()  returns a new file descriptor that can be "
308 "used to refer to the eventfd object.  The following operations can be "
309 "performed on the file descriptor:"
310 msgstr ""
311
312 #. type: TP
313 #: build/C/man2/eventfd.2:76 build/C/man2/signalfd.2:102 build/C/man2/timerfd_create.2:218
314 #, no-wrap
315 msgid "B<read>(2)"
316 msgstr ""
317
318 #. type: Plain text
319 #: build/C/man2/eventfd.2:86
320 msgid ""
321 "Each successful B<read>(2)  returns an 8-byte integer.  A B<read>(2)  will "
322 "fail with the error B<EINVAL> if the size of the supplied buffer is less "
323 "than 8 bytes."
324 msgstr ""
325
326 #. type: Plain text
327 #: build/C/man2/eventfd.2:91
328 msgid ""
329 "The value returned by B<read>(2)  is in host byte order\\(emthat is, the "
330 "native byte order for integers on the host machine."
331 msgstr ""
332
333 #. type: Plain text
334 #: build/C/man2/eventfd.2:98
335 msgid ""
336 "The semantics of B<read>(2)  depend on whether the eventfd counter currently "
337 "has a nonzero value and whether the B<EFD_SEMAPHORE> flag was specified when "
338 "creating the eventfd file descriptor:"
339 msgstr ""
340
341 #. type: IP
342 #: build/C/man2/eventfd.2:99 build/C/man2/eventfd.2:106 build/C/man2/eventfd.2:113 build/C/man2/eventfd.2:158 build/C/man2/eventfd.2:168 build/C/man2/eventfd.2:178 build/C/man2/prctl.2:867 build/C/man2/prctl.2:872 build/C/man2/prctl.2:877 build/C/man2/prctl.2:887 build/C/man3/psignal.3:105 build/C/man3/psignal.3:109 build/C/man2/sigaction.2:309 build/C/man2/sigaction.2:324 build/C/man2/sigaction.2:340 build/C/man2/sigaction.2:355 build/C/man2/sigaction.2:402 build/C/man2/sigaction.2:438 build/C/man2/signal.2:68 build/C/man2/signal.2:73 build/C/man2/signal.2:80 build/C/man2/signal.2:224 build/C/man2/signal.2:228 build/C/man2/signal.2:244 build/C/man7/signal.7:149 build/C/man7/signal.7:157 build/C/man7/signal.7:615 build/C/man7/signal.7:617 build/C/man7/signal.7:638 build/C/man7/signal.7:672 build/C/man7/signal.7:676 build/C/man7/signal.7:683 build/C/man7/signal.7:701 build/C/man7/signal.7:707 build/C/man7/signal.7:714 build/C/man7/signal.7:719 build/C/man7/signal.7:723 build/C/man7/signal.7:742 build/C/man7/signal.7:756 build/C/man7/signal.7:767 build/C/man7/signal.7:774 build/C/man7/signal.7:783 build/C/man7/signal.7:791 build/C/man7/signal.7:797 build/C/man7/signal.7:817 build/C/man7/signal.7:831 build/C/man7/signal.7:842 build/C/man7/signal.7:845 build/C/man7/signal.7:848 build/C/man7/signal.7:851 build/C/man7/signal.7:858 build/C/man7/signal.7:864 build/C/man7/signal.7:868 build/C/man3/sigwait.3:62 build/C/man3/sigwait.3:67 build/C/man2/timer_create.2:218 build/C/man2/timer_create.2:221 build/C/man2/timer_create.2:224 build/C/man2/timer_create.2:228 build/C/man2/timer_create.2:231 build/C/man2/timer_create.2:246 build/C/man2/timer_create.2:250
343 #, no-wrap
344 msgid "*"
345 msgstr ""
346
347 #. type: Plain text
348 #: build/C/man2/eventfd.2:106
349 msgid ""
350 "If B<EFD_SEMAPHORE> was not specified and the eventfd counter has a nonzero "
351 "value, then a B<read>(2)  returns 8 bytes containing that value, and the "
352 "counter's value is reset to zero."
353 msgstr ""
354
355 #. type: Plain text
356 #: build/C/man2/eventfd.2:113
357 msgid ""
358 "If B<EFD_SEMAPHORE> was specified and the eventfd counter has a nonzero "
359 "value, then a B<read>(2)  returns 8 bytes containing the value 1, and the "
360 "counter's value is decremented by 1."
361 msgstr ""
362
363 #. type: Plain text
364 #: build/C/man2/eventfd.2:123
365 msgid ""
366 "If the eventfd counter is zero at the time of the call to B<read>(2), then "
367 "the call either blocks until the counter becomes nonzero (at which time, the "
368 "B<read>(2)  proceeds as described above)  or fails with the error B<EAGAIN> "
369 "if the file descriptor has been made nonblocking."
370 msgstr ""
371
372 #. type: TP
373 #: build/C/man2/eventfd.2:124
374 #, no-wrap
375 msgid "B<write>(2)"
376 msgstr ""
377
378 #. type: Plain text
379 #: build/C/man2/eventfd.2:141
380 msgid ""
381 "A B<write>(2)  call adds the 8-byte integer value supplied in its buffer to "
382 "the counter.  The maximum value that may be stored in the counter is the "
383 "largest unsigned 64-bit value minus 1 (i.e., 0xfffffffffffffffe).  If the "
384 "addition would cause the counter's value to exceed the maximum, then the "
385 "B<write>(2)  either blocks until a B<read>(2)  is performed on the file "
386 "descriptor, or fails with the error B<EAGAIN> if the file descriptor has "
387 "been made nonblocking."
388 msgstr ""
389
390 #. type: Plain text
391 #: build/C/man2/eventfd.2:148
392 msgid ""
393 "A B<write>(2)  will fail with the error B<EINVAL> if the size of the "
394 "supplied buffer is less than 8 bytes, or if an attempt is made to write the "
395 "value 0xffffffffffffffff."
396 msgstr ""
397
398 #. type: TP
399 #: build/C/man2/eventfd.2:148 build/C/man2/signalfd.2:140 build/C/man2/timerfd_create.2:251
400 #, no-wrap
401 msgid "B<poll>(2), B<select>(2) (and similar)"
402 msgstr ""
403
404 #. type: Plain text
405 #: build/C/man2/eventfd.2:157
406 msgid ""
407 "The returned file descriptor supports B<poll>(2)  (and analogously "
408 "B<epoll>(7))  and B<select>(2), as follows:"
409 msgstr ""
410
411 #. type: Plain text
412 #: build/C/man2/eventfd.2:168
413 msgid ""
414 "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the "
415 "B<poll>(2)  B<POLLIN> flag)  if the counter has a value greater than 0."
416 msgstr ""
417
418 #. type: Plain text
419 #: build/C/man2/eventfd.2:178
420 msgid ""
421 "The file descriptor is writable (the B<select>(2)  I<writefds> argument; the "
422 "B<poll>(2)  B<POLLOUT> flag)  if it is possible to write a value of at least "
423 "\"1\" without blocking."
424 msgstr ""
425
426 #. type: Plain text
427 #: build/C/man2/eventfd.2:198
428 msgid ""
429 "If an overflow of the counter value was detected, then B<select>(2)  "
430 "indicates the file descriptor as being both readable and writable, and "
431 "B<poll>(2)  returns a B<POLLERR> event.  As noted above, B<write>(2)  can "
432 "never overflow the counter.  However an overflow can occur if 2^64 eventfd "
433 "\"signal posts\" were performed by the KAIO subsystem (theoretically "
434 "possible, but practically unlikely).  If an overflow has occurred, then "
435 "B<read>(2)  will return that maximum I<uint64_t> value (i.e., "
436 "0xffffffffffffffff)."
437 msgstr ""
438
439 #. type: Plain text
440 #: build/C/man2/eventfd.2:205
441 msgid ""
442 "The eventfd file descriptor also supports the other file-descriptor "
443 "multiplexing APIs: B<pselect>(2)  and B<ppoll>(2)."
444 msgstr ""
445
446 #. type: TP
447 #: build/C/man2/eventfd.2:205 build/C/man2/signalfd.2:160 build/C/man2/timerfd_create.2:269
448 #, no-wrap
449 msgid "B<close>(2)"
450 msgstr ""
451
452 #. type: Plain text
453 #: build/C/man2/eventfd.2:210
454 msgid ""
455 "When the file descriptor is no longer required it should be closed.  When "
456 "all file descriptors associated with the same eventfd object have been "
457 "closed, the resources for object are freed by the kernel."
458 msgstr ""
459
460 #. type: Plain text
461 #: build/C/man2/eventfd.2:222
462 msgid ""
463 "A copy of the file descriptor created by B<eventfd>()  is inherited by the "
464 "child produced by B<fork>(2).  The duplicate file descriptor is associated "
465 "with the same eventfd object.  File descriptors created by B<eventfd>()  are "
466 "preserved across B<execve>(2), unless the close-on-exec flag has been set."
467 msgstr ""
468
469 #. type: Plain text
470 #: build/C/man2/eventfd.2:229
471 msgid ""
472 "On success, B<eventfd>()  returns a new eventfd file descriptor.  On error, "
473 "-1 is returned and I<errno> is set to indicate the error."
474 msgstr ""
475
476 #. type: TP
477 #: build/C/man2/eventfd.2:230 build/C/man2/getitimer.2:142 build/C/man2/kill.2:106 build/C/man2/killpg.2:95 build/C/man2/prctl.2:829 build/C/man2/prctl.2:834 build/C/man2/prctl.2:846 build/C/man2/prctl.2:851 build/C/man2/prctl.2:860 build/C/man2/prctl.2:900 build/C/man2/prctl.2:910 build/C/man2/prctl.2:918 build/C/man2/prctl.2:929 build/C/man2/prctl.2:938 build/C/man2/prctl.2:952 build/C/man2/prctl.2:964 build/C/man2/prctl.2:975 build/C/man2/rt_sigqueueinfo.2:141 build/C/man2/s390_runtime_instr.2:66 build/C/man2/sigaction.2:681 build/C/man2/sigaltstack.2:142 build/C/man3/siginterrupt.3:84 build/C/man2/signal.2:106 build/C/man2/signalfd.2:271 build/C/man2/signalfd.2:279 build/C/man2/sigprocmask.2:107 build/C/man3/sigqueue.3:98 build/C/man3/sigsetops.3:128 build/C/man3/sigwait.3:75 build/C/man2/sigwaitinfo.2:129 build/C/man2/timer_create.2:181 build/C/man2/timer_delete.2:61 build/C/man2/timer_getoverrun.2:91 build/C/man2/timer_settime.2:191 build/C/man2/timer_settime.2:199 build/C/man2/timerfd_create.2:312 build/C/man2/timerfd_create.2:320 build/C/man2/timerfd_create.2:356 build/C/man2/timerfd_create.2:363 build/C/man2/timerfd_create.2:369 build/C/man2/tkill.2:93 build/C/man2/wait.2:418
478 #, no-wrap
479 msgid "B<EINVAL>"
480 msgstr ""
481
482 #. type: Plain text
483 #: build/C/man2/eventfd.2:234
484 msgid "An unsupported value was specified in I<flags>."
485 msgstr ""
486
487 #. type: TP
488 #: build/C/man2/eventfd.2:234 build/C/man2/signalfd.2:286 build/C/man2/timerfd_create.2:327
489 #, no-wrap
490 msgid "B<EMFILE>"
491 msgstr ""
492
493 #. type: Plain text
494 #: build/C/man2/eventfd.2:237
495 msgid "The per-process limit on open file descriptors has been reached."
496 msgstr ""
497
498 #. type: TP
499 #: build/C/man2/eventfd.2:237 build/C/man2/signalfd.2:289 build/C/man2/timerfd_create.2:330
500 #, no-wrap
501 msgid "B<ENFILE>"
502 msgstr ""
503
504 #. type: Plain text
505 #: build/C/man2/eventfd.2:241 build/C/man2/signalfd.2:293 build/C/man2/timerfd_create.2:334
506 msgid "The system-wide limit on the total number of open files has been reached."
507 msgstr ""
508
509 #. type: TP
510 #: build/C/man2/eventfd.2:241 build/C/man2/signalfd.2:293 build/C/man2/timerfd_create.2:334
511 #, no-wrap
512 msgid "B<ENODEV>"
513 msgstr ""
514
515 #. type: Plain text
516 #: build/C/man2/eventfd.2:249 build/C/man2/signalfd.2:296 build/C/man2/timerfd_create.2:337
517 msgid "Could not mount (internal) anonymous inode device."
518 msgstr ""
519
520 #. type: TP
521 #: build/C/man2/eventfd.2:249 build/C/man2/s390_runtime_instr.2:73 build/C/man2/sigaltstack.2:147 build/C/man2/signalfd.2:296 build/C/man2/timer_create.2:189 build/C/man2/timerfd_create.2:337
522 #, no-wrap
523 msgid "B<ENOMEM>"
524 msgstr ""
525
526 #. type: Plain text
527 #: build/C/man2/eventfd.2:253
528 msgid "There was insufficient memory to create a new eventfd file descriptor."
529 msgstr ""
530
531 #. type: SH
532 #: build/C/man2/eventfd.2:253 build/C/man2/prctl.2:1065 build/C/man3/psignal.3:95 build/C/man2/restart_syscall.2:96 build/C/man2/rt_sigqueueinfo.2:169 build/C/man2/s390_runtime_instr.2:79 build/C/man2/sgetmask.2:66 build/C/man2/signalfd.2:299 build/C/man3/sigqueue.3:112 build/C/man3/sigvec.3:234 build/C/man2/timer_create.2:193 build/C/man2/timer_delete.2:65 build/C/man2/timer_getoverrun.2:95 build/C/man2/timer_settime.2:205 build/C/man2/timerfd_create.2:375 build/C/man2/tkill.2:104
533 #, no-wrap
534 msgid "VERSIONS"
535 msgstr ""
536
537 #.  eventfd() is in glibc 2.7, but reportedly does not build
538 #. type: Plain text
539 #: build/C/man2/eventfd.2:266
540 msgid ""
541 "B<eventfd>()  is available on Linux since kernel 2.6.22.  Working support is "
542 "provided in glibc since version 2.8.  The B<eventfd2>()  system call (see "
543 "NOTES) is available on Linux since kernel 2.6.27.  Since version 2.9, the "
544 "glibc B<eventfd>()  wrapper will employ the B<eventfd2>()  system call, if "
545 "it is supported by the kernel."
546 msgstr ""
547
548 #. type: Plain text
549 #: build/C/man2/eventfd.2:271
550 msgid "B<eventfd>()  and B<eventfd2>()  are Linux-specific."
551 msgstr ""
552
553 #. type: Plain text
554 #: build/C/man2/eventfd.2:279
555 msgid ""
556 "Applications can use an eventfd file descriptor instead of a pipe (see "
557 "B<pipe>(2))  in all cases where a pipe is used simply to signal events.  The "
558 "kernel overhead of an eventfd file descriptor is much lower than that of a "
559 "pipe, and only one file descriptor is required (versus the two required for "
560 "a pipe)."
561 msgstr ""
562
563 #.  or eventually syslets/threadlets
564 #. type: Plain text
565 #: build/C/man2/eventfd.2:285
566 msgid ""
567 "When used in the kernel, an eventfd file descriptor can provide a bridge "
568 "from kernel to user space, allowing, for example, functionalities like KAIO "
569 "(kernel AIO)  to signal to a file descriptor that some operation is "
570 "complete."
571 msgstr ""
572
573 #. type: Plain text
574 #: build/C/man2/eventfd.2:302
575 msgid ""
576 "A key point about an eventfd file descriptor is that it can be monitored "
577 "just like any other file descriptor using B<select>(2), B<poll>(2), or "
578 "B<epoll>(7).  This means that an application can simultaneously monitor the "
579 "readiness of \"traditional\" files and the readiness of other kernel "
580 "mechanisms that support the eventfd interface.  (Without the B<eventfd>()  "
581 "interface, these mechanisms could not be multiplexed via B<select>(2), "
582 "B<poll>(2), or B<epoll>(7).)"
583 msgstr ""
584
585 #. type: SS
586 #: build/C/man2/eventfd.2:302 build/C/man2/signalfd.2:326 build/C/man2/sigwaitinfo.2:183 build/C/man2/timer_create.2:243 build/C/man2/wait.2:525
587 #, no-wrap
588 msgid "C library/kernel ABI differences"
589 msgstr ""
590
591 #. type: Plain text
592 #: build/C/man2/eventfd.2:316
593 msgid ""
594 "There are two underlying Linux system calls: B<eventfd>()  and the more "
595 "recent B<eventfd2>().  The former system call does not implement a I<flags> "
596 "argument.  The latter system call implements the I<flags> values described "
597 "above.  The glibc wrapper function will use B<eventfd2>()  where it is "
598 "available."
599 msgstr ""
600
601 #. type: SS
602 #: build/C/man2/eventfd.2:316
603 #, no-wrap
604 msgid "Additional glibc features"
605 msgstr ""
606
607 #. type: Plain text
608 #: build/C/man2/eventfd.2:320
609 msgid ""
610 "The GNU C library defines an additional type, and two functions that attempt "
611 "to abstract some of the details of reading and writing on an eventfd file "
612 "descriptor:"
613 msgstr ""
614
615 #. type: Plain text
616 #: build/C/man2/eventfd.2:324
617 #, no-wrap
618 msgid "typedef uint64_t eventfd_t;\n"
619 msgstr ""
620
621 #. type: Plain text
622 #: build/C/man2/eventfd.2:327
623 #, no-wrap
624 msgid ""
625 "int eventfd_read(int fd, eventfd_t *value);\n"
626 "int eventfd_write(int fd, eventfd_t value);\n"
627 msgstr ""
628
629 #. type: Plain text
630 #: build/C/man2/eventfd.2:334
631 msgid ""
632 "The functions perform the read and write operations on an eventfd file "
633 "descriptor, returning 0 if the correct number of bytes was transferred, or "
634 "-1 otherwise."
635 msgstr ""
636
637 #. type: SH
638 #: build/C/man2/eventfd.2:334 build/C/man2/sigaction.2:801 build/C/man2/sigaltstack.2:217 build/C/man2/signalfd.2:360 build/C/man3/sigwait.3:91 build/C/man2/timer_create.2:264 build/C/man2/timer_getoverrun.2:128 build/C/man2/timer_settime.2:209 build/C/man2/timerfd_create.2:386 build/C/man2/wait.2:552
639 #, no-wrap
640 msgid "EXAMPLE"
641 msgstr ""
642
643 #. type: Plain text
644 #: build/C/man2/eventfd.2:343
645 msgid ""
646 "The following program creates an eventfd file descriptor and then forks to "
647 "create a child process.  While the parent briefly sleeps, the child writes "
648 "each of the integers supplied in the program's command-line arguments to the "
649 "eventfd file descriptor.  When the parent has finished sleeping, it reads "
650 "from the eventfd file descriptor."
651 msgstr ""
652
653 #. type: Plain text
654 #: build/C/man2/eventfd.2:345
655 msgid "The following shell session shows a sample run of the program:"
656 msgstr ""
657
658 #. type: Plain text
659 #: build/C/man2/eventfd.2:357
660 #, no-wrap
661 msgid ""
662 "$B< ./a.out 1 2 4 7 14>\n"
663 "Child writing 1 to efd\n"
664 "Child writing 2 to efd\n"
665 "Child writing 4 to efd\n"
666 "Child writing 7 to efd\n"
667 "Child writing 14 to efd\n"
668 "Child completed write loop\n"
669 "Parent about to read\n"
670 "Parent read 28 (0x1c) from efd\n"
671 msgstr ""
672
673 #. type: SS
674 #: build/C/man2/eventfd.2:359 build/C/man2/signalfd.2:383 build/C/man2/timer_create.2:295 build/C/man2/timerfd_create.2:414 build/C/man2/wait.2:587
675 #, no-wrap
676 msgid "Program source"
677 msgstr ""
678
679 #. type: Plain text
680 #: build/C/man2/eventfd.2:367
681 #, no-wrap
682 msgid ""
683 "#include E<lt>sys/eventfd.hE<gt>\n"
684 "#include E<lt>unistd.hE<gt>\n"
685 "#include E<lt>stdlib.hE<gt>\n"
686 "#include E<lt>stdio.hE<gt>\n"
687 "#include E<lt>stdint.hE<gt>             /* Definition of uint64_t */\n"
688 msgstr ""
689
690 #. type: Plain text
691 #: build/C/man2/eventfd.2:370 build/C/man2/signalfd.2:394
692 #, no-wrap
693 msgid ""
694 "#define handle_error(msg) \\e\n"
695 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
696 msgstr ""
697
698 #. type: Plain text
699 #: build/C/man2/eventfd.2:377
700 #, no-wrap
701 msgid ""
702 "int\n"
703 "main(int argc, char *argv[])\n"
704 "{\n"
705 "    int efd, j;\n"
706 "    uint64_t u;\n"
707 "    ssize_t s;\n"
708 msgstr ""
709
710 #. type: Plain text
711 #: build/C/man2/eventfd.2:382
712 #, no-wrap
713 msgid ""
714 "    if (argc E<lt> 2) {\n"
715 "        fprintf(stderr, \"Usage: %s E<lt>numE<gt>...\\en\", argv[0]);\n"
716 "        exit(EXIT_FAILURE);\n"
717 "    }\n"
718 msgstr ""
719
720 #. type: Plain text
721 #: build/C/man2/eventfd.2:386
722 #, no-wrap
723 msgid ""
724 "    efd = eventfd(0, 0);\n"
725 "    if (efd == -1)\n"
726 "        handle_error(\"eventfd\");\n"
727 msgstr ""
728
729 #. type: Plain text
730 #: build/C/man2/eventfd.2:398
731 #, no-wrap
732 msgid ""
733 "    switch (fork()) {\n"
734 "    case 0:\n"
735 "        for (j = 1; j E<lt> argc; j++) {\n"
736 "            printf(\"Child writing %s to efd\\en\", argv[j]);\n"
737 "            u = strtoull(argv[j], NULL, 0);\n"
738 "                    /* strtoull() allows various bases */\n"
739 "            s = write(efd, &u, sizeof(uint64_t));\n"
740 "            if (s != sizeof(uint64_t))\n"
741 "                handle_error(\"write\");\n"
742 "        }\n"
743 "        printf(\"Child completed write loop\\en\");\n"
744 msgstr ""
745
746 #. type: Plain text
747 #: build/C/man2/eventfd.2:400
748 #, no-wrap
749 msgid "        exit(EXIT_SUCCESS);\n"
750 msgstr ""
751
752 #. type: Plain text
753 #: build/C/man2/eventfd.2:403
754 #, no-wrap
755 msgid ""
756 "    default:\n"
757 "        sleep(2);\n"
758 msgstr ""
759
760 #. type: Plain text
761 #: build/C/man2/eventfd.2:411
762 #, no-wrap
763 msgid ""
764 "        printf(\"Parent about to read\\en\");\n"
765 "        s = read(efd, &u, sizeof(uint64_t));\n"
766 "        if (s != sizeof(uint64_t))\n"
767 "            handle_error(\"read\");\n"
768 "        printf(\"Parent read %llu (0x%llx) from efd\\en\",\n"
769 "                (unsigned long long) u, (unsigned long long) u);\n"
770 "        exit(EXIT_SUCCESS);\n"
771 msgstr ""
772
773 #. type: Plain text
774 #: build/C/man2/eventfd.2:416
775 #, no-wrap
776 msgid ""
777 "    case -1:\n"
778 "        handle_error(\"fork\");\n"
779 "    }\n"
780 "}\n"
781 msgstr ""
782
783 #. type: Plain text
784 #: build/C/man2/eventfd.2:428
785 msgid ""
786 "B<futex>(2), B<pipe>(2), B<poll>(2), B<read>(2), B<select>(2), "
787 "B<signalfd>(2), B<timerfd_create>(2), B<write>(2), B<epoll>(7), "
788 "B<sem_overview>(7)"
789 msgstr ""
790
791 #. type: TH
792 #: build/C/man2/getitimer.2:12
793 #, no-wrap
794 msgid "GETITIMER"
795 msgstr ""
796
797 #. type: Plain text
798 #: build/C/man2/getitimer.2:15
799 msgid "getitimer, setitimer - get or set value of an interval timer"
800 msgstr ""
801
802 #. type: Plain text
803 #: build/C/man2/getitimer.2:18
804 #, no-wrap
805 msgid "B<#include E<lt>sys/time.hE<gt>>\n"
806 msgstr ""
807
808 #. type: Plain text
809 #: build/C/man2/getitimer.2:20
810 #, no-wrap
811 msgid "B<int getitimer(int >I<which>B<, struct itimerval *>I<curr_value>B<);>\n"
812 msgstr ""
813
814 #. type: Plain text
815 #: build/C/man2/getitimer.2:23
816 #, no-wrap
817 msgid ""
818 "B<int setitimer(int >I<which>B<, const struct itimerval *>I<new_value>B<,>\n"
819 "B<              struct itimerval *>I<old_value>B<);>\n"
820 msgstr ""
821
822 #. type: Plain text
823 #: build/C/man2/getitimer.2:29
824 msgid ""
825 "The system provides each process with three interval timers, each "
826 "decrementing in a distinct time domain.  When a timer expires, a signal is "
827 "sent to the process, and the timer is reset to the specified interval (if "
828 "nonzero)."
829 msgstr ""
830
831 #. type: TP
832 #: build/C/man2/getitimer.2:29
833 #, no-wrap
834 msgid "B<ITIMER_REAL>"
835 msgstr ""
836
837 #. type: Plain text
838 #: build/C/man2/getitimer.2:34
839 msgid "decrements in real time, and delivers B<SIGALRM> upon expiration."
840 msgstr ""
841
842 #. type: TP
843 #: build/C/man2/getitimer.2:34
844 #, no-wrap
845 msgid "B<ITIMER_VIRTUAL>"
846 msgstr ""
847
848 #. type: Plain text
849 #: build/C/man2/getitimer.2:39
850 msgid ""
851 "decrements only when the process is executing, and delivers B<SIGVTALRM> "
852 "upon expiration."
853 msgstr ""
854
855 #. type: TP
856 #: build/C/man2/getitimer.2:39
857 #, no-wrap
858 msgid "B<ITIMER_PROF>"
859 msgstr ""
860
861 #. type: Plain text
862 #: build/C/man2/getitimer.2:49
863 msgid ""
864 "decrements both when the process executes and when the system is executing "
865 "on behalf of the process.  Coupled with B<ITIMER_VIRTUAL>, this timer is "
866 "usually used to profile the time spent by the application in user and kernel "
867 "space.  B<SIGPROF> is delivered upon expiration."
868 msgstr ""
869
870 #. type: Plain text
871 #: build/C/man2/getitimer.2:51
872 msgid "Timer values are defined by the following structures:"
873 msgstr ""
874
875 #. type: Plain text
876 #: build/C/man2/getitimer.2:59
877 #, no-wrap
878 msgid ""
879 "struct itimerval {\n"
880 "    struct timeval it_interval; /* Interval for periodic timer */\n"
881 "    struct timeval it_value;    /* Time until next expiration */\n"
882 "};\n"
883 msgstr ""
884
885 #. type: Plain text
886 #: build/C/man2/getitimer.2:64
887 #, no-wrap
888 msgid ""
889 "struct timeval {\n"
890 "    time_t      tv_sec;         /* seconds */\n"
891 "    suseconds_t tv_usec;        /* microseconds */\n"
892 "};\n"
893 msgstr ""
894
895 #. type: Plain text
896 #: build/C/man2/getitimer.2:90
897 msgid ""
898 "The function B<getitimer>()  fills the structure pointed to by I<curr_value> "
899 "with the current value (i.e., the amount of time remaining until the next "
900 "expiration)  of the timer specified by I<which> (one of B<ITIMER_REAL>, "
901 "B<ITIMER_VIRTUAL>, or B<ITIMER_PROF>).  The subfields of the field "
902 "I<it_value> are set to the amount of time remaining on the timer, or zero if "
903 "the timer is disabled.  The I<it_interval> field is set to the timer "
904 "interval (period); a value of zero returned in (both subfields of) this "
905 "field indicates that this is a single-shot timer."
906 msgstr ""
907
908 #. type: Plain text
909 #: build/C/man2/getitimer.2:101
910 msgid ""
911 "The function B<setitimer>()  sets the specified timer to the value in "
912 "I<new_value>.  If I<old_value> is non-NULL, the old value of the timer "
913 "(i.e., the same information as returned by B<getitimer>())  is stored there."
914 msgstr ""
915
916 #. type: Plain text
917 #: build/C/man2/getitimer.2:111
918 msgid ""
919 "Timers decrement from I<it_value> to zero, generate a signal, and reset to "
920 "I<it_interval>.  A timer which is set to zero (I<it_value> is zero or the "
921 "timer expires and I<it_interval> is zero) stops."
922 msgstr ""
923
924 #. type: Plain text
925 #: build/C/man2/getitimer.2:117
926 msgid ""
927 "Both I<tv_sec> and I<tv_usec> are significant in determining the duration of "
928 "a timer."
929 msgstr ""
930
931 #. type: Plain text
932 #: build/C/man2/getitimer.2:129
933 msgid ""
934 "Timers will never expire before the requested time, but may expire some "
935 "(short) time afterward, which depends on the system timer resolution and on "
936 "the system load; see B<time>(7).  (But see BUGS below.)  Upon expiration, a "
937 "signal will be generated and the timer reset.  If the timer expires while "
938 "the process is active (always true for B<ITIMER_VIRTUAL>), the signal will "
939 "be delivered immediately when generated.  Otherwise, the delivery will be "
940 "offset by a small time dependent on the system loading."
941 msgstr ""
942
943 #. type: Plain text
944 #: build/C/man2/getitimer.2:134 build/C/man2/killpg.2:94 build/C/man2/tkill.2:92
945 msgid ""
946 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
947 "appropriately."
948 msgstr ""
949
950 #. type: TP
951 #: build/C/man2/getitimer.2:135 build/C/man2/prctl.2:825 build/C/man2/sigaction.2:677 build/C/man2/sigaltstack.2:138 build/C/man2/sigpending.2:60 build/C/man2/sigprocmask.2:100 build/C/man2/sigsuspend.2:77 build/C/man2/timer_settime.2:184 build/C/man2/timerfd_create.2:349
952 #, no-wrap
953 msgid "B<EFAULT>"
954 msgstr ""
955
956 #. type: Plain text
957 #: build/C/man2/getitimer.2:142 build/C/man2/timerfd_create.2:356
958 msgid "I<new_value>, I<old_value>, or I<curr_value> is not valid a pointer."
959 msgstr ""
960
961 #. type: Plain text
962 #: build/C/man2/getitimer.2:155
963 msgid ""
964 "I<which> is not one of B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, or B<ITIMER_PROF>; "
965 "or (since Linux 2.6.22) one of the I<tv_usec> fields in the structure "
966 "pointed to by I<new_value> contains a value outside the range 0 to 999999."
967 msgstr ""
968
969 #. type: Plain text
970 #: build/C/man2/getitimer.2:165
971 msgid ""
972 "POSIX.1-2001, SVr4, 4.4BSD (this call first appeared in 4.2BSD).  "
973 "POSIX.1-2008 marks B<getitimer>()  and B<setitimer>()  obsolete, "
974 "recommending the use of the POSIX timers API (B<timer_gettime>(2), "
975 "B<timer_settime>(2), etc.) instead."
976 msgstr ""
977
978 #. type: Plain text
979 #: build/C/man2/getitimer.2:171
980 msgid ""
981 "A child created via B<fork>(2)  does not inherit its parent's interval "
982 "timers.  Interval timers are preserved across an B<execve>(2)."
983 msgstr ""
984
985 #. type: Plain text
986 #: build/C/man2/getitimer.2:181
987 msgid ""
988 "POSIX.1 leaves the interaction between B<setitimer>()  and the three "
989 "interfaces B<alarm>(2), B<sleep>(3), and B<usleep>(3)  unspecified."
990 msgstr ""
991
992 #. type: Plain text
993 #: build/C/man2/getitimer.2:183
994 msgid "The standards are silent on the meaning of the call:"
995 msgstr ""
996
997 #. type: Plain text
998 #: build/C/man2/getitimer.2:185
999 #, no-wrap
1000 msgid "    setitimer(which, NULL, &old_value);\n"
1001 msgstr ""
1002
1003 #. type: Plain text
1004 #: build/C/man2/getitimer.2:188
1005 msgid ""
1006 "Many systems (Solaris, the BSDs, and perhaps others)  treat this as "
1007 "equivalent to:"
1008 msgstr ""
1009
1010 #. type: Plain text
1011 #: build/C/man2/getitimer.2:190
1012 #, no-wrap
1013 msgid "    getitimer(which, &old_value);\n"
1014 msgstr ""
1015
1016 #. type: Plain text
1017 #: build/C/man2/getitimer.2:196
1018 msgid ""
1019 "In Linux, this is treated as being equivalent to a call in which the "
1020 "I<new_value> fields are zero; that is, the timer is disabled.  I<Don't use "
1021 "this Linux misfeature>: it is nonportable and unnecessary."
1022 msgstr ""
1023
1024 #. type: SH
1025 #: build/C/man2/getitimer.2:196 build/C/man2/kill.2:161 build/C/man3/profil.3:72 build/C/man3/psignal.3:101 build/C/man2/sigaction.2:792 build/C/man2/signalfd.2:352 build/C/man2/sigpending.2:85 build/C/man3/sigset.3:232 build/C/man2/timer_getoverrun.2:115 build/C/man2/timerfd_create.2:380 build/C/man2/wait.2:537
1026 #, no-wrap
1027 msgid "BUGS"
1028 msgstr ""
1029
1030 #. type: Plain text
1031 #: build/C/man2/getitimer.2:205
1032 msgid ""
1033 "The generation and delivery of a signal are distinct, and only one instance "
1034 "of each of the signals listed above may be pending for a process.  Under "
1035 "very heavy loading, an B<ITIMER_REAL> timer may expire before the signal "
1036 "from a previous expiration has been delivered.  The second signal in such an "
1037 "event will be lost."
1038 msgstr ""
1039
1040 #. type: Plain text
1041 #: build/C/man2/getitimer.2:220
1042 msgid ""
1043 "On Linux kernels before 2.6.16, timer values are represented in jiffies.  If "
1044 "a request is made set a timer with a value whose jiffies representation "
1045 "exceeds B<MAX_SEC_IN_JIFFIES> (defined in I<include/linux/jiffies.h>), then "
1046 "the timer is silently truncated to this ceiling value.  On Linux/i386 "
1047 "(where, since Linux 2.6.13, the default jiffy is 0.004 seconds), this means "
1048 "that the ceiling value for a timer is approximately 99.42 days.  Since Linux "
1049 "2.6.16, the kernel uses a different internal representation for times, and "
1050 "this ceiling is removed."
1051 msgstr ""
1052
1053 #.  4 Jul 2005: It looks like this bug may remain in 2.4.x.
1054 #.      http://lkml.org/lkml/2005/7/1/165
1055 #. type: Plain text
1056 #: build/C/man2/getitimer.2:227
1057 msgid ""
1058 "On certain systems (including i386), Linux kernels before version 2.6.12 "
1059 "have a bug which will produce premature timer expirations of up to one jiffy "
1060 "under some circumstances.  This bug is fixed in kernel 2.6.12."
1061 msgstr ""
1062
1063 #.  Bugzilla report 25 Apr 2006:
1064 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6443
1065 #.  "setitimer() should reject noncanonical arguments"
1066 #. type: Plain text
1067 #: build/C/man2/getitimer.2:246
1068 msgid ""
1069 "POSIX.1-2001 says that B<setitimer>()  should fail if a I<tv_usec> value is "
1070 "specified that is outside of the range 0 to 999999.  However, in kernels up "
1071 "to and including 2.6.21, Linux does not give an error, but instead silently "
1072 "adjusts the corresponding seconds value for the timer.  From kernel 2.6.22 "
1073 "onward, this nonconformance has been repaired: an improper I<tv_usec> value "
1074 "results in an B<EINVAL> error."
1075 msgstr ""
1076
1077 #. type: Plain text
1078 #: build/C/man2/getitimer.2:253
1079 msgid ""
1080 "B<gettimeofday>(2), B<sigaction>(2), B<signal>(2), B<timer_create>(2), "
1081 "B<timerfd_create>(2), B<time>(7)"
1082 msgstr ""
1083
1084 #. type: TH
1085 #: build/C/man3/gsignal.3:27
1086 #, no-wrap
1087 msgid "GSIGNAL"
1088 msgstr ""
1089
1090 #. type: TH
1091 #: build/C/man3/gsignal.3:27
1092 #, no-wrap
1093 msgid "2007-07-26"
1094 msgstr ""
1095
1096 #. type: Plain text
1097 #: build/C/man3/gsignal.3:30
1098 msgid "gsignal, ssignal - software signal facility"
1099 msgstr ""
1100
1101 #. type: Plain text
1102 #: build/C/man3/gsignal.3:33 build/C/man2/kill.2:52 build/C/man3/psignal.3:36 build/C/man3/raise.3:35 build/C/man2/sigaction.2:53 build/C/man3/siginterrupt.3:37 build/C/man3/sigpause.3:31 build/C/man3/sigwait.3:32 build/C/man2/sigwaitinfo.2:31
1103 #, no-wrap
1104 msgid "B<#include E<lt>signal.hE<gt>>\n"
1105 msgstr ""
1106
1107 #. type: Plain text
1108 #: build/C/man3/gsignal.3:35
1109 #, no-wrap
1110 msgid "B<typedef void (*sighandler_t)(int);>\n"
1111 msgstr ""
1112
1113 #. type: Plain text
1114 #: build/C/man3/gsignal.3:37
1115 #, no-wrap
1116 msgid "B<int gsignal(int >I<signum>B<);>\n"
1117 msgstr ""
1118
1119 #. type: Plain text
1120 #: build/C/man3/gsignal.3:39
1121 #, no-wrap
1122 msgid "B<sighandler_t ssignal(int >I<signum>B<, sighandler_t >I<action>B<);>\n"
1123 msgstr ""
1124
1125 #. type: Plain text
1126 #: build/C/man3/gsignal.3:44 build/C/man2/kill.2:59 build/C/man2/killpg.2:53 build/C/man3/profil.3:42 build/C/man3/psignal.3:46 build/C/man2/sigaction.2:61 build/C/man2/sigaltstack.2:38 build/C/man3/siginterrupt.3:44 build/C/man2/sigpending.2:40 build/C/man2/sigprocmask.2:41 build/C/man3/sigqueue.3:39 build/C/man3/sigset.3:45 build/C/man3/sigsetops.3:51 build/C/man2/sigsuspend.2:40 build/C/man3/sigvec.3:45 build/C/man3/sigwait.3:39 build/C/man2/sigwaitinfo.2:41 build/C/man2/timer_create.2:50 build/C/man2/timer_delete.2:41 build/C/man2/timer_getoverrun.2:41 build/C/man2/timer_settime.2:45 build/C/man2/wait.2:69 build/C/man2/wait4.2:53
1127 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1128 msgstr ""
1129
1130 #. type: Plain text
1131 #: build/C/man3/gsignal.3:49
1132 msgid "B<gsignal>(), B<ssignal>(): _SVID_SOURCE"
1133 msgstr ""
1134
1135 #. type: Plain text
1136 #: build/C/man3/gsignal.3:57
1137 msgid ""
1138 "Don't use these functions under Linux.  Due to a historical mistake, under "
1139 "Linux these functions are aliases for B<raise>(3)  and B<signal>(2), "
1140 "respectively."
1141 msgstr ""
1142
1143 #. type: Plain text
1144 #: build/C/man3/gsignal.3:95
1145 msgid ""
1146 "Elsewhere, on System V-like systems, these functions implement software "
1147 "signaling, entirely independent of the classical B<signal>(2)  and "
1148 "B<kill>(2)  functions.  The function B<ssignal>()  defines the action to "
1149 "take when the software signal with number I<signum> is raised using the "
1150 "function B<gsignal>(), and returns the previous such action or B<SIG_DFL>.  "
1151 "The function B<gsignal>()  does the following: if no action (or the action "
1152 "B<SIG_DFL>)  was specified for I<signum>, then it does nothing and returns "
1153 "0.  If the action B<SIG_IGN> was specified for I<signum>, then it does "
1154 "nothing and returns 1.  Otherwise, it resets the action to B<SIG_DFL> and "
1155 "calls the action function with argument I<signum>, and returns the value "
1156 "returned by that function.  The range of possible values I<signum> varies "
1157 "(often 1-15 or 1-17)."
1158 msgstr ""
1159
1160 #. type: Plain text
1161 #: build/C/man3/gsignal.3:103
1162 msgid ""
1163 "These functions are available under AIX, DG/UX, HP-UX, SCO, Solaris, Tru64.  "
1164 "They are called obsolete under most of these systems, and are broken under "
1165 "Linux libc and glibc.  Some systems also have B<gsignal_r>()  and "
1166 "B<ssignal_r>()."
1167 msgstr ""
1168
1169 #. type: Plain text
1170 #: build/C/man3/gsignal.3:107
1171 msgid "B<kill>(2), B<signal>(2), B<raise>(3)"
1172 msgstr ""
1173
1174 #. type: TH
1175 #: build/C/man2/kill.2:44
1176 #, no-wrap
1177 msgid "KILL"
1178 msgstr ""
1179
1180 #. type: TH
1181 #: build/C/man2/kill.2:44
1182 #, no-wrap
1183 msgid "2013-09-17"
1184 msgstr ""
1185
1186 #. type: Plain text
1187 #: build/C/man2/kill.2:47
1188 msgid "kill - send signal to a process"
1189 msgstr ""
1190
1191 #. type: Plain text
1192 #: build/C/man2/kill.2:50
1193 #, no-wrap
1194 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
1195 msgstr ""
1196
1197 #. type: Plain text
1198 #: build/C/man2/kill.2:54
1199 #, no-wrap
1200 msgid "B<int kill(pid_t >I<pid>B<, int >I<sig>B<);>\n"
1201 msgstr ""
1202
1203 #. type: Plain text
1204 #: build/C/man2/kill.2:64
1205 msgid "B<kill>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
1206 msgstr ""
1207
1208 #. type: Plain text
1209 #: build/C/man2/kill.2:70
1210 msgid ""
1211 "The B<kill>()  system call can be used to send any signal to any process "
1212 "group or process."
1213 msgstr ""
1214
1215 #. type: Plain text
1216 #: build/C/man2/kill.2:73
1217 msgid ""
1218 "If I<pid> is positive, then signal I<sig> is sent to the process with the ID "
1219 "specified by I<pid>."
1220 msgstr ""
1221
1222 #. type: Plain text
1223 #: build/C/man2/kill.2:76
1224 msgid ""
1225 "If I<pid> equals 0, then I<sig> is sent to every process in the process "
1226 "group of the calling process."
1227 msgstr ""
1228
1229 #. type: Plain text
1230 #: build/C/man2/kill.2:80
1231 msgid ""
1232 "If I<pid> equals -1, then I<sig> is sent to every process for which the "
1233 "calling process has permission to send signals, except for process 1 "
1234 "(I<init>), but see below."
1235 msgstr ""
1236
1237 #. type: Plain text
1238 #: build/C/man2/kill.2:83
1239 msgid ""
1240 "If I<pid> is less than -1, then I<sig> is sent to every process in the "
1241 "process group whose ID is I<-pid>."
1242 msgstr ""
1243
1244 #. type: Plain text
1245 #: build/C/man2/kill.2:88
1246 msgid ""
1247 "If I<sig> is 0, then no signal is sent, but error checking is still "
1248 "performed; this can be used to check for the existence of a process ID or "
1249 "process group ID."
1250 msgstr ""
1251
1252 #. type: Plain text
1253 #: build/C/man2/kill.2:100
1254 msgid ""
1255 "For a process to have permission to send a signal it must either be "
1256 "privileged (under Linux: have the B<CAP_KILL> capability), or the real or "
1257 "effective user ID of the sending process must equal the real or saved "
1258 "set-user-ID of the target process.  In the case of B<SIGCONT> it suffices "
1259 "when the sending and receiving processes belong to the same session.  "
1260 "(Historically, the rules were different; see NOTES.)"
1261 msgstr ""
1262
1263 #. type: Plain text
1264 #: build/C/man2/kill.2:105
1265 msgid ""
1266 "On success (at least one signal was sent), zero is returned.  On error, -1 "
1267 "is returned, and I<errno> is set appropriately."
1268 msgstr ""
1269
1270 #. type: Plain text
1271 #: build/C/man2/kill.2:109
1272 msgid "An invalid signal was specified."
1273 msgstr ""
1274
1275 #. type: TP
1276 #: build/C/man2/kill.2:109 build/C/man2/killpg.2:99 build/C/man2/prctl.2:987 build/C/man2/prctl.2:999 build/C/man2/prctl.2:1009 build/C/man2/prctl.2:1017 build/C/man2/rt_sigqueueinfo.2:148 build/C/man2/sigaltstack.2:153 build/C/man3/sigqueue.3:102 build/C/man2/tkill.2:96
1277 #, no-wrap
1278 msgid "B<EPERM>"
1279 msgstr ""
1280
1281 #. type: Plain text
1282 #: build/C/man2/kill.2:113 build/C/man2/killpg.2:103
1283 msgid ""
1284 "The process does not have permission to send the signal to any of the target "
1285 "processes."
1286 msgstr ""
1287
1288 #. type: TP
1289 #: build/C/man2/kill.2:113 build/C/man2/killpg.2:103 build/C/man2/killpg.2:107 build/C/man2/rt_sigqueueinfo.2:156 build/C/man3/sigqueue.3:108 build/C/man2/tkill.2:101
1290 #, no-wrap
1291 msgid "B<ESRCH>"
1292 msgstr ""
1293
1294 #. type: Plain text
1295 #: build/C/man2/kill.2:121
1296 msgid ""
1297 "The pid or process group does not exist.  Note that an existing process "
1298 "might be a zombie, a process which already committed termination, but has "
1299 "not yet been B<wait>(2)ed for."
1300 msgstr ""
1301
1302 #. type: Plain text
1303 #: build/C/man2/kill.2:123 build/C/man2/pause.2:59 build/C/man2/wait.2:425
1304 msgid "SVr4, 4.3BSD, POSIX.1-2001."
1305 msgstr ""
1306
1307 #. type: Plain text
1308 #: build/C/man2/kill.2:131
1309 msgid ""
1310 "The only signals that can be sent to process ID 1, the I<init> process, are "
1311 "those for which I<init> has explicitly installed signal handlers.  This is "
1312 "done to assure the system is not brought down accidentally."
1313 msgstr ""
1314
1315 #. type: Plain text
1316 #: build/C/man2/kill.2:137
1317 msgid ""
1318 "POSIX.1-2001 requires that I<kill(-1,sig)> send I<sig> to all processes that "
1319 "the calling process may send signals to, except possibly for some "
1320 "implementation-defined system processes.  Linux allows a process to signal "
1321 "itself, but on Linux the call I<kill(-1,sig)> does not signal the calling "
1322 "process."
1323 msgstr ""
1324
1325 #. type: Plain text
1326 #: build/C/man2/kill.2:147
1327 msgid ""
1328 "POSIX.1-2001 requires that if a process sends a signal to itself, and the "
1329 "sending thread does not have the signal blocked, and no other thread has it "
1330 "unblocked or is waiting for it in B<sigwait>(3), at least one unblocked "
1331 "signal must be delivered to the sending thread before the B<kill>()  "
1332 "returns."
1333 msgstr ""
1334
1335 #. type: SS
1336 #: build/C/man2/kill.2:147 build/C/man3/sigpause.3:82 build/C/man2/wait.2:480
1337 #, no-wrap
1338 msgid "Linux notes"
1339 msgstr ""
1340
1341 #.  In the 0.* kernels things chopped and changed quite
1342 #.  a bit - MTK, 24 Jul 02
1343 #. type: Plain text
1344 #: build/C/man2/kill.2:161
1345 msgid ""
1346 "Across different kernel versions, Linux has enforced different rules for the "
1347 "permissions required for an unprivileged process to send a signal to another "
1348 "process.  In kernels 1.0 to 1.2.2, a signal could be sent if the effective "
1349 "user ID of the sender matched effective user ID of the target, or the real "
1350 "user ID of the sender matched the real user ID of the target.  From kernel "
1351 "1.2.3 until 1.3.77, a signal could be sent if the effective user ID of the "
1352 "sender matched either the real or effective user ID of the target.  The "
1353 "current rules, which conform to POSIX.1-2001, were adopted in kernel 1.3.78."
1354 msgstr ""
1355
1356 #. type: Plain text
1357 #: build/C/man2/kill.2:171
1358 msgid ""
1359 "In 2.6 kernels up to and including 2.6.7, there was a bug that meant that "
1360 "when sending signals to a process group, B<kill>()  failed with the error "
1361 "B<EPERM> if the caller did not have permission to send the signal to I<any> "
1362 "(rather than I<all>) of the members of the process group.  Notwithstanding "
1363 "this error return, the signal was still delivered to all of the processes "
1364 "for which the caller had permission to signal."
1365 msgstr ""
1366
1367 #. type: Plain text
1368 #: build/C/man2/kill.2:181
1369 msgid ""
1370 "B<_exit>(2), B<killpg>(2), B<signal>(2), B<tkill>(2), B<exit>(3), "
1371 "B<sigqueue>(3), B<capabilities>(7), B<credentials>(7), B<signal>(7)"
1372 msgstr ""
1373
1374 #. type: TH
1375 #: build/C/man2/killpg.2:42
1376 #, no-wrap
1377 msgid "KILLPG"
1378 msgstr ""
1379
1380 #. type: TH
1381 #: build/C/man2/killpg.2:42 build/C/man3/sigset.3:26
1382 #, no-wrap
1383 msgid "2010-09-20"
1384 msgstr ""
1385
1386 #. type: Plain text
1387 #: build/C/man2/killpg.2:45
1388 msgid "killpg - send signal to a process group"
1389 msgstr ""
1390
1391 #. type: Plain text
1392 #: build/C/man2/killpg.2:49
1393 msgid "B<int killpg(int >I<pgrp>B<, int >I<sig>B<);>"
1394 msgstr ""
1395
1396 #. type: TP
1397 #: build/C/man2/killpg.2:55
1398 #, no-wrap
1399 msgid "B<killpg>():"
1400 msgstr ""
1401
1402 #. type: Plain text
1403 #: build/C/man2/killpg.2:59 build/C/man2/sigaltstack.2:46 build/C/man3/siginterrupt.3:51 build/C/man2/wait4.2:60
1404 msgid ""
1405 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
1406 "_XOPEN_SOURCE_EXTENDED"
1407 msgstr ""
1408
1409 #. type: Plain text
1410 #: build/C/man2/killpg.2:69
1411 msgid ""
1412 "B<killpg>()  sends the signal I<sig> to the process group I<pgrp>.  See "
1413 "B<signal>(7)  for a list of signals."
1414 msgstr ""
1415
1416 #. type: Plain text
1417 #: build/C/man2/killpg.2:78
1418 msgid ""
1419 "If I<pgrp> is 0, B<killpg>()  sends the signal to the calling process's "
1420 "process group.  (POSIX says: If I<pgrp> is less than or equal to 1, the "
1421 "behavior is undefined.)"
1422 msgstr ""
1423
1424 #. type: Plain text
1425 #: build/C/man2/killpg.2:89
1426 msgid ""
1427 "For a process to have permission to send a signal it must either be "
1428 "privileged (under Linux: have the B<CAP_KILL> capability), or the real or "
1429 "effective user ID of the sending process must equal the real or saved "
1430 "set-user-ID of the target process.  In the case of B<SIGCONT> it suffices "
1431 "when the sending and receiving processes belong to the same session."
1432 msgstr ""
1433
1434 #. type: Plain text
1435 #: build/C/man2/killpg.2:99
1436 msgid "I<sig> is not a valid signal number."
1437 msgstr ""
1438
1439 #. type: Plain text
1440 #: build/C/man2/killpg.2:107
1441 msgid "No process can be found in the process group specified by I<pgrp>."
1442 msgstr ""
1443
1444 #. type: Plain text
1445 #: build/C/man2/killpg.2:111
1446 msgid ""
1447 "The process group was given as 0 but the sending process does not have a "
1448 "process group."
1449 msgstr ""
1450
1451 #. type: Plain text
1452 #: build/C/man2/killpg.2:115
1453 msgid ""
1454 "SVr4, 4.4BSD (the B<killpg>()  function call first appeared in 4BSD), "
1455 "POSIX.1-2001."
1456 msgstr ""
1457
1458 #. type: Plain text
1459 #: build/C/man2/killpg.2:129
1460 msgid ""
1461 "There are various differences between the permission checking in BSD-type "
1462 "systems and System\\ V-type systems.  See the POSIX rationale for "
1463 "B<kill>().  A difference not mentioned by POSIX concerns the return value "
1464 "B<EPERM>: BSD documents that no signal is sent and B<EPERM> returned when "
1465 "the permission check failed for at least one target process, while POSIX "
1466 "documents B<EPERM> only when the permission check failed for all target "
1467 "processes."
1468 msgstr ""
1469
1470 #. type: Plain text
1471 #: build/C/man2/killpg.2:134
1472 msgid ""
1473 "On Linux, B<killpg>()  is implemented as a library function that makes the "
1474 "call I<kill(-pgrp,\\ sig)>."
1475 msgstr ""
1476
1477 #. type: Plain text
1478 #: build/C/man2/killpg.2:140
1479 msgid ""
1480 "B<getpgrp>(2), B<kill>(2), B<signal>(2), B<capabilities>(7), "
1481 "B<credentials>(7)"
1482 msgstr ""
1483
1484 #. type: TH
1485 #: build/C/man2/pause.2:30
1486 #, no-wrap
1487 msgid "PAUSE"
1488 msgstr ""
1489
1490 #. type: TH
1491 #: build/C/man2/pause.2:30
1492 #, no-wrap
1493 msgid "2008-10-06"
1494 msgstr ""
1495
1496 #. type: Plain text
1497 #: build/C/man2/pause.2:33
1498 msgid "pause - wait for signal"
1499 msgstr ""
1500
1501 #. type: Plain text
1502 #: build/C/man2/pause.2:35
1503 msgid "B<#include E<lt>unistd.hE<gt>>"
1504 msgstr ""
1505
1506 #. type: Plain text
1507 #: build/C/man2/pause.2:37
1508 msgid "B<int pause(void);>"
1509 msgstr ""
1510
1511 #. type: Plain text
1512 #: build/C/man2/pause.2:42
1513 msgid ""
1514 "B<pause>()  causes the calling process (or thread) to sleep until a signal "
1515 "is delivered that either terminates the process or causes the invocation of "
1516 "a signal-catching function."
1517 msgstr ""
1518
1519 #.  .BR ERESTARTNOHAND .
1520 #. type: Plain text
1521 #: build/C/man2/pause.2:53
1522 msgid ""
1523 "B<pause>()  returns only when a signal was caught and the signal-catching "
1524 "function returned.  In this case, B<pause>()  returns -1, and I<errno> is "
1525 "set to B<EINTR>."
1526 msgstr ""
1527
1528 #. type: TP
1529 #: build/C/man2/pause.2:54 build/C/man2/sigsuspend.2:81 build/C/man2/sigwaitinfo.2:123 build/C/man2/wait.2:411
1530 #, no-wrap
1531 msgid "B<EINTR>"
1532 msgstr ""
1533
1534 #. type: Plain text
1535 #: build/C/man2/pause.2:57
1536 msgid "a signal was caught and the signal-catching function returned."
1537 msgstr ""
1538
1539 #. type: Plain text
1540 #: build/C/man2/pause.2:64
1541 msgid "B<kill>(2), B<select>(2), B<signal>(2), B<sigsuspend>(2)"
1542 msgstr ""
1543
1544 #. type: TH
1545 #: build/C/man2/prctl.2:52
1546 #, no-wrap
1547 msgid "PRCTL"
1548 msgstr ""
1549
1550 #. type: TH
1551 #: build/C/man2/prctl.2:52 build/C/man2/restart_syscall.2:33 build/C/man2/sgetmask.2:26 build/C/man2/sigaction.2:47 build/C/man7/signal.7:46 build/C/man2/sigreturn.2:30 build/C/man3/sigvec.3:26 build/C/man2/tkill.2:29
1552 #, no-wrap
1553 msgid "2014-12-31"
1554 msgstr ""
1555
1556 #. type: Plain text
1557 #: build/C/man2/prctl.2:55
1558 msgid "prctl - operations on a process"
1559 msgstr ""
1560
1561 #. type: Plain text
1562 #: build/C/man2/prctl.2:58
1563 #, no-wrap
1564 msgid "B<#include E<lt>sys/prctl.hE<gt>>\n"
1565 msgstr ""
1566
1567 #. type: Plain text
1568 #: build/C/man2/prctl.2:61
1569 #, no-wrap
1570 msgid ""
1571 "B<int prctl(int >I<option>B<, unsigned long >I<arg2>B<, unsigned long "
1572 ">I<arg3>B<,>\n"
1573 "B<          unsigned long >I<arg4>B<, unsigned long >I<arg5>B<);>\n"
1574 msgstr ""
1575
1576 #. type: Plain text
1577 #: build/C/man2/prctl.2:68
1578 msgid ""
1579 "B<prctl>()  is called with a first argument describing what to do (with "
1580 "values defined in I<E<lt>linux/prctl.hE<gt>>), and further arguments with a "
1581 "significance depending on the first one.  The first argument can be:"
1582 msgstr ""
1583
1584 #. type: TP
1585 #: build/C/man2/prctl.2:68
1586 #, no-wrap
1587 msgid "B<PR_CAPBSET_READ> (since Linux 2.6.25)"
1588 msgstr ""
1589
1590 #. type: Plain text
1591 #: build/C/man2/prctl.2:80
1592 msgid ""
1593 "Return (as the function result) 1 if the capability specified in I<arg2> is "
1594 "in the calling thread's capability bounding set, or 0 if it is not.  (The "
1595 "capability constants are defined in I<E<lt>linux/capability.hE<gt>>.)  The "
1596 "capability bounding set dictates whether the process can receive the "
1597 "capability through a file's permitted capability set on a subsequent call to "
1598 "B<execve>(2)."
1599 msgstr ""
1600
1601 #. type: Plain text
1602 #: build/C/man2/prctl.2:85
1603 msgid ""
1604 "If the capability specified in I<arg2> is not valid, then the call fails "
1605 "with the error B<EINVAL>."
1606 msgstr ""
1607
1608 #. type: TP
1609 #: build/C/man2/prctl.2:85
1610 #, no-wrap
1611 msgid "B<PR_CAPBSET_DROP> (since Linux 2.6.25)"
1612 msgstr ""
1613
1614 #. type: Plain text
1615 #: build/C/man2/prctl.2:94
1616 msgid ""
1617 "If the calling thread has the B<CAP_SETPCAP> capability, then drop the "
1618 "capability specified by I<arg2> from the calling thread's capability "
1619 "bounding set.  Any children of the calling thread will inherit the newly "
1620 "reduced bounding set."
1621 msgstr ""
1622
1623 #. type: Plain text
1624 #: build/C/man2/prctl.2:106
1625 msgid ""
1626 "The call fails with the error: B<EPERM> if the calling thread does not have "
1627 "the B<CAP_SETPCAP>; B<EINVAL> if I<arg2> does not represent a valid "
1628 "capability; or B<EINVAL> if file capabilities are not enabled in the kernel, "
1629 "in which case bounding sets are not supported."
1630 msgstr ""
1631
1632 #. type: TP
1633 #: build/C/man2/prctl.2:106
1634 #, no-wrap
1635 msgid "B<PR_SET_CHILD_SUBREAPER> (since Linux 3.4)"
1636 msgstr ""
1637
1638 #.  commit ebec18a6d3aa1e7d84aab16225e87fd25170ec2b
1639 #. type: Plain text
1640 #: build/C/man2/prctl.2:131
1641 msgid ""
1642 "If I<arg2> is nonzero, set the \"child subreaper\" attribute of the calling "
1643 "process; if I<arg2> is zero, unset the attribute.  When a process is marked "
1644 "as a child subreaper, all of the children that it creates, and their "
1645 "descendants, will be marked as having a subreaper.  In effect, a subreaper "
1646 "fulfills the role of B<init>(1)  for its descendant processes.  Upon "
1647 "termination of a process that is orphaned (i.e., its immediate parent has "
1648 "already terminated)  and marked as having a subreaper, the nearest still "
1649 "living ancestor subreaper will receive a B<SIGCHLD> signal and be able to "
1650 "B<wait>(2)  on the process to discover its termination status."
1651 msgstr ""
1652
1653 #. type: TP
1654 #: build/C/man2/prctl.2:131
1655 #, no-wrap
1656 msgid "B<PR_GET_CHILD_SUBREAPER> (since Linux 3.4)"
1657 msgstr ""
1658
1659 #. type: Plain text
1660 #: build/C/man2/prctl.2:136
1661 msgid ""
1662 "Return the \"child subreaper\" setting of the caller, in the location "
1663 "pointed to by I<(int\\ *) arg2>."
1664 msgstr ""
1665
1666 #. type: TP
1667 #: build/C/man2/prctl.2:136
1668 #, no-wrap
1669 msgid "B<PR_SET_DUMPABLE> (since Linux 2.3.20)"
1670 msgstr ""
1671
1672 #.  See http://marc.theaimsgroup.com/?l=linux-kernel&m=115270289030630&w=2
1673 #.  Subject:    Fix prctl privilege escalation (CVE-2006-2451)
1674 #.  From:       Marcel Holtmann <marcel () holtmann ! org>
1675 #.  Date:       2006-07-12 11:12:00
1676 #. type: Plain text
1677 #: build/C/man2/prctl.2:162
1678 msgid ""
1679 "Set the state of the flag determining whether core dumps are produced for "
1680 "the calling process upon delivery of a signal whose default behavior is to "
1681 "produce a core dump.  (Normally, this flag is set for a process by default, "
1682 "but it is cleared when a set-user-ID or set-group-ID program is executed and "
1683 "also by various system calls that manipulate process UIDs and GIDs).  In "
1684 "kernels up to and including 2.6.12, I<arg2> must be either 0 (process is not "
1685 "dumpable) or 1 (process is dumpable).  Between kernels 2.6.13 and 2.6.17, "
1686 "the value 2 was also permitted, which caused any binary which normally would "
1687 "not be dumped to be dumped readable by root only; for security reasons, this "
1688 "feature has been removed.  (See also the description of "
1689 "I</proc/sys/fs/suid_dumpable> in B<proc>(5).)  Processes that are not "
1690 "dumpable can not be attached via B<ptrace>(2)  B<PTRACE_ATTACH>."
1691 msgstr ""
1692
1693 #. type: TP
1694 #: build/C/man2/prctl.2:162
1695 #, no-wrap
1696 msgid "B<PR_GET_DUMPABLE> (since Linux 2.3.20)"
1697 msgstr ""
1698
1699 #.  Since Linux 2.6.13, the dumpable flag can have the value 2,
1700 #.  but in 2.6.13 PR_GET_DUMPABLE simply returns 1 if the dumpable
1701 #.  flags has a nonzero value.  This was fixed in 2.6.14.
1702 #. type: Plain text
1703 #: build/C/man2/prctl.2:169
1704 msgid ""
1705 "Return (as the function result) the current state of the calling process's "
1706 "dumpable flag."
1707 msgstr ""
1708
1709 #. type: TP
1710 #: build/C/man2/prctl.2:169
1711 #, no-wrap
1712 msgid "B<PR_SET_ENDIAN> (since Linux 2.6.18, PowerPC only)"
1713 msgstr ""
1714
1715 #.  Respectively 0, 1, 2
1716 #. type: Plain text
1717 #: build/C/man2/prctl.2:179
1718 msgid ""
1719 "Set the endian-ness of the calling process to the value given in I<arg2>, "
1720 "which should be one of the following: B<PR_ENDIAN_BIG>, B<PR_ENDIAN_LITTLE>, "
1721 "or B<PR_ENDIAN_PPC_LITTLE> (PowerPC pseudo little endian)."
1722 msgstr ""
1723
1724 #. type: TP
1725 #: build/C/man2/prctl.2:179
1726 #, no-wrap
1727 msgid "B<PR_GET_ENDIAN> (since Linux 2.6.18, PowerPC only)"
1728 msgstr ""
1729
1730 #. type: Plain text
1731 #: build/C/man2/prctl.2:184
1732 msgid ""
1733 "Return the endian-ness of the calling process, in the location pointed to by "
1734 "I<(int\\ *) arg2>."
1735 msgstr ""
1736
1737 #. type: TP
1738 #: build/C/man2/prctl.2:184
1739 #, no-wrap
1740 msgid "B<PR_SET_FPEMU> (since Linux 2.4.18, 2.5.9, only on ia64)"
1741 msgstr ""
1742
1743 #. type: Plain text
1744 #: build/C/man2/prctl.2:191
1745 msgid ""
1746 "Set floating-point emulation control bits to I<arg2>.  Pass "
1747 "B<PR_FPEMU_NOPRINT> to silently emulate fp operations accesses, or "
1748 "B<PR_FPEMU_SIGFPE> to not emulate fp operations and send B<SIGFPE> instead."
1749 msgstr ""
1750
1751 #. type: TP
1752 #: build/C/man2/prctl.2:191
1753 #, no-wrap
1754 msgid "B<PR_GET_FPEMU> (since Linux 2.4.18, 2.5.9, only on ia64)"
1755 msgstr ""
1756
1757 #. type: Plain text
1758 #: build/C/man2/prctl.2:196
1759 msgid ""
1760 "Return floating-point emulation control bits, in the location pointed to by "
1761 "I<(int\\ *) arg2>."
1762 msgstr ""
1763
1764 #. type: TP
1765 #: build/C/man2/prctl.2:196
1766 #, no-wrap
1767 msgid "B<PR_SET_FPEXC> (since Linux 2.4.21, 2.5.32, only on PowerPC)"
1768 msgstr ""
1769
1770 #. type: Plain text
1771 #: build/C/man2/prctl.2:209
1772 msgid ""
1773 "Set floating-point exception mode to I<arg2>.  Pass B<PR_FP_EXC_SW_ENABLE> "
1774 "to use FPEXC for FP exception enables, B<PR_FP_EXC_DIV> for floating-point "
1775 "divide by zero, B<PR_FP_EXC_OVF> for floating-point overflow, "
1776 "B<PR_FP_EXC_UND> for floating-point underflow, B<PR_FP_EXC_RES> for "
1777 "floating-point inexact result, B<PR_FP_EXC_INV> for floating-point invalid "
1778 "operation, B<PR_FP_EXC_DISABLED> for FP exceptions disabled, "
1779 "B<PR_FP_EXC_NONRECOV> for async nonrecoverable exception mode, "
1780 "B<PR_FP_EXC_ASYNC> for async recoverable exception mode, "
1781 "B<PR_FP_EXC_PRECISE> for precise exception mode."
1782 msgstr ""
1783
1784 #. type: TP
1785 #: build/C/man2/prctl.2:209
1786 #, no-wrap
1787 msgid "B<PR_GET_FPEXC> (since Linux 2.4.21, 2.5.32, only on PowerPC)"
1788 msgstr ""
1789
1790 #. type: Plain text
1791 #: build/C/man2/prctl.2:214
1792 msgid ""
1793 "Return floating-point exception mode, in the location pointed to by I<(int\\ "
1794 "*) arg2>."
1795 msgstr ""
1796
1797 #. type: TP
1798 #: build/C/man2/prctl.2:214
1799 #, no-wrap
1800 msgid "B<PR_SET_KEEPCAPS> (since Linux 2.2.18)"
1801 msgstr ""
1802
1803 #. type: Plain text
1804 #: build/C/man2/prctl.2:232
1805 msgid ""
1806 "Set the state of the thread's \"keep capabilities\" flag, which determines "
1807 "whether the threads's permitted capability set is cleared when a change is "
1808 "made to the threads's user IDs such that the threads's real UID, effective "
1809 "UID, and saved set-user-ID all become nonzero when at least one of them "
1810 "previously had the value 0.  By default, the permitted capability set is "
1811 "cleared when such a change is made; setting the \"keep capabilities\" flag "
1812 "prevents it from being cleared.  I<arg2> must be either 0 (permitted "
1813 "capabilities are cleared)  or 1 (permitted capabilities are kept).  (A "
1814 "thread's I<effective> capability set is always cleared when such a "
1815 "credential change is made, regardless of the setting of the \"keep "
1816 "capabilities\" flag.)  The \"keep capabilities\" value will be reset to 0 on "
1817 "subsequent calls to B<execve>(2)."
1818 msgstr ""
1819
1820 #. type: TP
1821 #: build/C/man2/prctl.2:232
1822 #, no-wrap
1823 msgid "B<PR_GET_KEEPCAPS> (since Linux 2.2.18)"
1824 msgstr ""
1825
1826 #. type: Plain text
1827 #: build/C/man2/prctl.2:236
1828 msgid ""
1829 "Return (as the function result) the current state of the calling threads's "
1830 "\"keep capabilities\" flag."
1831 msgstr ""
1832
1833 #. type: TP
1834 #: build/C/man2/prctl.2:236
1835 #, no-wrap
1836 msgid "B<PR_SET_NAME> (since Linux 2.6.9)"
1837 msgstr ""
1838
1839 #.  TASK_COMM_LEN in include/linux/sched.h
1840 #. type: Plain text
1841 #: build/C/man2/prctl.2:255
1842 msgid ""
1843 "Set the name of the calling thread, using the value in the location pointed "
1844 "to by I<(char\\ *) arg2>.  The name can be up to 16 bytes long, including "
1845 "the terminating null byte.  (If the length of the string, including the "
1846 "terminating null byte, exceeds 16 bytes, the string is silently truncated.)  "
1847 "This is the same attribute that can be set via B<pthread_setname_np>(3)  and "
1848 "retrieved using B<pthread_getname_np>(3).  The attribute is likewise "
1849 "accessible via I</proc/self/task/[tid]/comm>, where I<tid> is the name of "
1850 "the calling thread."
1851 msgstr ""
1852
1853 #. type: TP
1854 #: build/C/man2/prctl.2:255
1855 #, no-wrap
1856 msgid "B<PR_GET_NAME> (since Linux 2.6.11)"
1857 msgstr ""
1858
1859 #. type: Plain text
1860 #: build/C/man2/prctl.2:262
1861 msgid ""
1862 "Return the name of the calling thread, in the buffer pointed to by I<(char\\ "
1863 "*) arg2>.  The buffer should allow space for up to 16 bytes; the returned "
1864 "string will be null-terminated."
1865 msgstr ""
1866
1867 #. type: TP
1868 #: build/C/man2/prctl.2:262
1869 #, no-wrap
1870 msgid "B<PR_SET_NO_NEW_PRIVS> (since Linux 3.5)"
1871 msgstr ""
1872
1873 #. type: Plain text
1874 #: build/C/man2/prctl.2:285
1875 msgid ""
1876 "Set the calling process's I<no_new_privs> bit to the value in I<arg2>.  With "
1877 "I<no_new_privs> set to 1, B<execve>(2)  promises not to grant privileges to "
1878 "do anything that could not have been done without the B<execve>(2)  call "
1879 "(for example, rendering the set-user-ID and set-group-ID permission bits, "
1880 "and file capabilities non-functional).  Once set, this bit cannot be unset.  "
1881 "The setting of this bit is inherited by children created by B<fork>(2)  and "
1882 "B<clone>(2), and preserved across B<execve>(2)."
1883 msgstr ""
1884
1885 #. type: Plain text
1886 #: build/C/man2/prctl.2:288
1887 msgid ""
1888 "For more information, see the kernel source file "
1889 "I<Documentation/prctl/no_new_privs.txt>."
1890 msgstr ""
1891
1892 #. type: TP
1893 #: build/C/man2/prctl.2:288
1894 #, no-wrap
1895 msgid "B<PR_GET_NO_NEW_PRIVS> (since Linux 3.5)"
1896 msgstr ""
1897
1898 #. type: Plain text
1899 #: build/C/man2/prctl.2:299
1900 msgid ""
1901 "Return (as the function result) the value of the I<no_new_privs> bit for the "
1902 "current process.  A value of 0 indicates the regular B<execve>(2)  "
1903 "behavior.  A value of 1 indicates B<execve>(2)  will operate in the "
1904 "privilege-restricting mode described above."
1905 msgstr ""
1906
1907 #. type: TP
1908 #: build/C/man2/prctl.2:299
1909 #, no-wrap
1910 msgid "B<PR_SET_PDEATHSIG> (since Linux 2.1.57)"
1911 msgstr ""
1912
1913 #. type: Plain text
1914 #: build/C/man2/prctl.2:312
1915 msgid ""
1916 "Set the parent process death signal of the calling process to I<arg2> "
1917 "(either a signal value in the range 1..maxsig, or 0 to clear).  This is the "
1918 "signal that the calling process will get when its parent dies.  This value "
1919 "is cleared for the child of a B<fork>(2)  and (since Linux 2.4.36 / 2.6.23)  "
1920 "when executing a set-user-ID or set-group-ID binary.  This value is "
1921 "preserved across B<execve>(2)."
1922 msgstr ""
1923
1924 #. type: TP
1925 #: build/C/man2/prctl.2:312
1926 #, no-wrap
1927 msgid "B<PR_GET_PDEATHSIG> (since Linux 2.3.15)"
1928 msgstr ""
1929
1930 #. type: Plain text
1931 #: build/C/man2/prctl.2:317
1932 msgid ""
1933 "Return the current value of the parent process death signal, in the location "
1934 "pointed to by I<(int\\ *) arg2>."
1935 msgstr ""
1936
1937 #. type: TP
1938 #: build/C/man2/prctl.2:317
1939 #, no-wrap
1940 msgid "B<PR_SET_PTRACER> (since Linux 3.4)"
1941 msgstr ""
1942
1943 #.  commit 2d514487faf188938a4ee4fb3464eeecfbdcf8eb
1944 #.  commit bf06189e4d14641c0148bea16e9dd24943862215
1945 #. type: Plain text
1946 #: build/C/man2/prctl.2:342
1947 msgid ""
1948 "This is meaningful only when the Yama LSM is enabled and in mode 1 "
1949 "(\"restricted ptrace\", visible via I</proc/sys/kernel/yama/ptrace_scope>).  "
1950 "When a \"ptracer process ID\" is passed in I<arg2>, the caller is declaring "
1951 "that the ptracer process can B<ptrace>(2)  the calling process as if it were "
1952 "a direct process ancestor.  Each B<PR_SET_PTRACER> operation replaces the "
1953 "previous \"ptracer process ID\".  Employing B<PR_SET_PTRACER> with I<arg2> "
1954 "set to 0 clears the caller's \"ptracer process ID\".  If I<arg2> is "
1955 "B<PR_SET_PTRACER_ANY>, the ptrace restrictions introduced by Yama are "
1956 "effectively disabled for the calling process."
1957 msgstr ""
1958
1959 #. type: Plain text
1960 #: build/C/man2/prctl.2:345
1961 msgid ""
1962 "For further information, see the kernel source file "
1963 "I<Documentation/security/Yama.txt>."
1964 msgstr ""
1965
1966 #. type: TP
1967 #: build/C/man2/prctl.2:345
1968 #, no-wrap
1969 msgid "B<PR_SET_SECCOMP> (since Linux 2.6.23)"
1970 msgstr ""
1971
1972 #.  See http://thread.gmane.org/gmane.linux.kernel/542632
1973 #.  [PATCH 0 of 2] seccomp updates
1974 #.  andrea@cpushare.com
1975 #. type: Plain text
1976 #: build/C/man2/prctl.2:356
1977 msgid ""
1978 "Set the secure computing (seccomp) mode for the calling thread, to limit the "
1979 "available system calls.  The seccomp mode is selected via I<arg2>.  (The "
1980 "seccomp constants are defined in I<E<lt>linux/seccomp.hE<gt>>.)"
1981 msgstr ""
1982
1983 #. type: Plain text
1984 #: build/C/man2/prctl.2:377
1985 msgid ""
1986 "With I<arg2> set to B<SECCOMP_MODE_STRICT> the only system calls that the "
1987 "thread is permitted to make are B<read>(2), B<write>(2), B<_exit>(2), and "
1988 "B<sigreturn>(2).  Other system calls result in the delivery of a B<SIGKILL> "
1989 "signal.  Strict secure computing mode is useful for number-crunching "
1990 "applications that may need to execute untrusted byte code, perhaps obtained "
1991 "by reading from a pipe or socket.  This operation is available only if the "
1992 "kernel is configured with B<CONFIG_SECCOMP> enabled."
1993 msgstr ""
1994
1995 #. type: Plain text
1996 #: build/C/man2/prctl.2:392
1997 msgid ""
1998 "With I<arg2> set to B<SECCOMP_MODE_FILTER> (since Linux 3.5)  the system "
1999 "calls allowed are defined by a pointer to a Berkeley Packet Filter passed in "
2000 "I<arg3>.  This argument is a pointer to I<struct sock_fprog>; it can be "
2001 "designed to filter arbitrary system calls and system call arguments.  This "
2002 "mode is available only if the kernel is configured with "
2003 "B<CONFIG_SECCOMP_FILTER> enabled."
2004 msgstr ""
2005
2006 #. type: Plain text
2007 #: build/C/man2/prctl.2:407
2008 msgid ""
2009 "If B<SECCOMP_MODE_FILTER> filters permit B<fork>(2), then the seccomp mode "
2010 "is inherited by children created by B<fork>(2); if B<execve>(2)  is "
2011 "permitted, then the seccomp mode is preserved across B<execve>(2).  If the "
2012 "filters permit B<prctl>()  calls, then additional filters can be added; they "
2013 "are run in order until the first non-allow result is seen."
2014 msgstr ""
2015
2016 #. type: Plain text
2017 #: build/C/man2/prctl.2:410
2018 msgid ""
2019 "For further information, see the kernel source file "
2020 "I<Documentation/prctl/seccomp_filter.txt>."
2021 msgstr ""
2022
2023 #. type: TP
2024 #: build/C/man2/prctl.2:410
2025 #, no-wrap
2026 msgid "B<PR_GET_SECCOMP> (since Linux 2.6.23)"
2027 msgstr ""
2028
2029 #. type: Plain text
2030 #: build/C/man2/prctl.2:426
2031 msgid ""
2032 "Return (as the function result)  the secure computing mode of the calling "
2033 "thread.  If the caller is not in secure computing mode, this operation "
2034 "returns 0; if the caller is in strict secure computing mode, then the "
2035 "B<prctl>()  call will cause a B<SIGKILL> signal to be sent to the process.  "
2036 "If the caller is in filter mode, and this system call is allowed by the "
2037 "seccomp filters, it returns 2.  This operation is available only if the "
2038 "kernel is configured with B<CONFIG_SECCOMP> enabled."
2039 msgstr ""
2040
2041 #. type: TP
2042 #: build/C/man2/prctl.2:426
2043 #, no-wrap
2044 msgid "B<PR_SET_SECUREBITS> (since Linux 2.6.26)"
2045 msgstr ""
2046
2047 #. type: Plain text
2048 #: build/C/man2/prctl.2:432
2049 msgid ""
2050 "Set the \"securebits\" flags of the calling thread to the value supplied in "
2051 "I<arg2>.  See B<capabilities>(7)."
2052 msgstr ""
2053
2054 #. type: TP
2055 #: build/C/man2/prctl.2:432
2056 #, no-wrap
2057 msgid "B<PR_GET_SECUREBITS> (since Linux 2.6.26)"
2058 msgstr ""
2059
2060 #. type: Plain text
2061 #: build/C/man2/prctl.2:438
2062 msgid ""
2063 "Return (as the function result)  the \"securebits\" flags of the calling "
2064 "thread.  See B<capabilities>(7)."
2065 msgstr ""
2066
2067 #. type: TP
2068 #: build/C/man2/prctl.2:438
2069 #, no-wrap
2070 msgid "B<PR_SET_THP_DISABLE> (since Linux 3.15)"
2071 msgstr ""
2072
2073 #.  commit a0715cc22601e8830ace98366c0c2bd8da52af52
2074 #. type: Plain text
2075 #: build/C/man2/prctl.2:454
2076 msgid ""
2077 "Set the state of the \"THP disable\" flag for the calling thread.  If "
2078 "I<arg2> has a nonzero value, the flag is set, otherwise it is cleared.  "
2079 "Setting this flag provides a method for disabling transparent huge pages for "
2080 "jobs where the code cannot be modified, and using a malloc hook with "
2081 "B<madvise>(2)  is not an option (i.e., statically allocated data).  The "
2082 "setting of the \"THP disable\" flag is inherited by a child created via "
2083 "B<fork>(2)  and is preserved across B<execve>(2)."
2084 msgstr ""
2085
2086 #. type: TP
2087 #: build/C/man2/prctl.2:454
2088 #, no-wrap
2089 msgid "B<PR_GET_THP_DISABLE> (since Linux 3.15)"
2090 msgstr ""
2091
2092 #. type: Plain text
2093 #: build/C/man2/prctl.2:459
2094 msgid ""
2095 "Return (via the function result) the current setting of the \"THP disable\" "
2096 "flag for the calling thread: either 1, if the flag is set, or 0, if it is "
2097 "not."
2098 msgstr ""
2099
2100 #. type: TP
2101 #: build/C/man2/prctl.2:459
2102 #, no-wrap
2103 msgid "B<PR_GET_TID_ADDRESS> (since Linux 3.5)"
2104 msgstr ""
2105
2106 #.  commit 300f786b2683f8bb1ec0afb6e1851183a479c86d
2107 #. type: Plain text
2108 #: build/C/man2/prctl.2:474
2109 msgid ""
2110 "Retrieve the I<clear_child_tid> address set by B<set_tid_address>(2)  and "
2111 "the B<clone>(2)  B<CLONE_CHILD_CLEARTID> flag, in the location pointed to by "
2112 "I<(int\\ **)\\ arg2>.  This feature is available only if the kernel is built "
2113 "with the B<CONFIG_CHECKPOINT_RESTORE> option enabled."
2114 msgstr ""
2115
2116 #. type: TP
2117 #: build/C/man2/prctl.2:474
2118 #, no-wrap
2119 msgid "B<PR_SET_TIMERSLACK> (since Linux 2.6.28)"
2120 msgstr ""
2121
2122 #.  See https://lwn.net/Articles/369549/
2123 #.  commit 6976675d94042fbd446231d1bd8b7de71a980ada
2124 #.  It seems that it's not possible to set the timer slack to zero;
2125 #.  The minimum value is 1? Seems a little strange.
2126 #. type: Plain text
2127 #: build/C/man2/prctl.2:493
2128 msgid ""
2129 "Set the current timer slack for the calling thread to the nanosecond value "
2130 "supplied in I<arg2>.  If I<arg2> is less than or equal to zero, reset the "
2131 "current timer slack to the thread's default timer slack value.  The timer "
2132 "slack is used by the kernel to group timer expirations for the calling "
2133 "thread that are close to one another; as a consequence, timer expirations "
2134 "for the thread may be up to the specified number of nanoseconds late (but "
2135 "will never expire early).  Grouping timer expirations can help reduce system "
2136 "power consumption by minimizing CPU wake-ups."
2137 msgstr ""
2138
2139 #.  List obtained by grepping for futex usage in glibc source
2140 #. type: Plain text
2141 #: build/C/man2/prctl.2:513
2142 msgid ""
2143 "The timer expirations affected by timer slack are those set by B<select>(2), "
2144 "B<pselect>(2), B<poll>(2), B<ppoll>(2), B<epoll_wait>(2), B<epoll_pwait>(2), "
2145 "B<clock_nanosleep>(2), B<nanosleep>(2), and B<futex>(2)  (and thus the "
2146 "library functions implemented via futexes, including "
2147 "B<pthread_cond_timedwait>(3), B<pthread_mutex_timedlock>(3), "
2148 "B<pthread_rwlock_timedrdlock>(3), B<pthread_rwlock_timedwrlock>(3), and "
2149 "B<sem_timedwait>(3))."
2150 msgstr ""
2151
2152 #. type: Plain text
2153 #: build/C/man2/prctl.2:517
2154 msgid ""
2155 "Timer slack is not applied to threads that are scheduled under a real-time "
2156 "scheduling policy (see B<sched_setscheduler>(2))."
2157 msgstr ""
2158
2159 #. type: Plain text
2160 #: build/C/man2/prctl.2:534
2161 msgid ""
2162 "Each thread has two associated timer slack values: a \"default\" value, and "
2163 "a \"current\" value.  The current value is the one that governs grouping of "
2164 "timer expirations.  When a new thread is created, the two timer slack values "
2165 "are made the same as the current value of the creating thread.  Thereafter, "
2166 "a thread can adjust its current timer slack value via B<PR_SET_TIMERSLACK> "
2167 "(the default value can't be changed).  The timer slack values of I<init> "
2168 "(PID 1), the ancestor of all processes, are 50,000 nanoseconds (50 "
2169 "microseconds).  The timer slack values are preserved across B<execve>(2)."
2170 msgstr ""
2171
2172 #. type: TP
2173 #: build/C/man2/prctl.2:534
2174 #, no-wrap
2175 msgid "B<PR_GET_TIMERSLACK> (since Linux 2.6.28)"
2176 msgstr ""
2177
2178 #. type: Plain text
2179 #: build/C/man2/prctl.2:538
2180 msgid ""
2181 "Return (as the function result)  the current timer slack value of the "
2182 "calling thread."
2183 msgstr ""
2184
2185 #. type: TP
2186 #: build/C/man2/prctl.2:538
2187 #, no-wrap
2188 msgid "B<PR_SET_TIMING> (since Linux 2.6.0-test4)"
2189 msgstr ""
2190
2191 #.  0
2192 #.  1
2193 #.  PR_TIMING_TIMESTAMP doesn't do anything in 2.6.26-rc8,
2194 #.  and looking at the patch history, it appears
2195 #.  that it never did anything.
2196 #. type: Plain text
2197 #: build/C/man2/prctl.2:555
2198 msgid ""
2199 "Set whether to use (normal, traditional) statistical process timing or "
2200 "accurate timestamp-based process timing, by passing B<PR_TIMING_STATISTICAL> "
2201 "or B<PR_TIMING_TIMESTAMP> to I<arg2>.  B<PR_TIMING_TIMESTAMP> is not "
2202 "currently implemented (attempting to set this mode will yield the error "
2203 "B<EINVAL>)."
2204 msgstr ""
2205
2206 #. type: TP
2207 #: build/C/man2/prctl.2:555
2208 #, no-wrap
2209 msgid "B<PR_GET_TIMING> (since Linux 2.6.0-test4)"
2210 msgstr ""
2211
2212 #. type: Plain text
2213 #: build/C/man2/prctl.2:559
2214 msgid ""
2215 "Return (as the function result) which process timing method is currently in "
2216 "use."
2217 msgstr ""
2218
2219 #. type: TP
2220 #: build/C/man2/prctl.2:559
2221 #, no-wrap
2222 msgid "B<PR_TASK_PERF_EVENTS_DISABLE> (since Linux 2.6.31)"
2223 msgstr ""
2224
2225 #. type: Plain text
2226 #: build/C/man2/prctl.2:568
2227 msgid ""
2228 "Disable all performance counters attached to the calling process, regardless "
2229 "of whether the counters were created by this process or another process.  "
2230 "Performance counters created by the calling process for other processes are "
2231 "unaffected.  For more information on performance counters, see the Linux "
2232 "kernel source file I<tools/perf/design.txt>."
2233 msgstr ""
2234
2235 #.  commit 1d1c7ddbfab358445a542715551301b7fc363e28
2236 #. type: Plain text
2237 #: build/C/man2/prctl.2:574
2238 msgid ""
2239 "Originally called B<PR_TASK_PERF_COUNTERS_DISABLE>; renamed (with same "
2240 "numerical value)  in Linux 2.6.32."
2241 msgstr ""
2242
2243 #. type: TP
2244 #: build/C/man2/prctl.2:574
2245 #, no-wrap
2246 msgid "B<PR_TASK_PERF_EVENTS_ENABLE> (since Linux 2.6.31)"
2247 msgstr ""
2248
2249 #. type: Plain text
2250 #: build/C/man2/prctl.2:579
2251 msgid ""
2252 "The converse of B<PR_TASK_PERF_EVENTS_DISABLE>; enable performance counters "
2253 "attached to the calling process."
2254 msgstr ""
2255
2256 #.  commit 1d1c7ddbfab358445a542715551301b7fc363e28
2257 #.  commit cdd6c482c9ff9c55475ee7392ec8f672eddb7be6
2258 #. type: Plain text
2259 #: build/C/man2/prctl.2:586
2260 msgid "Originally called B<PR_TASK_PERF_COUNTERS_ENABLE>; renamed in Linux 2.6.32."
2261 msgstr ""
2262
2263 #. type: TP
2264 #: build/C/man2/prctl.2:586
2265 #, no-wrap
2266 msgid "B<PR_SET_TSC> (since Linux 2.6.26, x86 only)"
2267 msgstr ""
2268
2269 #. type: Plain text
2270 #: build/C/man2/prctl.2:599
2271 msgid ""
2272 "Set the state of the flag determining whether the timestamp counter can be "
2273 "read by the process.  Pass B<PR_TSC_ENABLE> to I<arg2> to allow it to be "
2274 "read, or B<PR_TSC_SIGSEGV> to generate a B<SIGSEGV> when the process tries "
2275 "to read the timestamp counter."
2276 msgstr ""
2277
2278 #. type: TP
2279 #: build/C/man2/prctl.2:599
2280 #, no-wrap
2281 msgid "B<PR_GET_TSC> (since Linux 2.6.26, x86 only)"
2282 msgstr ""
2283
2284 #. type: Plain text
2285 #: build/C/man2/prctl.2:605
2286 msgid ""
2287 "Return the state of the flag determining whether the timestamp counter can "
2288 "be read, in the location pointed to by I<(int\\ *) arg2>."
2289 msgstr ""
2290
2291 #. type: TP
2292 #: build/C/man2/prctl.2:605
2293 #, no-wrap
2294 msgid "B<PR_SET_UNALIGN>"
2295 msgstr ""
2296
2297 #. type: Plain text
2298 #: build/C/man2/prctl.2:615
2299 msgid ""
2300 "(Only on: ia64, since Linux 2.3.48; parisc, since Linux 2.6.15; PowerPC, "
2301 "since Linux 2.6.18; Alpha, since Linux 2.6.22)  Set unaligned access control "
2302 "bits to I<arg2>.  Pass B<PR_UNALIGN_NOPRINT> to silently fix up unaligned "
2303 "user accesses, or B<PR_UNALIGN_SIGBUS> to generate B<SIGBUS> on unaligned "
2304 "user access."
2305 msgstr ""
2306
2307 #. type: TP
2308 #: build/C/man2/prctl.2:615
2309 #, no-wrap
2310 msgid "B<PR_GET_UNALIGN>"
2311 msgstr ""
2312
2313 #. type: Plain text
2314 #: build/C/man2/prctl.2:622
2315 msgid ""
2316 "(see B<PR_SET_UNALIGN> for information on versions and architectures)  "
2317 "Return unaligned access control bits, in the location pointed to by I<(int\\ "
2318 "*) arg2>."
2319 msgstr ""
2320
2321 #. type: TP
2322 #: build/C/man2/prctl.2:622
2323 #, no-wrap
2324 msgid "B<PR_MCE_KILL> (since Linux 2.6.32)"
2325 msgstr ""
2326
2327 #. type: Plain text
2328 #: build/C/man2/prctl.2:662
2329 msgid ""
2330 "Set the machine check memory corruption kill policy for the current thread.  "
2331 "If I<arg2> is B<PR_MCE_KILL_CLEAR>, clear the thread memory corruption kill "
2332 "policy and use the system-wide default.  (The system-wide default is defined "
2333 "by I</proc/sys/vm/memory_failure_early_kill>; see B<proc>(5).)  If I<arg2> "
2334 "is B<PR_MCE_KILL_SET>, use a thread-specific memory corruption kill policy.  "
2335 "In this case, I<arg3> defines whether the policy is I<early kill> "
2336 "(B<PR_MCE_KILL_EARLY>), I<late kill> (B<PR_MCE_KILL_LATE>), or the "
2337 "system-wide default (B<PR_MCE_KILL_DEFAULT>).  Early kill means that the "
2338 "thread receives a B<SIGBUS> signal as soon as hardware memory corruption is "
2339 "detected inside its address space.  In late kill mode, the process is killed "
2340 "only when it accesses a corrupted page.  See B<sigaction>(2)  for more "
2341 "information on the B<SIGBUS> signal.  The policy is inherited by children.  "
2342 "The remaining unused B<prctl>()  arguments must be zero for future "
2343 "compatibility."
2344 msgstr ""
2345
2346 #. type: TP
2347 #: build/C/man2/prctl.2:662
2348 #, no-wrap
2349 msgid "B<PR_MCE_KILL_GET> (since Linux 2.6.32)"
2350 msgstr ""
2351
2352 #. type: Plain text
2353 #: build/C/man2/prctl.2:668
2354 msgid ""
2355 "Return the current per-process machine check kill policy.  All unused "
2356 "B<prctl>()  arguments must be zero."
2357 msgstr ""
2358
2359 #. type: TP
2360 #: build/C/man2/prctl.2:668
2361 #, no-wrap
2362 msgid "B<PR_SET_MM> (since Linux 3.3)"
2363 msgstr ""
2364
2365 #.  commit 028ee4be34a09a6d48bdf30ab991ae933a7bc036
2366 #. type: Plain text
2367 #: build/C/man2/prctl.2:689
2368 msgid ""
2369 "Modify certain kernel memory map descriptor fields of the calling process.  "
2370 "Usually these fields are set by the kernel and dynamic loader (see "
2371 "B<ld.so>(8)  for more information) and a regular application should not use "
2372 "this feature.  However, there are cases, such as self-modifying programs, "
2373 "where a program might find it useful to change its own memory map.  This "
2374 "feature is available only if the kernel is built with the "
2375 "B<CONFIG_CHECKPOINT_RESTORE> option enabled.  The calling process must have "
2376 "the B<CAP_SYS_RESOURCE> capability.  The value in I<arg2> is one of the "
2377 "options below, while I<arg3> provides a new value for the option."
2378 msgstr ""
2379
2380 #. type: TP
2381 #: build/C/man2/prctl.2:690
2382 #, no-wrap
2383 msgid "B<PR_SET_MM_START_CODE>"
2384 msgstr ""
2385
2386 #. type: Plain text
2387 #: build/C/man2/prctl.2:699
2388 msgid ""
2389 "Set the address above which the program text can run.  The corresponding "
2390 "memory area must be readable and executable, but not writable or sharable "
2391 "(see B<mprotect>(2)  and B<mmap>(2)  for more information)."
2392 msgstr ""
2393
2394 #. type: TP
2395 #: build/C/man2/prctl.2:699
2396 #, no-wrap
2397 msgid "B<PR_SET_MM_END_CODE>"
2398 msgstr ""
2399
2400 #. type: Plain text
2401 #: build/C/man2/prctl.2:704
2402 msgid ""
2403 "Set the address below which the program text can run.  The corresponding "
2404 "memory area must be readable and executable, but not writable or sharable."
2405 msgstr ""
2406
2407 #. type: TP
2408 #: build/C/man2/prctl.2:704
2409 #, no-wrap
2410 msgid "B<PR_SET_MM_START_DATA>"
2411 msgstr ""
2412
2413 #. type: Plain text
2414 #: build/C/man2/prctl.2:710
2415 msgid ""
2416 "Set the address above which initialized and uninitialized (bss) data are "
2417 "placed.  The corresponding memory area must be readable and writable, but "
2418 "not executable or sharable."
2419 msgstr ""
2420
2421 #. type: TP
2422 #: build/C/man2/prctl.2:710
2423 #, no-wrap
2424 msgid "B<PR_SET_MM_END_DATA>"
2425 msgstr ""
2426
2427 #. type: Plain text
2428 #: build/C/man2/prctl.2:716
2429 msgid ""
2430 "Set the address below which initialized and uninitialized (bss) data are "
2431 "placed.  The corresponding memory area must be readable and writable, but "
2432 "not executable or sharable."
2433 msgstr ""
2434
2435 #. type: TP
2436 #: build/C/man2/prctl.2:716
2437 #, no-wrap
2438 msgid "B<PR_SET_MM_START_STACK>"
2439 msgstr ""
2440
2441 #. type: Plain text
2442 #: build/C/man2/prctl.2:720
2443 msgid ""
2444 "Set the start address of the stack.  The corresponding memory area must be "
2445 "readable and writable."
2446 msgstr ""
2447
2448 #. type: TP
2449 #: build/C/man2/prctl.2:720
2450 #, no-wrap
2451 msgid "B<PR_SET_MM_START_BRK>"
2452 msgstr ""
2453
2454 #. type: Plain text
2455 #: build/C/man2/prctl.2:732
2456 msgid ""
2457 "Set the address above which the program heap can be expanded with B<brk>(2)  "
2458 "call.  The address must be greater than the ending address of the current "
2459 "program data segment.  In addition, the combined size of the resulting heap "
2460 "and the size of the data segment can't exceed the B<RLIMIT_DATA> resource "
2461 "limit (see B<setrlimit>(2))."
2462 msgstr ""
2463
2464 #. type: TP
2465 #: build/C/man2/prctl.2:732
2466 #, no-wrap
2467 msgid "B<PR_SET_MM_BRK>"
2468 msgstr ""
2469
2470 #. type: Plain text
2471 #: build/C/man2/prctl.2:740
2472 msgid ""
2473 "Set the current B<brk>(2)  value.  The requirements for the address are the "
2474 "same as for the B<PR_SET_MM_START_BRK> option."
2475 msgstr ""
2476
2477 #.  commit fe8c7f5cbf91124987106faa3bdf0c8b955c4cf7
2478 #. type: Plain text
2479 #: build/C/man2/prctl.2:743
2480 msgid "The following options are available since Linux 3.5."
2481 msgstr ""
2482
2483 #. type: TP
2484 #: build/C/man2/prctl.2:743
2485 #, no-wrap
2486 msgid "B<PR_SET_MM_ARG_START>"
2487 msgstr ""
2488
2489 #. type: Plain text
2490 #: build/C/man2/prctl.2:746
2491 msgid "Set the address above which the program command line is placed."
2492 msgstr ""
2493
2494 #. type: TP
2495 #: build/C/man2/prctl.2:746
2496 #, no-wrap
2497 msgid "B<PR_SET_MM_ARG_END>"
2498 msgstr ""
2499
2500 #. type: Plain text
2501 #: build/C/man2/prctl.2:749
2502 msgid "Set the address below which the program command line is placed."
2503 msgstr ""
2504
2505 #. type: TP
2506 #: build/C/man2/prctl.2:749
2507 #, no-wrap
2508 msgid "B<PR_SET_MM_ENV_START>"
2509 msgstr ""
2510
2511 #. type: Plain text
2512 #: build/C/man2/prctl.2:752
2513 msgid "Set the address above which the program environment is placed."
2514 msgstr ""
2515
2516 #. type: TP
2517 #: build/C/man2/prctl.2:752
2518 #, no-wrap
2519 msgid "B<PR_SET_MM_ENV_END>"
2520 msgstr ""
2521
2522 #. type: Plain text
2523 #: build/C/man2/prctl.2:755
2524 msgid "Set the address below which the program environment is placed."
2525 msgstr ""
2526
2527 #. type: Plain text
2528 #: build/C/man2/prctl.2:768
2529 msgid ""
2530 "The address passed with B<PR_SET_MM_ARG_START>, B<PR_SET_MM_ARG_END>, "
2531 "B<PR_SET_MM_ENV_START>, and B<PR_SET_MM_ENV_END> should belong to a process "
2532 "stack area.  Thus, the corresponding memory area must be readable, writable, "
2533 "and (depending on the kernel configuration) have the B<MAP_GROWSDOWN> "
2534 "attribute set (see B<mmap>(2))."
2535 msgstr ""
2536
2537 #. type: TP
2538 #: build/C/man2/prctl.2:768
2539 #, no-wrap
2540 msgid "B<PR_SET_MM_AUXV>"
2541 msgstr ""
2542
2543 #. type: Plain text
2544 #: build/C/man2/prctl.2:777
2545 msgid ""
2546 "Set a new auxiliary vector.  The I<arg3> argument should provide the address "
2547 "of the vector.  The I<arg4> is the size of the vector."
2548 msgstr ""
2549
2550 #. type: TP
2551 #: build/C/man2/prctl.2:777
2552 #, no-wrap
2553 msgid "B<PR_SET_MM_EXE_FILE>"
2554 msgstr ""
2555
2556 #.  commit b32dfe377102ce668775f8b6b1461f7ad428f8b6
2557 #. type: Plain text
2558 #: build/C/man2/prctl.2:789
2559 msgid ""
2560 "Supersede the I</proc/pid/exe> symbolic link with a new one pointing to a "
2561 "new executable file identified by the file descriptor provided in I<arg3> "
2562 "argument.  The file descriptor should be obtained with a regular B<open>(2)  "
2563 "call."
2564 msgstr ""
2565
2566 #. type: Plain text
2567 #: build/C/man2/prctl.2:796
2568 msgid ""
2569 "To change the symbolic link, one needs to unmap all existing executable "
2570 "memory areas, including those created by the kernel itself (for example the "
2571 "kernel usually creates at least one executable memory area for the ELF "
2572 "I<.text> section)."
2573 msgstr ""
2574
2575 #. type: Plain text
2576 #: build/C/man2/prctl.2:802
2577 msgid ""
2578 "The second limitation is that such transitions can be done only once in a "
2579 "process life time.  Any further attempts will be rejected.  This should help "
2580 "system administrators monitor unusual symbolic-link transitions over all "
2581 "processes running on a system."
2582 msgstr ""
2583
2584 #. type: Plain text
2585 #: build/C/man2/prctl.2:824
2586 msgid ""
2587 "On success, B<PR_GET_DUMPABLE>, B<PR_GET_KEEPCAPS>, B<PR_GET_NO_NEW_PRIVS>, "
2588 "B<PR_GET_THP_DISABLE>, B<PR_CAPBSET_READ>, B<PR_GET_TIMING>, "
2589 "B<PR_GET_TIMERSLACK>, B<PR_GET_SECUREBITS>, B<PR_MCE_KILL_GET>, and (if it "
2590 "returns)  B<PR_GET_SECCOMP> return the nonnegative values described above.  "
2591 "All other I<option> values return 0 on success.  On error, -1 is returned, "
2592 "and I<errno> is set appropriately."
2593 msgstr ""
2594
2595 #. type: Plain text
2596 #: build/C/man2/prctl.2:829
2597 msgid "I<arg2> is an invalid address."
2598 msgstr ""
2599
2600 #. type: Plain text
2601 #: build/C/man2/prctl.2:834
2602 msgid "The value of I<option> is not recognized."
2603 msgstr ""
2604
2605 #. type: Plain text
2606 #: build/C/man2/prctl.2:846
2607 msgid ""
2608 "I<option> is B<PR_MCE_KILL> or B<PR_MCE_KILL_GET> or B<PR_SET_MM>, and "
2609 "unused B<prctl>()  arguments were not specified as zero."
2610 msgstr ""
2611
2612 #. type: Plain text
2613 #: build/C/man2/prctl.2:851
2614 msgid "I<arg2> is not valid value for this I<option>."
2615 msgstr ""
2616
2617 #. type: Plain text
2618 #: build/C/man2/prctl.2:860
2619 msgid ""
2620 "I<option> is B<PR_SET_SECCOMP> or B<PR_GET_SECCOMP>, and the kernel was not "
2621 "configured with B<CONFIG_SECCOMP>."
2622 msgstr ""
2623
2624 #. type: Plain text
2625 #: build/C/man2/prctl.2:866
2626 msgid "I<option> is B<PR_SET_MM>, and one of the following is true"
2627 msgstr ""
2628
2629 #. type: Plain text
2630 #: build/C/man2/prctl.2:872
2631 msgid "I<arg4> or I<arg5> is nonzero;"
2632 msgstr ""
2633
2634 #. type: Plain text
2635 #: build/C/man2/prctl.2:877
2636 msgid ""
2637 "I<arg3> is greater than B<TASK_SIZE> (the limit on the size of the user "
2638 "address space for this architecture);"
2639 msgstr ""
2640
2641 #. type: Plain text
2642 #: build/C/man2/prctl.2:887
2643 msgid ""
2644 "I<arg2> is B<PR_SET_MM_START_CODE>, B<PR_SET_MM_END_CODE>, "
2645 "B<PR_SET_MM_START_DATA>, B<PR_SET_MM_END_DATA>, or B<PR_SET_MM_START_STACK>, "
2646 "and the permissions of the corresponding memory area are not as required;"
2647 msgstr ""
2648
2649 #. type: Plain text
2650 #: build/C/man2/prctl.2:899
2651 msgid ""
2652 "I<arg2> is B<PR_SET_MM_START_BRK> or B<PR_SET_MM_BRK>, and I<arg3> is less "
2653 "than or equal to the end of the data segment or specifies a value that would "
2654 "cause the B<RLIMIT_DATA> resource limit to be exceeded."
2655 msgstr ""
2656
2657 #. type: Plain text
2658 #: build/C/man2/prctl.2:910
2659 msgid ""
2660 "I<option> is B<PR_SET_PTRACER> and I<arg2> is not 0, B<PR_SET_PTRACER_ANY>, "
2661 "or the PID of an existing process."
2662 msgstr ""
2663
2664 #. type: Plain text
2665 #: build/C/man2/prctl.2:918
2666 msgid "I<option> is B<PR_SET_PDEATHSIG> and I<arg2> is not a valid signal number."
2667 msgstr ""
2668
2669 #. type: Plain text
2670 #: build/C/man2/prctl.2:929
2671 msgid ""
2672 "I<option> is B<PR_SET_DUMPABLE> and I<arg2> is neither B<SUID_DUMP_DISABLE> "
2673 "nor B<SUID_DUMP_USER>."
2674 msgstr ""
2675
2676 #. type: Plain text
2677 #: build/C/man2/prctl.2:938
2678 msgid "I<option> is B<PR_SET_TIMING> and I<arg2> is not B<PR_TIMING_STATISTICAL>."
2679 msgstr ""
2680
2681 #. type: Plain text
2682 #: build/C/man2/prctl.2:952
2683 msgid ""
2684 "I<option> is B<PR_SET_NO_NEW_PRIVS> and I<arg2> is not equal to 1 or "
2685 "I<arg3>, I<arg4>, or I<arg5> is nonzero."
2686 msgstr ""
2687
2688 #. type: Plain text
2689 #: build/C/man2/prctl.2:964
2690 msgid ""
2691 "I<option> is B<PR_GET_NO_NEW_PRIVS> and I<arg2>, I<arg3>, I<arg4>, or "
2692 "I<arg5> is nonzero."
2693 msgstr ""
2694
2695 #. type: Plain text
2696 #: build/C/man2/prctl.2:975
2697 msgid ""
2698 "I<option> is B<PR_SET_THP_DISABLE> and I<arg3>, I<arg4>, or I<arg5> is "
2699 "nonzero."
2700 msgstr ""
2701
2702 #. type: Plain text
2703 #: build/C/man2/prctl.2:987
2704 msgid ""
2705 "I<option> is B<PR_GET_THP_DISABLE> and I<arg2>, I<arg3>, I<arg4>, or I<arg5> "
2706 "is nonzero."
2707 msgstr ""
2708
2709 #. type: Plain text
2710 #: build/C/man2/prctl.2:999
2711 msgid ""
2712 "I<option> is B<PR_SET_SECUREBITS>, and the caller does not have the "
2713 "B<CAP_SETPCAP> capability, or tried to unset a \"locked\" flag, or tried to "
2714 "set a flag whose corresponding locked flag was set (see B<capabilities>(7))."
2715 msgstr ""
2716
2717 #. type: Plain text
2718 #: build/C/man2/prctl.2:1009
2719 msgid ""
2720 "I<option> is B<PR_SET_KEEPCAPS>, and the callers's "
2721 "B<SECURE_KEEP_CAPS_LOCKED> flag is set (see B<capabilities>(7))."
2722 msgstr ""
2723
2724 #. type: Plain text
2725 #: build/C/man2/prctl.2:1017
2726 msgid ""
2727 "I<option> is B<PR_CAPBSET_DROP>, and the caller does not have the "
2728 "B<CAP_SETPCAP> capability."
2729 msgstr ""
2730
2731 #. type: Plain text
2732 #: build/C/man2/prctl.2:1025
2733 msgid ""
2734 "I<option> is B<PR_SET_MM>, and the caller does not have the "
2735 "B<CAP_SYS_RESOURCE> capability."
2736 msgstr ""
2737
2738 #. type: TP
2739 #: build/C/man2/prctl.2:1025
2740 #, no-wrap
2741 msgid "B<EACCES>"
2742 msgstr ""
2743
2744 #. type: Plain text
2745 #: build/C/man2/prctl.2:1035
2746 msgid ""
2747 "I<option> is B<PR_SET_MM>, and I<arg3> is B<PR_SET_MM_EXE_FILE>, the file is "
2748 "not executable."
2749 msgstr ""
2750
2751 #. type: TP
2752 #: build/C/man2/prctl.2:1035
2753 #, no-wrap
2754 msgid "B<EBUSY>"
2755 msgstr ""
2756
2757 #. type: Plain text
2758 #: build/C/man2/prctl.2:1046
2759 msgid ""
2760 "I<option> is B<PR_SET_MM>, I<arg3> is B<PR_SET_MM_EXE_FILE>, and this the "
2761 "second attempt to change the I</proc/pid/exe> symbolic link, which is "
2762 "prohibited."
2763 msgstr ""
2764
2765 #. type: TP
2766 #: build/C/man2/prctl.2:1046 build/C/man2/signalfd.2:266 build/C/man2/timerfd_create.2:345
2767 #, no-wrap
2768 msgid "B<EBADF>"
2769 msgstr ""
2770
2771 #.  The following can't actually happen, because prctl() in
2772 #.  seccomp mode will cause SIGKILL.
2773 #.  .TP
2774 #.  .B EPERM
2775 #.  .I option
2776 #.  is
2777 #.  .BR PR_SET_SECCOMP ,
2778 #.  and secure computing mode is already 1.
2779 #. type: Plain text
2780 #: build/C/man2/prctl.2:1065
2781 msgid ""
2782 "I<option> is B<PR_SET_MM>, I<arg3> is B<PR_SET_MM_EXE_FILE>, and the file "
2783 "descriptor passed in I<arg4> is not valid."
2784 msgstr ""
2785
2786 #.  The library interface was added in glibc 2.0.6
2787 #. type: Plain text
2788 #: build/C/man2/prctl.2:1070
2789 msgid "The B<prctl>()  system call was introduced in Linux 2.1.57."
2790 msgstr ""
2791
2792 #. type: Plain text
2793 #: build/C/man2/prctl.2:1077
2794 msgid ""
2795 "This call is Linux-specific.  IRIX has a B<prctl>()  system call (also "
2796 "introduced in Linux 2.1.44 as irix_prctl on the MIPS architecture), with "
2797 "prototype"
2798 msgstr ""
2799
2800 #. type: Plain text
2801 #: build/C/man2/prctl.2:1079
2802 msgid "B<ptrdiff_t prctl(int >I<option>B<, int >I<arg2>B<, int >I<arg3>B<);>"
2803 msgstr ""
2804
2805 #. type: Plain text
2806 #: build/C/man2/prctl.2:1084
2807 msgid ""
2808 "and options to get the maximum number of processes per user, get the maximum "
2809 "number of processors the calling process can use, find out whether a "
2810 "specified process is currently blocked, get or set the maximum stack size, "
2811 "and so on."
2812 msgstr ""
2813
2814 #. type: Plain text
2815 #: build/C/man2/prctl.2:1087
2816 msgid "B<signal>(2), B<core>(5)"
2817 msgstr ""
2818
2819 #. type: TH
2820 #: build/C/man3/profil.3:28
2821 #, no-wrap
2822 msgid "PROFIL"
2823 msgstr ""
2824
2825 #. type: Plain text
2826 #: build/C/man3/profil.3:31
2827 msgid "profil - execution time profile"
2828 msgstr ""
2829
2830 #. type: Plain text
2831 #: build/C/man3/profil.3:34
2832 #, no-wrap
2833 msgid "B<#include E<lt>unistd.hE<gt>>\n"
2834 msgstr ""
2835
2836 #. type: Plain text
2837 #: build/C/man3/profil.3:37
2838 #, no-wrap
2839 msgid ""
2840 "B<int profil(unsigned short *>I<buf>B<, size_t >I<bufsiz>B<,>\n"
2841 "B<           size_t >I<offset>B<, unsigned int >I<scale>B<);>\n"
2842 msgstr ""
2843
2844 #. type: Plain text
2845 #: build/C/man3/profil.3:46
2846 msgid "B<profil>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
2847 msgstr ""
2848
2849 #. type: Plain text
2850 #: build/C/man3/profil.3:68
2851 msgid ""
2852 "This routine provides a means to find out in what areas your program spends "
2853 "most of its time.  The argument I<buf> points to I<bufsiz> bytes of core.  "
2854 "Every virtual 10 milliseconds, the user's program counter (PC)  is examined: "
2855 "I<offset> is subtracted and the result is multiplied by I<scale> and divided "
2856 "by 65536.  If the resulting value is less than I<bufsiz>, then the "
2857 "corresponding entry in I<buf> is incremented.  If I<buf> is NULL, profiling "
2858 "is disabled."
2859 msgstr ""
2860
2861 #. type: Plain text
2862 #: build/C/man3/profil.3:70
2863 msgid "Zero is always returned."
2864 msgstr ""
2865
2866 #. type: Plain text
2867 #: build/C/man3/profil.3:72
2868 msgid "Similar to a call in SVr4 (but not POSIX.1-2001)."
2869 msgstr ""
2870
2871 #. type: Plain text
2872 #: build/C/man3/profil.3:78
2873 msgid ""
2874 "B<profil>()  cannot be used on a program that also uses B<ITIMER_PROF> "
2875 "interval timers (see B<setitimer>(2))."
2876 msgstr ""
2877
2878 #. type: Plain text
2879 #: build/C/man3/profil.3:81
2880 msgid ""
2881 "True kernel profiling provides more accurate results.  Libc 4.4 contained a "
2882 "kernel patch providing a system call profil."
2883 msgstr ""
2884
2885 #. type: Plain text
2886 #: build/C/man3/profil.3:87
2887 msgid "B<gprof>(1), B<sprof>(1), B<setitimer>(2), B<sigaction>(2), B<signal>(2)"
2888 msgstr ""
2889
2890 #. type: TH
2891 #: build/C/man3/psignal.3:30
2892 #, no-wrap
2893 msgid "PSIGNAL"
2894 msgstr ""
2895
2896 #. type: TH
2897 #: build/C/man3/psignal.3:30
2898 #, no-wrap
2899 msgid "2010-10-06"
2900 msgstr ""
2901
2902 #. type: TH
2903 #: build/C/man3/psignal.3:30 build/C/man3/raise.3:29 build/C/man7/sigevent.7:26
2904 #, no-wrap
2905 msgid "GNU"
2906 msgstr ""
2907
2908 #. type: Plain text
2909 #: build/C/man3/psignal.3:33
2910 msgid "psignal, psiginfo - print signal message"
2911 msgstr ""
2912
2913 #. type: Plain text
2914 #: build/C/man3/psignal.3:39
2915 #, no-wrap
2916 msgid ""
2917 "B<void psignal(int >I<sig>B<, const char *>I<s>B<);>\n"
2918 "B<void psiginfo(const siginfo_t *>I<pinfo>B<, const char *>I<s>B<);>\n"
2919 msgstr ""
2920
2921 #. type: Plain text
2922 #: build/C/man3/psignal.3:41
2923 #, no-wrap
2924 msgid "B<extern const char *const >I<sys_siglist>B<[];>\n"
2925 msgstr ""
2926
2927 #. type: Plain text
2928 #: build/C/man3/psignal.3:50
2929 msgid "B<psignal>(): _SVID_SOURCE || _BSD_SOURCE"
2930 msgstr ""
2931
2932 #. type: Plain text
2933 #: build/C/man3/psignal.3:53
2934 msgid ""
2935 "B<psiginfo>(): _XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ "
2936 "200809L"
2937 msgstr ""
2938
2939 #. type: Plain text
2940 #: build/C/man3/psignal.3:56
2941 msgid "I<sys_siglist>: _BSD_SOURCE"
2942 msgstr ""
2943
2944 #. type: Plain text
2945 #: build/C/man3/psignal.3:65
2946 msgid ""
2947 "The B<psignal>()  function displays a message on I<stderr> consisting of the "
2948 "string I<s>, a colon, a space, a string describing the signal number I<sig>, "
2949 "and a trailing newline.  If the string I<s> is NULL or empty, the colon and "
2950 "space are omitted.  If I<sig> is invalid, the message displayed will "
2951 "indicate an unknown signal."
2952 msgstr ""
2953
2954 #. type: Plain text
2955 #: build/C/man3/psignal.3:86
2956 msgid ""
2957 "The B<psiginfo>()  function is like B<psignal>(), except that it displays "
2958 "information about the signal described by I<pinfo>, which should point to a "
2959 "valid I<siginfo_t> structure.  As well as the signal description, "
2960 "B<psiginfo>()  displays information about the origin of the signal, and "
2961 "other information relevant to the signal (e.g., the relevant memory address "
2962 "for hardware-generated signals, the child process ID for B<SIGCHLD>, and the "
2963 "user ID and process ID of the sender, for signals set using B<kill>(2)  or "
2964 "B<sigqueue>(3))."
2965 msgstr ""
2966
2967 #. type: Plain text
2968 #: build/C/man3/psignal.3:89
2969 msgid ""
2970 "The array I<sys_siglist> holds the signal description strings indexed by "
2971 "signal number."
2972 msgstr ""
2973
2974 #. type: Plain text
2975 #: build/C/man3/psignal.3:95
2976 msgid "The B<psignal>()  and B<psiginfo>()  functions return no value."
2977 msgstr ""
2978
2979 #. type: Plain text
2980 #: build/C/man3/psignal.3:99
2981 msgid "The B<psiginfo>()  function was added to glibc in version 2.10."
2982 msgstr ""
2983
2984 #. type: Plain text
2985 #: build/C/man3/psignal.3:101
2986 msgid "POSIX.1-2008, 4.3BSD."
2987 msgstr ""
2988
2989 #. type: Plain text
2990 #: build/C/man3/psignal.3:105
2991 msgid "In glibc versions up to 2.12, B<psiginfo>()  had the following bugs:"
2992 msgstr ""
2993
2994 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12107
2995 #.  Reportedly now fixed; check glibc 2.13
2996 #. type: Plain text
2997 #: build/C/man3/psignal.3:109
2998 msgid "In some circumstances, a trailing newline is not printed."
2999 msgstr ""
3000
3001 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12108
3002 #.  Reportedly now fixed; check glibc 2.13
3003 #. type: Plain text
3004 #: build/C/man3/psignal.3:113
3005 msgid "Additional details are not displayed for real-time signals."
3006 msgstr ""
3007
3008 #. type: Plain text
3009 #: build/C/man3/psignal.3:118
3010 msgid "B<sigaction>(2), B<perror>(3), B<strsignal>(3), B<signal>(7)"
3011 msgstr ""
3012
3013 #. type: TH
3014 #: build/C/man3/raise.3:29
3015 #, no-wrap
3016 msgid "RAISE"
3017 msgstr ""
3018
3019 #. type: TH
3020 #: build/C/man3/raise.3:29
3021 #, no-wrap
3022 msgid "2014-03-10"
3023 msgstr ""
3024
3025 #. type: Plain text
3026 #: build/C/man3/raise.3:32
3027 msgid "raise - send a signal to the caller"
3028 msgstr ""
3029
3030 #. type: Plain text
3031 #: build/C/man3/raise.3:37
3032 #, no-wrap
3033 msgid "B<int raise(int >I<sig>B<);>\n"
3034 msgstr ""
3035
3036 #. type: Plain text
3037 #: build/C/man3/raise.3:43
3038 msgid ""
3039 "The B<raise>()  function sends a signal to the calling process or thread.  "
3040 "In a single-threaded program it is equivalent to"
3041 msgstr ""
3042
3043 #. type: Plain text
3044 #: build/C/man3/raise.3:47
3045 #, no-wrap
3046 msgid "kill(getpid(), sig);\n"
3047 msgstr ""
3048
3049 #. type: Plain text
3050 #: build/C/man3/raise.3:51
3051 msgid "In a multithreaded program it is equivalent to"
3052 msgstr ""
3053
3054 #. type: Plain text
3055 #: build/C/man3/raise.3:55
3056 #, no-wrap
3057 msgid "pthread_kill(pthread_self(), sig);\n"
3058 msgstr ""
3059
3060 #. type: Plain text
3061 #: build/C/man3/raise.3:61
3062 msgid ""
3063 "If the signal causes a handler to be called, B<raise>()  will return only "
3064 "after the signal handler has returned."
3065 msgstr ""
3066
3067 #. type: Plain text
3068 #: build/C/man3/raise.3:64
3069 msgid "B<raise>()  returns 0 on success, and nonzero for failure."
3070 msgstr ""
3071
3072 #. type: Plain text
3073 #: build/C/man3/raise.3:69
3074 msgid "The B<raise>()  function is thread-safe."
3075 msgstr ""
3076
3077 #. type: Plain text
3078 #: build/C/man3/raise.3:71 build/C/man2/signal.2:112
3079 msgid "C89, C99, POSIX.1-2001."
3080 msgstr ""
3081
3082 #.  2.3.2 used the obsolete tkill(), if available.
3083 #. type: Plain text
3084 #: build/C/man3/raise.3:82
3085 msgid ""
3086 "Since version 2.3.3, glibc implements B<raise>()  by calling B<tgkill>(2), "
3087 "if the kernel supports that system call.  Older glibc versions implemented "
3088 "B<raise>()  using B<kill>(2)."
3089 msgstr ""
3090
3091 #. type: Plain text
3092 #: build/C/man3/raise.3:89
3093 msgid ""
3094 "B<getpid>(2), B<kill>(2), B<sigaction>(2), B<signal>(2), B<pthread_kill>(3), "
3095 "B<signal>(7)"
3096 msgstr ""
3097
3098 #. type: TH
3099 #: build/C/man2/restart_syscall.2:33
3100 #, no-wrap
3101 msgid "RESTART_SYSCALL"
3102 msgstr ""
3103
3104 #. type: Plain text
3105 #: build/C/man2/restart_syscall.2:36
3106 msgid "restart_syscall - restart a system call after interruption by a stop signal"
3107 msgstr ""
3108
3109 #. type: Plain text
3110 #: build/C/man2/restart_syscall.2:38
3111 msgid "B<int restart_syscall(void);>"
3112 msgstr ""
3113
3114 #. type: Plain text
3115 #: build/C/man2/restart_syscall.2:41
3116 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
3117 msgstr ""
3118
3119 #. type: Plain text
3120 #: build/C/man2/restart_syscall.2:53
3121 msgid ""
3122 "The B<restart_syscall>()  system call is used to restart certain system "
3123 "calls after a process that was stopped by a signal (e.g., B<SIGSTOP> or "
3124 "B<SIGTSTP>)  is later resumed after receiving a B<SIGCONT> signal.  This "
3125 "system call is designed only for internal use by the kernel."
3126 msgstr ""
3127
3128 #.  These system calls correspond to the special internal errno value
3129 #.  ERESTART_RESTARTBLOCK. Each of the system calls has a "restart"
3130 #.  helper function that is invoked by restart_syscall().
3131 #.  Notable (as at Linux 3.17) is that poll() has such a "restart"
3132 #.  function, but ppoll(), select(), and pselect() do not.
3133 #.  This means that the latter system calls do not take account of the
3134 #.  time spent in the stopped state when restarting.
3135 #. type: Plain text
3136 #: build/C/man2/restart_syscall.2:88
3137 msgid ""
3138 "B<restart_syscall>()  is used for restarting only those system calls that, "
3139 "when restarted, should adjust their time-related parameters\\(emnamely "
3140 "B<poll>(2)  (since Linux 2.6.24), B<nanosleep>(2)  (since Linux 2.6), "
3141 "B<clock_nanosleep>(2)  (since Linux 2.6), and B<futex>(2), when employed "
3142 "with the B<FUTEX_WAIT> (since Linux 2.6.22)  and B<FUTEX_WAIT_BITSET> (since "
3143 "Linux 2.6.31)  operations.  B<restart_syscall>()  restarts the interrupted "
3144 "system call with a time argument that is suitably adjusted to account for "
3145 "the time that has already elapsed (including the time where the process was "
3146 "stopped by a signal).  Without the B<restart_syscall>()  mechanism, "
3147 "restarting these system calls would not correctly deduct the already elapsed "
3148 "time when the process continued execution."
3149 msgstr ""
3150
3151 #. type: Plain text
3152 #: build/C/man2/restart_syscall.2:92
3153 msgid ""
3154 "The return value of B<restart_syscall>()  is the return value of whatever "
3155 "system call is being restarted."
3156 msgstr ""
3157
3158 #. type: Plain text
3159 #: build/C/man2/restart_syscall.2:96
3160 msgid ""
3161 "I<errno> is set as per the errors for whatever system call is being "
3162 "restarted by B<restart_syscall>()."
3163 msgstr ""
3164
3165 #. type: Plain text
3166 #: build/C/man2/restart_syscall.2:100
3167 msgid "The B<restart_syscall>()  system call is present since Linux 2.6."
3168 msgstr ""
3169
3170 #. type: Plain text
3171 #: build/C/man2/restart_syscall.2:102
3172 msgid "This system call is Linux-specific."
3173 msgstr ""
3174
3175 #. type: Plain text
3176 #: build/C/man2/restart_syscall.2:106
3177 msgid ""
3178 "There is no glibc wrapper for this system call, because it is intended for "
3179 "use only by the kernel and should never be called by applications."
3180 msgstr ""
3181
3182 #. type: Plain text
3183 #: build/C/man2/restart_syscall.2:128
3184 msgid ""
3185 "The kernel uses B<restart_syscall>()  to ensure that when a system call is "
3186 "restarted after a process has been stopped by a signal and then resumed by "
3187 "B<SIGCONT>, then the time that the process spent in the stopped state is "
3188 "counted against the timeout interval specified in the original system call.  "
3189 "In the case of system calls that take a timeout argument and automatically "
3190 "restart after a stop signal plus B<SIGCONT>, but which do not have the "
3191 "B<restart_syscall>(2)  mechanism built in, then, after the process resumes "
3192 "execution, the time that the process spent in the stop state is I<not> "
3193 "counted against the timeout value.  Notable examples of system calls that "
3194 "suffer this problem are B<ppoll>(2), B<select>(2), and B<pselect>(2)."
3195 msgstr ""
3196
3197 #. type: Plain text
3198 #: build/C/man2/restart_syscall.2:135
3199 msgid ""
3200 "From user space, the operation of B<restart_syscall>(2)  is largely "
3201 "invisible: to the process that made the system call that is restarted, it "
3202 "appears as though that system call executed and returned in the usual "
3203 "fashion."
3204 msgstr ""
3205
3206 #.  FIXME . ppoll(2), select(2), and pselect(2)
3207 #.      should probably get the restart_syscall() treatment:
3208 #.      If a select() call is suspended by stop-sig+SIGCONT, the time
3209 #.      spent suspended is *not* deducted when the select() is restarted.
3210 #.  FIXME . check whether recvmmsg() handles stop-sig+SIGCONT properly.
3211 #. type: Plain text
3212 #: build/C/man2/restart_syscall.2:144
3213 msgid "B<sigaction>(2), B<sigreturn>(2), B<signal>(7)"
3214 msgstr ""
3215
3216 #. type: TH
3217 #: build/C/man2/rt_sigqueueinfo.2:25
3218 #, no-wrap
3219 msgid "RT_SIGQUEUEINFO"
3220 msgstr ""
3221
3222 #. type: TH
3223 #: build/C/man2/rt_sigqueueinfo.2:25
3224 #, no-wrap
3225 msgid "2012-07-13"
3226 msgstr ""
3227
3228 #. type: Plain text
3229 #: build/C/man2/rt_sigqueueinfo.2:28
3230 msgid "rt_sigqueueinfo, rt_tgsigqueueinfo - queue a signal and data"
3231 msgstr ""
3232
3233 #. type: Plain text
3234 #: build/C/man2/rt_sigqueueinfo.2:31
3235 #, no-wrap
3236 msgid ""
3237 "B<int rt_sigqueueinfo(pid_t >I<tgid>B<, int >I<sig>B<, siginfo_t "
3238 "*>I<uinfo>B<);>\n"
3239 msgstr ""
3240
3241 #. type: Plain text
3242 #: build/C/man2/rt_sigqueueinfo.2:34
3243 #, no-wrap
3244 msgid ""
3245 "B<int rt_tgsigqueueinfo(pid_t >I<tgid>B<, pid_t >I<tid>B<, int >I<sig>B<,>\n"
3246 "B<                      siginfo_t *>I<uinfo>B<);>\n"
3247 msgstr ""
3248
3249 #. type: Plain text
3250 #: build/C/man2/rt_sigqueueinfo.2:38 build/C/man2/sgetmask.2:36 build/C/man2/tkill.2:41
3251 msgid "I<Note>: There are no glibc wrappers for these system calls; see NOTES."
3252 msgstr ""
3253
3254 #. type: Plain text
3255 #: build/C/man2/rt_sigqueueinfo.2:50
3256 msgid ""
3257 "The B<rt_sigqueueinfo>()  and B<rt_tgsigqueueinfo>()  system calls are the "
3258 "low-level interfaces used to send a signal plus data to a process or "
3259 "thread.  The receiver of the signal can obtain the accompanying data by "
3260 "establishing a signal handler with the B<sigaction>(2)  B<SA_SIGINFO> flag."
3261 msgstr ""
3262
3263 #. type: Plain text
3264 #: build/C/man2/rt_sigqueueinfo.2:56
3265 msgid ""
3266 "These system calls are not intended for direct application use; they are "
3267 "provided to allow the implementation of B<sigqueue>(3)  and "
3268 "B<pthread_sigqueue>(3)."
3269 msgstr ""
3270
3271 #. type: Plain text
3272 #: build/C/man2/rt_sigqueueinfo.2:68
3273 msgid ""
3274 "The B<rt_sigqueueinfo>()  system call sends the signal I<sig> to the thread "
3275 "group with the ID I<tgid>.  (The term \"thread group\" is synonymous with "
3276 "\"process\", and I<tid> corresponds to the traditional UNIX process ID.)  "
3277 "The signal will be delivered to an arbitrary member of the thread group "
3278 "(i.e., one of the threads that is not currently blocking the signal)."
3279 msgstr ""
3280
3281 #. type: Plain text
3282 #: build/C/man2/rt_sigqueueinfo.2:79
3283 msgid ""
3284 "The I<uinfo> argument specifies the data to accompany the signal.  This "
3285 "argument is a pointer to a structure of type I<siginfo_t>, described in "
3286 "B<sigaction>(2)  (and defined by including I<E<lt>sigaction.hE<gt>>).  The "
3287 "caller should set the following fields in this structure:"
3288 msgstr ""
3289
3290 #. type: TP
3291 #: build/C/man2/rt_sigqueueinfo.2:79 build/C/man7/sigevent.7:88 build/C/man2/wait.2:316
3292 #, no-wrap
3293 msgid "I<si_code>"
3294 msgstr ""
3295
3296 #.  tkill(2) or
3297 #. type: Plain text
3298 #: build/C/man2/rt_sigqueueinfo.2:95
3299 msgid ""
3300 "This must be one of the B<SI_*> codes in the Linux kernel source file "
3301 "I<include/asm-generic/siginfo.h>, with the restriction that the code must be "
3302 "negative (i.e., cannot be B<SI_USER>, which is used by the kernel to "
3303 "indicate a signal sent by B<kill>(2))  and cannot (since Linux 2.6.39) be "
3304 "B<SI_TKILL> (which is used by the kernel to indicate a signal sent using "
3305 "B<tgkill>(2))."
3306 msgstr ""
3307
3308 #. type: TP
3309 #: build/C/man2/rt_sigqueueinfo.2:95 build/C/man2/wait.2:295
3310 #, no-wrap
3311 msgid "I<si_pid>"
3312 msgstr ""
3313
3314 #. type: Plain text
3315 #: build/C/man2/rt_sigqueueinfo.2:99
3316 msgid "This should be set to a process ID, typically the process ID of the sender."
3317 msgstr ""
3318
3319 #. type: TP
3320 #: build/C/man2/rt_sigqueueinfo.2:99 build/C/man2/wait.2:298
3321 #, no-wrap
3322 msgid "I<si_uid>"
3323 msgstr ""
3324
3325 #. type: Plain text
3326 #: build/C/man2/rt_sigqueueinfo.2:103
3327 msgid "This should be set to a user ID, typically the real user ID of the sender."
3328 msgstr ""
3329
3330 #. type: TP
3331 #: build/C/man2/rt_sigqueueinfo.2:103 build/C/man7/sigevent.7:96
3332 #, no-wrap
3333 msgid "I<si_value>"
3334 msgstr ""
3335
3336 #. type: Plain text
3337 #: build/C/man2/rt_sigqueueinfo.2:110
3338 msgid ""
3339 "This field contains the user data to accompany the signal.  For more "
3340 "information, see the description of the last (I<union sigval>)  argument of "
3341 "B<sigqueue>(3)."
3342 msgstr ""
3343
3344 #. type: Plain text
3345 #: build/C/man2/rt_sigqueueinfo.2:117
3346 msgid ""
3347 "Internally, the kernel sets the I<si_signo> field to the value specified in "
3348 "I<sig>, so that the receiver of the signal can also obtain the signal number "
3349 "via that field."
3350 msgstr ""
3351
3352 #. type: Plain text
3353 #: build/C/man2/rt_sigqueueinfo.2:129
3354 msgid ""
3355 "The B<rt_tgsigqueueinfo>()  system call is like B<rt_sigqueueinfo>(), but "
3356 "sends the signal and data to the single thread specified by the combination "
3357 "of I<tgid>, a thread group ID, and I<tid>, a thread in that thread group."
3358 msgstr ""
3359
3360 #. type: Plain text
3361 #: build/C/man2/rt_sigqueueinfo.2:134
3362 msgid ""
3363 "On success, these system calls return 0.  On error, they return -1 and "
3364 "I<errno> is set to indicate the error."
3365 msgstr ""
3366
3367 #. type: TP
3368 #: build/C/man2/rt_sigqueueinfo.2:135 build/C/man3/sigqueue.3:92 build/C/man2/sigwaitinfo.2:115 build/C/man2/timer_create.2:178
3369 #, no-wrap
3370 msgid "B<EAGAIN>"
3371 msgstr ""
3372
3373 #. type: Plain text
3374 #: build/C/man2/rt_sigqueueinfo.2:141 build/C/man3/sigqueue.3:98
3375 msgid ""
3376 "The limit of signals which may be queued has been reached.  (See "
3377 "B<signal>(7)  for further information.)"
3378 msgstr ""
3379
3380 #. type: Plain text
3381 #: build/C/man2/rt_sigqueueinfo.2:148
3382 msgid "I<sig>, I<tgid>, or I<tid> was invalid."
3383 msgstr ""
3384
3385 #. type: Plain text
3386 #: build/C/man2/rt_sigqueueinfo.2:156
3387 msgid ""
3388 "The caller does not have permission to send the signal to the target.  For "
3389 "the required permissions, see B<kill>(2).  Or: I<uinfo-E<gt>si_code> is "
3390 "invalid."
3391 msgstr ""
3392
3393 #. type: Plain text
3394 #: build/C/man2/rt_sigqueueinfo.2:162
3395 msgid "B<rt_sigqueueinfo>(): No thread group matching I<tgid> was found."
3396 msgstr ""
3397
3398 #. type: Plain text
3399 #: build/C/man2/rt_sigqueueinfo.2:169
3400 msgid "B<rt_tgsigqueinfo>(): No thread matching I<tgid> and I<tid> was found."
3401 msgstr ""
3402
3403 #. type: Plain text
3404 #: build/C/man2/rt_sigqueueinfo.2:176
3405 msgid ""
3406 "The B<rt_sigqueueinfo>()  system call was added to Linux in version 2.2.  "
3407 "The B<rt_tgsigqueueinfo>()  system call was added to Linux in version "
3408 "2.6.31."
3409 msgstr ""
3410
3411 #. type: Plain text
3412 #: build/C/man2/rt_sigqueueinfo.2:178 build/C/man2/sgetmask.2:75 build/C/man2/timerfd_create.2:380
3413 msgid "These system calls are Linux-specific."
3414 msgstr ""
3415
3416 #. type: Plain text
3417 #: build/C/man2/rt_sigqueueinfo.2:183
3418 msgid ""
3419 "Since these system calls are not intended for application use, there are no "
3420 "glibc wrapper functions; use B<syscall>(2)  in the unlikely case that you "
3421 "want to call them directly."
3422 msgstr ""
3423
3424 #. type: Plain text
3425 #: build/C/man2/rt_sigqueueinfo.2:188
3426 msgid ""
3427 "As with B<kill>(2), the null signal (0) can be used to check if the "
3428 "specified process or thread exists."
3429 msgstr ""
3430
3431 #. type: Plain text
3432 #: build/C/man2/rt_sigqueueinfo.2:196
3433 msgid ""
3434 "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<tgkill>(2), "
3435 "B<pthread_sigqueue>(3), B<sigqueue>(3), B<signal>(7)"
3436 msgstr ""
3437
3438 #. type: TH
3439 #: build/C/man2/s390_runtime_instr.2:25
3440 #, no-wrap
3441 msgid "S390_RUNTIME_INSTR"
3442 msgstr ""
3443
3444 #. type: TH
3445 #: build/C/man2/s390_runtime_instr.2:25
3446 #, no-wrap
3447 msgid "2012-12-17"
3448 msgstr ""
3449
3450 #. type: Plain text
3451 #: build/C/man2/s390_runtime_instr.2:28
3452 msgid "s390_runtime_instr - enable/disable s390 CPU run-time instrumentation"
3453 msgstr ""
3454
3455 #. type: Plain text
3456 #: build/C/man2/s390_runtime_instr.2:31
3457 #, no-wrap
3458 msgid "B<#include E<lt>asm/runtime_instr.hE<gt>>\n"
3459 msgstr ""
3460
3461 #. type: Plain text
3462 #: build/C/man2/s390_runtime_instr.2:33
3463 #, no-wrap
3464 msgid "B<int s390_runtime_instr(int >I<command>B<, int >I<signum>B<);>\n"
3465 msgstr ""
3466
3467 #. type: Plain text
3468 #: build/C/man2/s390_runtime_instr.2:39
3469 msgid ""
3470 "The B<s390_runtime_instr>()  system call starts or stops CPU run-time "
3471 "instrumentation for the calling thread."
3472 msgstr ""
3473
3474 #. type: Plain text
3475 #: build/C/man2/s390_runtime_instr.2:47
3476 msgid ""
3477 "The I<command> argument controls whether run-time instrumentation is started "
3478 "(B<S390_RUNTIME_INSTR_START>, 1) or stopped (B<S390_RUNTIME_INSTR_STOP>, 2) "
3479 "for the calling thread."
3480 msgstr ""
3481
3482 #. type: Plain text
3483 #: build/C/man2/s390_runtime_instr.2:54
3484 msgid ""
3485 "The I<signum> argument specifies the number of a real-time signal.  The "
3486 "real-time signal is sent to the thread if the run-time instrumentation "
3487 "buffer is full or if the run-time-instrumentation-halted interrupt occurred."
3488 msgstr ""
3489
3490 #. type: Plain text
3491 #: build/C/man2/s390_runtime_instr.2:65
3492 msgid ""
3493 "On success, B<s390_runtime_instr>()  returns 0 and enables the thread for "
3494 "run-time instrumentation by assigning the thread a default run-time "
3495 "instrumentation control block.  The caller can then read and modify the "
3496 "control block and start the run-time instrumentation.  On error, -1 is "
3497 "returned and I<errno> is set to one of the error codes listed below."
3498 msgstr ""
3499
3500 #. type: Plain text
3501 #: build/C/man2/s390_runtime_instr.2:73
3502 msgid ""
3503 "The value specified in I<command> is not a valid command or the value "
3504 "specified in I<signum> is not a real-time signal number."
3505 msgstr ""
3506
3507 #. type: Plain text
3508 #: build/C/man2/s390_runtime_instr.2:76
3509 msgid "Allocating memory for the run-time instrumentation control block failed."
3510 msgstr ""
3511
3512 #. type: TP
3513 #: build/C/man2/s390_runtime_instr.2:76
3514 #, no-wrap
3515 msgid "B<EOPNOTSUPP>"
3516 msgstr ""
3517
3518 #. type: Plain text
3519 #: build/C/man2/s390_runtime_instr.2:79
3520 msgid "The run-time instrumentation facility is not available."
3521 msgstr ""
3522
3523 #. type: Plain text
3524 #: build/C/man2/s390_runtime_instr.2:81
3525 msgid "This system call is available since Linux 3.7."
3526 msgstr ""
3527
3528 #. type: Plain text
3529 #: build/C/man2/s390_runtime_instr.2:84
3530 msgid ""
3531 "This Linux-specific system call is available only on the s390 architecture.  "
3532 "The run-time instrumentation facility is available beginning with System z "
3533 "EC12."
3534 msgstr ""
3535
3536 #. type: Plain text
3537 #: build/C/man2/s390_runtime_instr.2:88
3538 msgid ""
3539 "Glibc does not provide a wrapper for this system call, use B<syscall>(2)  to "
3540 "call it."
3541 msgstr ""
3542
3543 #. type: Plain text
3544 #: build/C/man2/s390_runtime_instr.2:91
3545 msgid "B<syscall>(2), B<signal>(7)"
3546 msgstr ""
3547
3548 #. type: TH
3549 #: build/C/man2/sgetmask.2:26
3550 #, no-wrap
3551 msgid "SGETMASK"
3552 msgstr ""
3553
3554 #. type: Plain text
3555 #: build/C/man2/sgetmask.2:29
3556 msgid "sgetmask, ssetmask - manipulation of signal mask (obsolete)"
3557 msgstr ""
3558
3559 #. type: Plain text
3560 #: build/C/man2/sgetmask.2:31
3561 msgid "B<long sgetmask(void);>"
3562 msgstr ""
3563
3564 #. type: Plain text
3565 #: build/C/man2/sgetmask.2:33
3566 msgid "B<long ssetmask(long >I<newmask>B<);>"
3567 msgstr ""
3568
3569 #. type: Plain text
3570 #: build/C/man2/sgetmask.2:42
3571 msgid ""
3572 "These system calls are obsolete.  I<Do not use them>; use B<sigprocmask>(2)  "
3573 "instead."
3574 msgstr ""
3575
3576 #. type: Plain text
3577 #: build/C/man2/sgetmask.2:45
3578 msgid "B<sgetmask>()  returns the signal mask of the calling process."
3579 msgstr ""
3580
3581 #. type: Plain text
3582 #: build/C/man2/sgetmask.2:50
3583 msgid ""
3584 "B<ssetmask>()  sets the signal mask of the calling process to the value "
3585 "given in I<newmask>.  The previous signal mask is returned."
3586 msgstr ""
3587
3588 #. type: Plain text
3589 #: build/C/man2/sgetmask.2:59
3590 msgid ""
3591 "The signal masks dealt with by these two system calls are plain bit masks "
3592 "(unlike the I<sigset_t> used by B<sigprocmask>(2)); use B<sigmask>(3)  to "
3593 "create and inspect these masks."
3594 msgstr ""
3595
3596 #. type: Plain text
3597 #: build/C/man2/sgetmask.2:64
3598 msgid ""
3599 "B<sgetmask>()  always successfully returns the signal mask.  B<ssetmask>()  "
3600 "always succeeds, and returns the previous signal mask."
3601 msgstr ""
3602
3603 #. type: Plain text
3604 #: build/C/man2/sgetmask.2:66
3605 msgid "These system calls always succeed."
3606 msgstr ""
3607
3608 #.  f6187769dae48234f3877df3c4d99294cc2254fa
3609 #. type: Plain text
3610 #: build/C/man2/sgetmask.2:73
3611 msgid ""
3612 "Since Linux 3.16, support for these system calls is optional, depending on "
3613 "whether the kernel was built with the B<CONFIG_SGETMASK_SYSCALL> option."
3614 msgstr ""
3615
3616 #. type: Plain text
3617 #: build/C/man2/sgetmask.2:79
3618 msgid ""
3619 "Glibc does not provide wrappers for these obsolete system calls; in the "
3620 "unlikely event that you want to call them, use B<syscall>(2)."
3621 msgstr ""
3622
3623 #. type: Plain text
3624 #: build/C/man2/sgetmask.2:82
3625 msgid ""
3626 "These system calls are unaware of signal numbers greater than 31 (i.e., "
3627 "real-time signals)."
3628 msgstr ""
3629
3630 #. type: Plain text
3631 #: build/C/man2/sgetmask.2:84
3632 msgid "These system calls do not exist on x86-64."
3633 msgstr ""
3634
3635 #. type: Plain text
3636 #: build/C/man2/sgetmask.2:89
3637 msgid "It is not possible to block B<SIGSTOP> or B<SIGKILL>."
3638 msgstr ""
3639
3640 #. type: Plain text
3641 #: build/C/man2/sgetmask.2:92
3642 msgid "B<sigprocmask>(2), B<signal>(7)"
3643 msgstr ""
3644
3645 #. type: TH
3646 #: build/C/man2/sigaction.2:47
3647 #, no-wrap
3648 msgid "SIGACTION"
3649 msgstr ""
3650
3651 #. type: Plain text
3652 #: build/C/man2/sigaction.2:50
3653 msgid "sigaction - examine and change a signal action"
3654 msgstr ""
3655
3656 #. type: Plain text
3657 #: build/C/man2/sigaction.2:56
3658 #, no-wrap
3659 msgid ""
3660 "B<int sigaction(int >I<signum>B<, const struct sigaction *>I<act>B<,>\n"
3661 "B<              struct sigaction *>I<oldact>B<);>\n"
3662 msgstr ""
3663
3664 #. type: Plain text
3665 #: build/C/man2/sigaction.2:66
3666 msgid ""
3667 "B<sigaction>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
3668 "_POSIX_SOURCE"
3669 msgstr ""
3670
3671 #. type: Plain text
3672 #: build/C/man2/sigaction.2:69
3673 msgid "I<siginfo_t>: _POSIX_C_SOURCE E<gt>= 199309L"
3674 msgstr ""
3675
3676 #. type: Plain text
3677 #: build/C/man2/sigaction.2:78
3678 msgid ""
3679 "The B<sigaction>()  system call is used to change the action taken by a "
3680 "process on receipt of a specific signal.  (See B<signal>(7)  for an overview "
3681 "of signals.)"
3682 msgstr ""
3683
3684 #. type: Plain text
3685 #: build/C/man2/sigaction.2:84
3686 msgid ""
3687 "I<signum> specifies the signal and can be any valid signal except B<SIGKILL> "
3688 "and B<SIGSTOP>."
3689 msgstr ""
3690
3691 #. type: Plain text
3692 #: build/C/man2/sigaction.2:95
3693 msgid ""
3694 "If I<act> is non-NULL, the new action for signal I<signum> is installed from "
3695 "I<act>.  If I<oldact> is non-NULL, the previous action is saved in "
3696 "I<oldact>."
3697 msgstr ""
3698
3699 #. type: Plain text
3700 #: build/C/man2/sigaction.2:99
3701 msgid "The I<sigaction> structure is defined as something like:"
3702 msgstr ""
3703
3704 #. type: Plain text
3705 #: build/C/man2/sigaction.2:109
3706 #, no-wrap
3707 msgid ""
3708 "struct sigaction {\n"
3709 "    void     (*sa_handler)(int);\n"
3710 "    void     (*sa_sigaction)(int, siginfo_t *, void *);\n"
3711 "    sigset_t   sa_mask;\n"
3712 "    int        sa_flags;\n"
3713 "    void     (*sa_restorer)(void);\n"
3714 "};\n"
3715 msgstr ""
3716
3717 #. type: Plain text
3718 #: build/C/man2/sigaction.2:116
3719 msgid ""
3720 "On some architectures a union is involved: do not assign to both "
3721 "I<sa_handler> and I<sa_sigaction>."
3722 msgstr ""
3723
3724 #. type: Plain text
3725 #: build/C/man2/sigaction.2:125
3726 msgid ""
3727 "The I<sa_restorer> field is not intended for application use.  (POSIX does "
3728 "not specify a I<sa_restorer> field.)  Some further details of purpose of "
3729 "this field can be found in B<sigreturn>(2)."
3730 msgstr ""
3731
3732 #. type: Plain text
3733 #: build/C/man2/sigaction.2:135
3734 msgid ""
3735 "I<sa_handler> specifies the action to be associated with I<signum> and may "
3736 "be B<SIG_DFL> for the default action, B<SIG_IGN> to ignore this signal, or a "
3737 "pointer to a signal handling function.  This function receives the signal "
3738 "number as its only argument."
3739 msgstr ""
3740
3741 #. type: Plain text
3742 #: build/C/man2/sigaction.2:157
3743 msgid ""
3744 "If B<SA_SIGINFO> is specified in I<sa_flags>, then I<sa_sigaction> (instead "
3745 "of I<sa_handler>)  specifies the signal-handling function for I<signum>.  "
3746 "This function receives the signal number as its first argument, a pointer to "
3747 "a I<siginfo_t> as its second argument and a pointer to a I<ucontext_t> (cast "
3748 "to I<void\\ *>) as its third argument.  (Commonly, the handler function "
3749 "doesn't make any use of the third argument.  See B<getcontext>(3)  for "
3750 "further information about I<ucontext_t>.)"
3751 msgstr ""
3752
3753 #. type: Plain text
3754 #: build/C/man2/sigaction.2:167
3755 msgid ""
3756 "I<sa_mask> specifies a mask of signals which should be blocked (i.e., added "
3757 "to the signal mask of the thread in which the signal handler is invoked)  "
3758 "during execution of the signal handler.  In addition, the signal which "
3759 "triggered the handler will be blocked, unless the B<SA_NODEFER> flag is "
3760 "used."
3761 msgstr ""
3762
3763 #. type: Plain text
3764 #: build/C/man2/sigaction.2:171
3765 msgid ""
3766 "I<sa_flags> specifies a set of flags which modify the behavior of the "
3767 "signal.  It is formed by the bitwise OR of zero or more of the following:"
3768 msgstr ""
3769
3770 #. type: TP
3771 #: build/C/man2/sigaction.2:172
3772 #, no-wrap
3773 msgid "B<SA_NOCLDSTOP>"
3774 msgstr ""
3775
3776 #. type: Plain text
3777 #: build/C/man2/sigaction.2:189
3778 msgid ""
3779 "If I<signum> is B<SIGCHLD>, do not receive notification when child processes "
3780 "stop (i.e., when they receive one of B<SIGSTOP>, B<SIGTSTP>, B<SIGTTIN>, or "
3781 "B<SIGTTOU>)  or resume (i.e., they receive B<SIGCONT>)  (see B<wait>(2)).  "
3782 "This flag is meaningful only when establishing a handler for B<SIGCHLD>."
3783 msgstr ""
3784
3785 #. type: TP
3786 #: build/C/man2/sigaction.2:189
3787 #, no-wrap
3788 msgid "B<SA_NOCLDWAIT> (since Linux 2.6)"
3789 msgstr ""
3790
3791 #.  To be precise: Linux 2.5.60 -- MTK
3792 #. type: Plain text
3793 #: build/C/man2/sigaction.2:203
3794 msgid ""
3795 "If I<signum> is B<SIGCHLD>, do not transform children into zombies when they "
3796 "terminate.  See also B<waitpid>(2).  This flag is meaningful only when "
3797 "establishing a handler for B<SIGCHLD>, or when setting that signal's "
3798 "disposition to B<SIG_DFL>."
3799 msgstr ""
3800
3801 #. type: Plain text
3802 #: build/C/man2/sigaction.2:215
3803 msgid ""
3804 "If the B<SA_NOCLDWAIT> flag is set when establishing a handler for "
3805 "B<SIGCHLD>, POSIX.1 leaves it unspecified whether a B<SIGCHLD> signal is "
3806 "generated when a child process terminates.  On Linux, a B<SIGCHLD> signal is "
3807 "generated in this case; on some other implementations, it is not."
3808 msgstr ""
3809
3810 #. type: TP
3811 #: build/C/man2/sigaction.2:215
3812 #, no-wrap
3813 msgid "B<SA_NODEFER>"
3814 msgstr ""
3815
3816 #. type: Plain text
3817 #: build/C/man2/sigaction.2:222
3818 msgid ""
3819 "Do not prevent the signal from being received from within its own signal "
3820 "handler.  This flag is meaningful only when establishing a signal handler.  "
3821 "B<SA_NOMASK> is an obsolete, nonstandard synonym for this flag."
3822 msgstr ""
3823
3824 #. type: TP
3825 #: build/C/man2/sigaction.2:222
3826 #, no-wrap
3827 msgid "B<SA_ONSTACK>"
3828 msgstr ""
3829
3830 #. type: Plain text
3831 #: build/C/man2/sigaction.2:228
3832 msgid ""
3833 "Call the signal handler on an alternate signal stack provided by "
3834 "B<sigaltstack>(2).  If an alternate stack is not available, the default "
3835 "stack will be used.  This flag is meaningful only when establishing a signal "
3836 "handler."
3837 msgstr ""
3838
3839 #. type: TP
3840 #: build/C/man2/sigaction.2:228
3841 #, no-wrap
3842 msgid "B<SA_RESETHAND>"
3843 msgstr ""
3844
3845 #. type: Plain text
3846 #: build/C/man2/sigaction.2:234
3847 msgid ""
3848 "Restore the signal action to the default upon entry to the signal handler.  "
3849 "This flag is meaningful only when establishing a signal handler.  "
3850 "B<SA_ONESHOT> is an obsolete, nonstandard synonym for this flag."
3851 msgstr ""
3852
3853 #. type: TP
3854 #: build/C/man2/sigaction.2:234
3855 #, no-wrap
3856 msgid "B<SA_RESTART>"
3857 msgstr ""
3858
3859 #. type: Plain text
3860 #: build/C/man2/sigaction.2:242
3861 msgid ""
3862 "Provide behavior compatible with BSD signal semantics by making certain "
3863 "system calls restartable across signals.  This flag is meaningful only when "
3864 "establishing a signal handler.  See B<signal>(7)  for a discussion of system "
3865 "call restarting."
3866 msgstr ""
3867
3868 #. type: TP
3869 #: build/C/man2/sigaction.2:242
3870 #, no-wrap
3871 msgid "B<SA_RESTORER>"
3872 msgstr ""
3873
3874 #. type: Plain text
3875 #: build/C/man2/sigaction.2:251
3876 msgid ""
3877 "I<Not intended for application use>.  This flag is used by C libraries to "
3878 "indicate that the I<sa_restorer> field contains the address of a \"signal "
3879 "trampoline\".  See B<sigreturn>(2)  for more details."
3880 msgstr ""
3881
3882 #. type: TP
3883 #: build/C/man2/sigaction.2:251
3884 #, no-wrap
3885 msgid "B<SA_SIGINFO> (since Linux 2.2)"
3886 msgstr ""
3887
3888 #.  (The
3889 #.  .I sa_sigaction
3890 #.  field was added in Linux 2.1.86.)
3891 #. type: Plain text
3892 #: build/C/man2/sigaction.2:262
3893 msgid ""
3894 "The signal handler takes three arguments, not one.  In this case, "
3895 "I<sa_sigaction> should be set instead of I<sa_handler>.  This flag is "
3896 "meaningful only when establishing a signal handler."
3897 msgstr ""
3898
3899 #. type: Plain text
3900 #: build/C/man2/sigaction.2:269
3901 msgid ""
3902 "The I<siginfo_t> argument to I<sa_sigaction> is a struct with the following "
3903 "fields:"
3904 msgstr ""
3905
3906 #.  FIXME
3907 #.  The siginfo_t 'si_trapno' field seems to be used only on SPARC and Alpha;
3908 #.  this page could use a little more detail on its purpose there.
3909 #.  In the kernel: si_tid
3910 #. type: Plain text
3911 #: build/C/man2/sigaction.2:300
3912 #, no-wrap
3913 msgid ""
3914 "siginfo_t {\n"
3915 "    int      si_signo;    /* Signal number */\n"
3916 "    int      si_errno;    /* An errno value */\n"
3917 "    int      si_code;     /* Signal code */\n"
3918 "    int      si_trapno;   /* Trap number that caused\n"
3919 "                             hardware-generated signal\n"
3920 "                             (unused on most architectures) */\n"
3921 "    pid_t    si_pid;      /* Sending process ID */\n"
3922 "    uid_t    si_uid;      /* Real user ID of sending process */\n"
3923 "    int      si_status;   /* Exit value or signal */\n"
3924 "    clock_t  si_utime;    /* User time consumed */\n"
3925 "    clock_t  si_stime;    /* System time consumed */\n"
3926 "    sigval_t si_value;    /* Signal value */\n"
3927 "    int      si_int;      /* POSIX.1b signal */\n"
3928 "    void    *si_ptr;      /* POSIX.1b signal */\n"
3929 "    int      si_overrun;  /* Timer overrun count; POSIX.1b timers */\n"
3930 "    int      si_timerid;  /* Timer ID; POSIX.1b timers */\n"
3931 "    void    *si_addr;     /* Memory location which caused fault */\n"
3932 "    long     si_band;     /* Band event (was I<int> in\n"
3933 "                             glibc 2.3.2 and earlier) */\n"
3934 "    int      si_fd;       /* File descriptor */\n"
3935 "    short    si_addr_lsb; /* Least significant bit of address\n"
3936 "                             (since Linux 2.6.32) */\n"
3937 "}\n"
3938 msgstr ""
3939
3940 #. type: Plain text
3941 #: build/C/man2/sigaction.2:309
3942 msgid ""
3943 "I<si_signo>, I<si_errno> and I<si_code> are defined for all signals.  "
3944 "(I<si_errno> is generally unused on Linux.)  The rest of the struct may be a "
3945 "union, so that one should read only the fields that are meaningful for the "
3946 "given signal:"
3947 msgstr ""
3948
3949 #. type: Plain text
3950 #: build/C/man2/sigaction.2:324
3951 msgid ""
3952 "Signals sent with B<kill>(2)  and B<sigqueue>(3)  fill in I<si_pid> and "
3953 "I<si_uid>.  In addition, signals sent with B<sigqueue>(3)  fill in I<si_int> "
3954 "and I<si_ptr> with the values specified by the sender of the signal; see "
3955 "B<sigqueue>(3)  for more details."
3956 msgstr ""
3957
3958 #. type: Plain text
3959 #: build/C/man2/sigaction.2:340
3960 msgid ""
3961 "Signals sent by POSIX.1b timers (since Linux 2.6) fill in I<si_overrun> and "
3962 "I<si_timerid>.  The I<si_timerid> field is an internal ID used by the kernel "
3963 "to identify the timer; it is not the same as the timer ID returned by "
3964 "B<timer_create>(2).  The I<si_overrun> field is the timer overrun count; "
3965 "this is the same information as is obtained by a call to "
3966 "B<timer_getoverrun>(2).  These fields are nonstandard Linux extensions."
3967 msgstr ""
3968
3969 #. type: Plain text
3970 #: build/C/man2/sigaction.2:355
3971 msgid ""
3972 "Signals sent for message queue notification (see the description of "
3973 "B<SIGEV_SIGNAL> in B<mq_notify>(3))  fill in I<si_int>/I<si_ptr>, with the "
3974 "I<sigev_value> supplied to B<mq_notify>(3); I<si_pid>, with the process ID "
3975 "of the message sender; and I<si_uid>, with the real user ID of the message "
3976 "sender."
3977 msgstr ""
3978
3979 #.  FIXME .
3980 #.  When si_utime and si_stime where originally implemented, the
3981 #.  measurement unit was HZ, which was the same as clock ticks
3982 #.  (sysconf(_SC_CLK_TCK)).  In 2.6, HZ became configurable, and
3983 #.  was *still* used as the unit to return the info these fields,
3984 #.  with the result that the field values depended on the the
3985 #.  configured HZ.  Of course, the should have been measured in
3986 #.  USER_HZ instead, so that sysconf(_SC_CLK_TCK) could be used to
3987 #.  convert to seconds.  I have a queued patch to fix this:
3988 #.  http://thread.gmane.org/gmane.linux.kernel/698061/ .
3989 #.  This patch made it into 2.6.27.
3990 #.  But note that these fields still don't return the times of
3991 #.  waited-for children (as is done by getrusage() and times()
3992 #.  and wait4()).  Solaris 8 does include child times.
3993 #. type: Plain text
3994 #: build/C/man2/sigaction.2:402
3995 msgid ""
3996 "B<SIGCHLD> fills in I<si_pid>, I<si_uid>, I<si_status>, I<si_utime>, and "
3997 "I<si_stime>, providing information about the child.  The I<si_pid> field is "
3998 "the process ID of the child; I<si_uid> is the child's real user ID.  The "
3999 "I<si_status> field contains the exit status of the child (if I<si_code> is "
4000 "B<CLD_EXITED>), or the signal number that caused the process to change "
4001 "state.  The I<si_utime> and I<si_stime> contain the user and system CPU time "
4002 "used by the child process; these fields do not include the times used by "
4003 "waited-for children (unlike B<getrusage>(2)  and B<times>(2)).  In kernels "
4004 "up to 2.6, and since 2.6.27, these fields report CPU time in units of "
4005 "I<sysconf(_SC_CLK_TCK)>.  In 2.6 kernels before 2.6.27, a bug meant that "
4006 "these fields reported time in units of the (configurable) system jiffy (see "
4007 "B<time>(7))."
4008 msgstr ""
4009
4010 #.  FIXME . SIGTRAP also sets the following for ptrace_notify() ?
4011 #.      info.si_code = exit_code;
4012 #.      info.si_pid = task_pid_vnr(current);
4013 #.      info.si_uid = current_uid();  /* Real UID */
4014 #. type: Plain text
4015 #: build/C/man2/sigaction.2:438
4016 msgid ""
4017 "B<SIGILL>, B<SIGFPE>, B<SIGSEGV>, B<SIGBUS>, and B<SIGTRAP> fill in "
4018 "I<si_addr> with the address of the fault.  On some architectures, these "
4019 "signals also fill in the I<si_trapno> field.  Some suberrors of B<SIGBUS>, "
4020 "in particular B<BUS_MCEERR_AO> and B<BUS_MCEERR_AR>, also fill in "
4021 "I<si_addr_lsb>.  This field indicates the least significant bit of the "
4022 "reported address and therefore the extent of the corruption.  For example, "
4023 "if a full page was corrupted, I<si_addr_lsb> contains "
4024 "I<log2(sysconf(_SC_PAGESIZE))>.  B<BUS_MCERR_*> and I<si_addr_lsb> are "
4025 "Linux-specific extensions."
4026 msgstr ""
4027
4028 #. type: Plain text
4029 #: build/C/man2/sigaction.2:452
4030 msgid ""
4031 "B<SIGIO>/B<SIGPOLL> (the two names are synonyms on Linux)  fills in "
4032 "I<si_band> and I<si_fd>.  The I<si_band> event is a bit mask containing the "
4033 "same values as are filled in the I<revents> field by B<poll>(2).  The "
4034 "I<si_fd> field indicates the file descriptor for which the I/O event "
4035 "occurred."
4036 msgstr ""
4037
4038 #. type: Plain text
4039 #: build/C/man2/sigaction.2:459
4040 msgid ""
4041 "I<si_code> is a value (not a bit mask)  indicating why this signal was "
4042 "sent.  The following list shows the values which can be placed in I<si_code> "
4043 "for any signal, along with reason that the signal was generated."
4044 msgstr ""
4045
4046 #. type: TP
4047 #: build/C/man2/sigaction.2:460
4048 #, no-wrap
4049 msgid "B<SI_USER>"
4050 msgstr ""
4051
4052 #. type: TP
4053 #: build/C/man2/sigaction.2:463 build/C/man7/signal.7:111
4054 #, no-wrap
4055 msgid "B<kill>(2)"
4056 msgstr ""
4057
4058 #. type: TP
4059 #: build/C/man2/sigaction.2:463
4060 #, no-wrap
4061 msgid "B<SI_KERNEL>"
4062 msgstr ""
4063
4064 #. type: Plain text
4065 #: build/C/man2/sigaction.2:466
4066 msgid "Sent by the kernel."
4067 msgstr ""
4068
4069 #. type: TP
4070 #: build/C/man2/sigaction.2:466
4071 #, no-wrap
4072 msgid "B<SI_QUEUE>"
4073 msgstr ""
4074
4075 #. type: TP
4076 #: build/C/man2/sigaction.2:469 build/C/man7/signal.7:128
4077 #, no-wrap
4078 msgid "B<sigqueue>(3)"
4079 msgstr ""
4080
4081 #. type: TP
4082 #: build/C/man2/sigaction.2:469
4083 #, no-wrap
4084 msgid "B<SI_TIMER>"
4085 msgstr ""
4086
4087 #. type: Plain text
4088 #: build/C/man2/sigaction.2:472
4089 msgid "POSIX timer expired"
4090 msgstr ""
4091
4092 #. type: TP
4093 #: build/C/man2/sigaction.2:472
4094 #, no-wrap
4095 msgid "B<SI_MESGQ>"
4096 msgstr ""
4097
4098 #. type: Plain text
4099 #: build/C/man2/sigaction.2:476
4100 msgid "POSIX message queue state changed (since Linux 2.6.6); see B<mq_notify>(3)"
4101 msgstr ""
4102
4103 #. type: TP
4104 #: build/C/man2/sigaction.2:476
4105 #, no-wrap
4106 msgid "B<SI_ASYNCIO>"
4107 msgstr ""
4108
4109 #. type: Plain text
4110 #: build/C/man2/sigaction.2:479
4111 msgid "AIO completed"
4112 msgstr ""
4113
4114 #. type: TP
4115 #: build/C/man2/sigaction.2:479
4116 #, no-wrap
4117 msgid "B<SI_SIGIO>"
4118 msgstr ""
4119
4120 #. type: Plain text
4121 #: build/C/man2/sigaction.2:488
4122 msgid ""
4123 "Queued B<SIGIO> (only in kernels up to Linux 2.2; from Linux 2.4 onward "
4124 "B<SIGIO>/B<SIGPOLL> fills in I<si_code> as described below)."
4125 msgstr ""
4126
4127 #. type: TP
4128 #: build/C/man2/sigaction.2:488
4129 #, no-wrap
4130 msgid "B<SI_TKILL>"
4131 msgstr ""
4132
4133 #.  SI_DETHREAD is defined in 2.6.9 sources, but isn't implemented
4134 #.  It appears to have been an idea that was tried during 2.5.6
4135 #.  through to 2.5.24 and then was backed out.
4136 #. type: Plain text
4137 #: build/C/man2/sigaction.2:497
4138 msgid "B<tkill>(2)  or B<tgkill>(2)  (since Linux 2.4.19)"
4139 msgstr ""
4140
4141 #. type: Plain text
4142 #: build/C/man2/sigaction.2:504
4143 msgid "The following values can be placed in I<si_code> for a B<SIGILL> signal:"
4144 msgstr ""
4145
4146 #. type: TP
4147 #: build/C/man2/sigaction.2:505
4148 #, no-wrap
4149 msgid "B<ILL_ILLOPC>"
4150 msgstr ""
4151
4152 #. type: Plain text
4153 #: build/C/man2/sigaction.2:508
4154 msgid "illegal opcode"
4155 msgstr ""
4156
4157 #. type: TP
4158 #: build/C/man2/sigaction.2:508
4159 #, no-wrap
4160 msgid "B<ILL_ILLOPN>"
4161 msgstr ""
4162
4163 #. type: Plain text
4164 #: build/C/man2/sigaction.2:511
4165 msgid "illegal operand"
4166 msgstr ""
4167
4168 #. type: TP
4169 #: build/C/man2/sigaction.2:511
4170 #, no-wrap
4171 msgid "B<ILL_ILLADR>"
4172 msgstr ""
4173
4174 #. type: Plain text
4175 #: build/C/man2/sigaction.2:514
4176 msgid "illegal addressing mode"
4177 msgstr ""
4178
4179 #. type: TP
4180 #: build/C/man2/sigaction.2:514
4181 #, no-wrap
4182 msgid "B<ILL_ILLTRP>"
4183 msgstr ""
4184
4185 #. type: Plain text
4186 #: build/C/man2/sigaction.2:517
4187 msgid "illegal trap"
4188 msgstr ""
4189
4190 #. type: TP
4191 #: build/C/man2/sigaction.2:517
4192 #, no-wrap
4193 msgid "B<ILL_PRVOPC>"
4194 msgstr ""
4195
4196 #. type: Plain text
4197 #: build/C/man2/sigaction.2:520
4198 msgid "privileged opcode"
4199 msgstr ""
4200
4201 #. type: TP
4202 #: build/C/man2/sigaction.2:520
4203 #, no-wrap
4204 msgid "B<ILL_PRVREG>"
4205 msgstr ""
4206
4207 #. type: Plain text
4208 #: build/C/man2/sigaction.2:523
4209 msgid "privileged register"
4210 msgstr ""
4211
4212 #. type: TP
4213 #: build/C/man2/sigaction.2:523
4214 #, no-wrap
4215 msgid "B<ILL_COPROC>"
4216 msgstr ""
4217
4218 #. type: Plain text
4219 #: build/C/man2/sigaction.2:526
4220 msgid "coprocessor error"
4221 msgstr ""
4222
4223 #. type: TP
4224 #: build/C/man2/sigaction.2:526
4225 #, no-wrap
4226 msgid "B<ILL_BADSTK>"
4227 msgstr ""
4228
4229 #. type: Plain text
4230 #: build/C/man2/sigaction.2:529
4231 msgid "internal stack error"
4232 msgstr ""
4233
4234 #. type: Plain text
4235 #: build/C/man2/sigaction.2:536
4236 msgid "The following values can be placed in I<si_code> for a B<SIGFPE> signal:"
4237 msgstr ""
4238
4239 #. type: TP
4240 #: build/C/man2/sigaction.2:537
4241 #, no-wrap
4242 msgid "B<FPE_INTDIV>"
4243 msgstr ""
4244
4245 #. type: Plain text
4246 #: build/C/man2/sigaction.2:540
4247 msgid "integer divide by zero"
4248 msgstr ""
4249
4250 #. type: TP
4251 #: build/C/man2/sigaction.2:540
4252 #, no-wrap
4253 msgid "B<FPE_INTOVF>"
4254 msgstr ""
4255
4256 #. type: Plain text
4257 #: build/C/man2/sigaction.2:543
4258 msgid "integer overflow"
4259 msgstr ""
4260
4261 #. type: TP
4262 #: build/C/man2/sigaction.2:543
4263 #, no-wrap
4264 msgid "B<FPE_FLTDIV>"
4265 msgstr ""
4266
4267 #. type: Plain text
4268 #: build/C/man2/sigaction.2:546
4269 msgid "floating-point divide by zero"
4270 msgstr ""
4271
4272 #. type: TP
4273 #: build/C/man2/sigaction.2:546
4274 #, no-wrap
4275 msgid "B<FPE_FLTOVF>"
4276 msgstr ""
4277
4278 #. type: Plain text
4279 #: build/C/man2/sigaction.2:549
4280 msgid "floating-point overflow"
4281 msgstr ""
4282
4283 #. type: TP
4284 #: build/C/man2/sigaction.2:549
4285 #, no-wrap
4286 msgid "B<FPE_FLTUND>"
4287 msgstr ""
4288
4289 #. type: Plain text
4290 #: build/C/man2/sigaction.2:552
4291 msgid "floating-point underflow"
4292 msgstr ""
4293
4294 #. type: TP
4295 #: build/C/man2/sigaction.2:552
4296 #, no-wrap
4297 msgid "B<FPE_FLTRES>"
4298 msgstr ""
4299
4300 #. type: Plain text
4301 #: build/C/man2/sigaction.2:555
4302 msgid "floating-point inexact result"
4303 msgstr ""
4304
4305 #. type: TP
4306 #: build/C/man2/sigaction.2:555
4307 #, no-wrap
4308 msgid "B<FPE_FLTINV>"
4309 msgstr ""
4310
4311 #. type: Plain text
4312 #: build/C/man2/sigaction.2:558
4313 msgid "floating-point invalid operation"
4314 msgstr ""
4315
4316 #. type: TP
4317 #: build/C/man2/sigaction.2:558
4318 #, no-wrap
4319 msgid "B<FPE_FLTSUB>"
4320 msgstr ""
4321
4322 #. type: Plain text
4323 #: build/C/man2/sigaction.2:561
4324 msgid "subscript out of range"
4325 msgstr ""
4326
4327 #. type: Plain text
4328 #: build/C/man2/sigaction.2:568
4329 msgid "The following values can be placed in I<si_code> for a B<SIGSEGV> signal:"
4330 msgstr ""
4331
4332 #. type: TP
4333 #: build/C/man2/sigaction.2:569
4334 #, no-wrap
4335 msgid "B<SEGV_MAPERR>"
4336 msgstr ""
4337
4338 #. type: Plain text
4339 #: build/C/man2/sigaction.2:572
4340 msgid "address not mapped to object"
4341 msgstr ""
4342
4343 #. type: TP
4344 #: build/C/man2/sigaction.2:572
4345 #, no-wrap
4346 msgid "B<SEGV_ACCERR>"
4347 msgstr ""
4348
4349 #. type: Plain text
4350 #: build/C/man2/sigaction.2:575
4351 msgid "invalid permissions for mapped object"
4352 msgstr ""
4353
4354 #. type: Plain text
4355 #: build/C/man2/sigaction.2:582
4356 msgid "The following values can be placed in I<si_code> for a B<SIGBUS> signal:"
4357 msgstr ""
4358
4359 #. type: TP
4360 #: build/C/man2/sigaction.2:583
4361 #, no-wrap
4362 msgid "B<BUS_ADRALN>"
4363 msgstr ""
4364
4365 #. type: Plain text
4366 #: build/C/man2/sigaction.2:586
4367 msgid "invalid address alignment"
4368 msgstr ""
4369
4370 #. type: TP
4371 #: build/C/man2/sigaction.2:586
4372 #, no-wrap
4373 msgid "B<BUS_ADRERR>"
4374 msgstr ""
4375
4376 #. type: Plain text
4377 #: build/C/man2/sigaction.2:589
4378 msgid "nonexistent physical address"
4379 msgstr ""
4380
4381 #. type: TP
4382 #: build/C/man2/sigaction.2:589
4383 #, no-wrap
4384 msgid "B<BUS_OBJERR>"
4385 msgstr ""
4386
4387 #. type: Plain text
4388 #: build/C/man2/sigaction.2:592
4389 msgid "object-specific hardware error"
4390 msgstr ""
4391
4392 #. type: TP
4393 #: build/C/man2/sigaction.2:592
4394 #, no-wrap
4395 msgid "B<BUS_MCEERR_AR> (since Linux 2.6.32)"
4396 msgstr ""
4397
4398 #. type: Plain text
4399 #: build/C/man2/sigaction.2:595
4400 msgid "Hardware memory error consumed on a machine check; action required."
4401 msgstr ""
4402
4403 #. type: TP
4404 #: build/C/man2/sigaction.2:595
4405 #, no-wrap
4406 msgid "B<BUS_MCEERR_AO> (since Linux 2.6.32)"
4407 msgstr ""
4408
4409 #. type: Plain text
4410 #: build/C/man2/sigaction.2:598
4411 msgid "Hardware memory error detected in process but not consumed; action optional."
4412 msgstr ""
4413
4414 #. type: Plain text
4415 #: build/C/man2/sigaction.2:605
4416 msgid "The following values can be placed in I<si_code> for a B<SIGTRAP> signal:"
4417 msgstr ""
4418
4419 #. type: TP
4420 #: build/C/man2/sigaction.2:606
4421 #, no-wrap
4422 msgid "B<TRAP_BRKPT>"
4423 msgstr ""
4424
4425 #. type: Plain text
4426 #: build/C/man2/sigaction.2:609
4427 msgid "process breakpoint"
4428 msgstr ""
4429
4430 #. type: TP
4431 #: build/C/man2/sigaction.2:609
4432 #, no-wrap
4433 msgid "B<TRAP_TRACE>"
4434 msgstr ""
4435
4436 #. type: Plain text
4437 #: build/C/man2/sigaction.2:612
4438 msgid "process trace trap"
4439 msgstr ""
4440
4441 #. type: TP
4442 #: build/C/man2/sigaction.2:612
4443 #, no-wrap
4444 msgid "B<TRAP_BRANCH> (since Linux 2.4)"
4445 msgstr ""
4446
4447 #. type: Plain text
4448 #: build/C/man2/sigaction.2:615
4449 msgid "process taken branch trap"
4450 msgstr ""
4451
4452 #. type: TP
4453 #: build/C/man2/sigaction.2:615
4454 #, no-wrap
4455 msgid "B<TRAP_HWBKPT> (since Linux 2.4)"
4456 msgstr ""
4457
4458 #. type: Plain text
4459 #: build/C/man2/sigaction.2:618
4460 msgid "hardware breakpoint/watchpoint"
4461 msgstr ""
4462
4463 #. type: Plain text
4464 #: build/C/man2/sigaction.2:625
4465 msgid "The following values can be placed in I<si_code> for a B<SIGCHLD> signal:"
4466 msgstr ""
4467
4468 #. type: TP
4469 #: build/C/man2/sigaction.2:626
4470 #, no-wrap
4471 msgid "B<CLD_EXITED>"
4472 msgstr ""
4473
4474 #. type: Plain text
4475 #: build/C/man2/sigaction.2:629
4476 msgid "child has exited"
4477 msgstr ""
4478
4479 #. type: TP
4480 #: build/C/man2/sigaction.2:629
4481 #, no-wrap
4482 msgid "B<CLD_KILLED>"
4483 msgstr ""
4484
4485 #. type: Plain text
4486 #: build/C/man2/sigaction.2:632
4487 msgid "child was killed"
4488 msgstr ""
4489
4490 #. type: TP
4491 #: build/C/man2/sigaction.2:632
4492 #, no-wrap
4493 msgid "B<CLD_DUMPED>"
4494 msgstr ""
4495
4496 #. type: Plain text
4497 #: build/C/man2/sigaction.2:635
4498 msgid "child terminated abnormally"
4499 msgstr ""
4500
4501 #. type: TP
4502 #: build/C/man2/sigaction.2:635
4503 #, no-wrap
4504 msgid "B<CLD_TRAPPED>"
4505 msgstr ""
4506
4507 #. type: Plain text
4508 #: build/C/man2/sigaction.2:638
4509 msgid "traced child has trapped"
4510 msgstr ""
4511
4512 #. type: TP
4513 #: build/C/man2/sigaction.2:638
4514 #, no-wrap
4515 msgid "B<CLD_STOPPED>"
4516 msgstr ""
4517
4518 #. type: Plain text
4519 #: build/C/man2/sigaction.2:641
4520 msgid "child has stopped"
4521 msgstr ""
4522
4523 #. type: TP
4524 #: build/C/man2/sigaction.2:641
4525 #, no-wrap
4526 msgid "B<CLD_CONTINUED>"
4527 msgstr ""
4528
4529 #. type: Plain text
4530 #: build/C/man2/sigaction.2:644
4531 msgid "stopped child has continued (since Linux 2.6.9)"
4532 msgstr ""
4533
4534 #. type: Plain text
4535 #: build/C/man2/sigaction.2:651
4536 msgid ""
4537 "The following values can be placed in I<si_code> for a B<SIGIO>/B<SIGPOLL> "
4538 "signal:"
4539 msgstr ""
4540
4541 #. type: TP
4542 #: build/C/man2/sigaction.2:652
4543 #, no-wrap
4544 msgid "B<POLL_IN>"
4545 msgstr ""
4546
4547 #. type: Plain text
4548 #: build/C/man2/sigaction.2:655
4549 msgid "data input available"
4550 msgstr ""
4551
4552 #. type: TP
4553 #: build/C/man2/sigaction.2:655
4554 #, no-wrap
4555 msgid "B<POLL_OUT>"
4556 msgstr ""
4557
4558 #. type: Plain text
4559 #: build/C/man2/sigaction.2:658
4560 msgid "output buffers available"
4561 msgstr ""
4562
4563 #. type: TP
4564 #: build/C/man2/sigaction.2:658
4565 #, no-wrap
4566 msgid "B<POLL_MSG>"
4567 msgstr ""
4568
4569 #. type: Plain text
4570 #: build/C/man2/sigaction.2:661
4571 msgid "input message available"
4572 msgstr ""
4573
4574 #. type: TP
4575 #: build/C/man2/sigaction.2:661
4576 #, no-wrap
4577 msgid "B<POLL_ERR>"
4578 msgstr ""
4579
4580 #. type: Plain text
4581 #: build/C/man2/sigaction.2:664
4582 msgid "I/O error"
4583 msgstr ""
4584
4585 #. type: TP
4586 #: build/C/man2/sigaction.2:664
4587 #, no-wrap
4588 msgid "B<POLL_PRI>"
4589 msgstr ""
4590
4591 #. type: Plain text
4592 #: build/C/man2/sigaction.2:667
4593 msgid "high priority input available"
4594 msgstr ""
4595
4596 #. type: TP
4597 #: build/C/man2/sigaction.2:667
4598 #, no-wrap
4599 msgid "B<POLL_HUP>"
4600 msgstr ""
4601
4602 #. type: Plain text
4603 #: build/C/man2/sigaction.2:670
4604 msgid "device disconnected"
4605 msgstr ""
4606
4607 #. type: Plain text
4608 #: build/C/man2/sigaction.2:676
4609 msgid ""
4610 "B<sigaction>()  returns 0 on success; on error, -1 is returned, and I<errno> "
4611 "is set to indicate the error."
4612 msgstr ""
4613
4614 #. type: Plain text
4615 #: build/C/man2/sigaction.2:681
4616 msgid ""
4617 "I<act> or I<oldact> points to memory which is not a valid part of the "
4618 "process address space."
4619 msgstr ""
4620
4621 #. type: Plain text
4622 #: build/C/man2/sigaction.2:688
4623 msgid ""
4624 "An invalid signal was specified.  This will also be generated if an attempt "
4625 "is made to change the action for B<SIGKILL> or B<SIGSTOP>, which cannot be "
4626 "caught or ignored."
4627 msgstr ""
4628
4629 #.  SVr4 does not document the EINTR condition.
4630 #. type: Plain text
4631 #: build/C/man2/sigaction.2:691
4632 msgid "POSIX.1-2001, SVr4."
4633 msgstr ""
4634
4635 #. type: Plain text
4636 #: build/C/man2/sigaction.2:699 build/C/man7/signal.7:105
4637 msgid ""
4638 "A child created via B<fork>(2)  inherits a copy of its parent's signal "
4639 "dispositions.  During an B<execve>(2), the dispositions of handled signals "
4640 "are reset to the default; the dispositions of ignored signals are left "
4641 "unchanged."
4642 msgstr ""
4643
4644 #. type: Plain text
4645 #: build/C/man2/sigaction.2:717 build/C/man2/signal.2:134
4646 msgid ""
4647 "According to POSIX, the behavior of a process is undefined after it ignores "
4648 "a B<SIGFPE>, B<SIGILL>, or B<SIGSEGV> signal that was not generated by "
4649 "B<kill>(2)  or B<raise>(3).  Integer division by zero has undefined result.  "
4650 "On some architectures it will generate a B<SIGFPE> signal.  (Also dividing "
4651 "the most negative integer by -1 may generate B<SIGFPE>.)  Ignoring this "
4652 "signal might lead to an endless loop."
4653 msgstr ""
4654
4655 #. type: Plain text
4656 #: build/C/man2/sigaction.2:734
4657 msgid ""
4658 "POSIX.1-1990 disallowed setting the action for B<SIGCHLD> to B<SIG_IGN>.  "
4659 "POSIX.1-2001 allows this possibility, so that ignoring B<SIGCHLD> can be "
4660 "used to prevent the creation of zombies (see B<wait>(2)).  Nevertheless, the "
4661 "historical BSD and System\\ V behaviors for ignoring B<SIGCHLD> differ, so "
4662 "that the only completely portable method of ensuring that terminated "
4663 "children do not become zombies is to catch the B<SIGCHLD> signal and perform "
4664 "a B<wait>(2)  or similar."
4665 msgstr ""
4666
4667 #. type: Plain text
4668 #: build/C/man2/sigaction.2:747
4669 msgid ""
4670 "POSIX.1-1990 specified only B<SA_NOCLDSTOP>.  POSIX.1-2001 added "
4671 "B<SA_NOCLDWAIT>, B<SA_RESETHAND>, B<SA_NODEFER>, and B<SA_SIGINFO>.  Use of "
4672 "these latter values in I<sa_flags> may be less portable in applications "
4673 "intended for older UNIX implementations."
4674 msgstr ""
4675
4676 #. type: Plain text
4677 #: build/C/man2/sigaction.2:751
4678 msgid "The B<SA_RESETHAND> flag is compatible with the SVr4 flag of the same name."
4679 msgstr ""
4680
4681 #. type: Plain text
4682 #: build/C/man2/sigaction.2:761
4683 msgid ""
4684 "The B<SA_NODEFER> flag is compatible with the SVr4 flag of the same name "
4685 "under kernels 1.3.9 and newer.  On older kernels the Linux implementation "
4686 "allowed the receipt of any signal, not just the one we are installing "
4687 "(effectively overriding any I<sa_mask> settings)."
4688 msgstr ""
4689
4690 #. type: Plain text
4691 #: build/C/man2/sigaction.2:767
4692 msgid ""
4693 "B<sigaction>()  can be called with a NULL second argument to query the "
4694 "current signal handler.  It can also be used to check whether a given signal "
4695 "is valid for the current machine by calling it with NULL second and third "
4696 "arguments."
4697 msgstr ""
4698
4699 #. type: Plain text
4700 #: build/C/man2/sigaction.2:773
4701 msgid ""
4702 "It is not possible to block B<SIGKILL> or B<SIGSTOP> (by specifying them in "
4703 "I<sa_mask>).  Attempts to do so are silently ignored."
4704 msgstr ""
4705
4706 #. type: Plain text
4707 #: build/C/man2/sigaction.2:777 build/C/man2/sigpending.2:70 build/C/man2/sigprocmask.2:144 build/C/man2/sigsuspend.2:108
4708 msgid "See B<sigsetops>(3)  for details on manipulating signal sets."
4709 msgstr ""
4710
4711 #. type: Plain text
4712 #: build/C/man2/sigaction.2:782
4713 msgid ""
4714 "See B<signal>(7)  for a list of the async-signal-safe functions that can be "
4715 "safely called inside from inside a signal handler."
4716 msgstr ""
4717
4718 #. type: SS
4719 #: build/C/man2/sigaction.2:782
4720 #, no-wrap
4721 msgid "Undocumented"
4722 msgstr ""
4723
4724 #. type: Plain text
4725 #: build/C/man2/sigaction.2:792
4726 msgid ""
4727 "Before the introduction of B<SA_SIGINFO> it was also possible to get some "
4728 "additional information, namely by using a I<sa_handler> with second argument "
4729 "of type I<struct sigcontext>.  See the relevant Linux kernel sources for "
4730 "details.  This use is obsolete now."
4731 msgstr ""
4732
4733 #. type: Plain text
4734 #: build/C/man2/sigaction.2:801
4735 msgid ""
4736 "In kernels up to and including 2.6.13, specifying B<SA_NODEFER> in "
4737 "I<sa_flags> prevents not only the delivered signal from being masked during "
4738 "execution of the handler, but also the signals specified in I<sa_mask>.  "
4739 "This bug was fixed in kernel 2.6.14."
4740 msgstr ""
4741
4742 #. type: Plain text
4743 #: build/C/man2/sigaction.2:804
4744 msgid "See B<mprotect>(2)."
4745 msgstr ""
4746
4747 #. type: Plain text
4748 #: build/C/man2/sigaction.2:825
4749 msgid ""
4750 "B<kill>(1), B<kill>(2), B<killpg>(2), B<pause>(2), B<restart_syscall>(2), "
4751 "B<sigaltstack>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), "
4752 "B<sigreturn>(2), B<sigprocmask>(2), B<sigsuspend>(2), B<wait>(2), "
4753 "B<raise>(3), B<siginterrupt>(3), B<sigqueue>(3), B<sigsetops>(3), "
4754 "B<sigvec>(3), B<core>(5), B<signal>(7)"
4755 msgstr ""
4756
4757 #. type: TH
4758 #: build/C/man2/sigaltstack.2:27
4759 #, no-wrap
4760 msgid "SIGALTSTACK"
4761 msgstr ""
4762
4763 #. type: TH
4764 #: build/C/man2/sigaltstack.2:27
4765 #, no-wrap
4766 msgid "2010-09-26"
4767 msgstr ""
4768
4769 #. type: Plain text
4770 #: build/C/man2/sigaltstack.2:30
4771 msgid "sigaltstack - set and/or get signal stack context"
4772 msgstr ""
4773
4774 #. type: Plain text
4775 #: build/C/man2/sigaltstack.2:34
4776 msgid "B<int sigaltstack(const stack_t *>I<ss>B<, stack_t *>I<oss>B<);>"
4777 msgstr ""
4778
4779 #. type: Plain text
4780 #: build/C/man2/sigaltstack.2:41
4781 msgid "B<sigaltstack>():"
4782 msgstr ""
4783
4784 #. type: Plain text
4785 #: build/C/man2/sigaltstack.2:48 build/C/man3/siginterrupt.3:53 build/C/man2/wait.2:80
4786 msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
4787 msgstr ""
4788
4789 #. type: Plain text
4790 #: build/C/man2/sigaltstack.2:60
4791 msgid ""
4792 "B<sigaltstack>()  allows a process to define a new alternate signal stack "
4793 "and/or retrieve the state of an existing alternate signal stack.  An "
4794 "alternate signal stack is used during the execution of a signal handler if "
4795 "the establishment of that handler (see B<sigaction>(2))  requested it."
4796 msgstr ""
4797
4798 #. type: Plain text
4799 #: build/C/man2/sigaltstack.2:63
4800 msgid ""
4801 "The normal sequence of events for using an alternate signal stack is the "
4802 "following:"
4803 msgstr ""
4804
4805 #. type: IP
4806 #: build/C/man2/sigaltstack.2:63 build/C/man7/signal.7:387
4807 #, no-wrap
4808 msgid "1."
4809 msgstr ""
4810
4811 #. type: Plain text
4812 #: build/C/man2/sigaltstack.2:67
4813 msgid "Allocate an area of memory to be used for the alternate signal stack."
4814 msgstr ""
4815
4816 #. type: IP
4817 #: build/C/man2/sigaltstack.2:67 build/C/man7/signal.7:391
4818 #, no-wrap
4819 msgid "2."
4820 msgstr ""
4821
4822 #. type: Plain text
4823 #: build/C/man2/sigaltstack.2:73
4824 msgid ""
4825 "Use B<sigaltstack>()  to inform the system of the existence and location of "
4826 "the alternate signal stack."
4827 msgstr ""
4828
4829 #. type: IP
4830 #: build/C/man2/sigaltstack.2:73 build/C/man7/signal.7:411
4831 #, no-wrap
4832 msgid "3."
4833 msgstr ""
4834
4835 #. type: Plain text
4836 #: build/C/man2/sigaltstack.2:80
4837 msgid ""
4838 "When establishing a signal handler using B<sigaction>(2), inform the system "
4839 "that the signal handler should be executed on the alternate signal stack by "
4840 "specifying the B<SA_ONSTACK> flag."
4841 msgstr ""
4842
4843 #. type: Plain text
4844 #: build/C/man2/sigaltstack.2:88
4845 msgid ""
4846 "The I<ss> argument is used to specify a new alternate signal stack, while "
4847 "the I<oss> argument is used to retrieve information about the currently "
4848 "established signal stack.  If we are interested in performing just one of "
4849 "these tasks, then the other argument can be specified as NULL.  Each of "
4850 "these arguments is a structure of the following type:"
4851 msgstr ""
4852
4853 #. type: Plain text
4854 #: build/C/man2/sigaltstack.2:96
4855 #, no-wrap
4856 msgid ""
4857 "typedef struct {\n"
4858 "    void  *ss_sp;     /* Base address of stack */\n"
4859 "    int    ss_flags;  /* Flags */\n"
4860 "    size_t ss_size;   /* Number of bytes in stack */\n"
4861 "} stack_t;\n"
4862 msgstr ""
4863
4864 #. type: Plain text
4865 #: build/C/man2/sigaltstack.2:107
4866 msgid ""
4867 "To establish a new alternate signal stack, I<ss.ss_flags> is set to zero, "
4868 "and I<ss.ss_sp> and I<ss.ss_size> specify the starting address and size of "
4869 "the stack.  The constant B<SIGSTKSZ> is defined to be large enough to cover "
4870 "the usual size requirements for an alternate signal stack, and the constant "
4871 "B<MINSIGSTKSZ> defines the minimum size required to execute a signal "
4872 "handler."
4873 msgstr ""
4874
4875 #. type: Plain text
4876 #: build/C/man2/sigaltstack.2:111
4877 msgid ""
4878 "When a signal handler is invoked on the alternate stack, the kernel "
4879 "automatically aligns the address given in I<ss.ss_sp> to a suitable address "
4880 "boundary for the underlying hardware architecture."
4881 msgstr ""
4882
4883 #. type: Plain text
4884 #: build/C/man2/sigaltstack.2:116
4885 msgid ""
4886 "To disable an existing stack, specify I<ss.ss_flags> as B<SS_DISABLE>.  In "
4887 "this case, the remaining fields in I<ss> are ignored."
4888 msgstr ""
4889
4890 #. type: Plain text
4891 #: build/C/man2/sigaltstack.2:124
4892 msgid ""
4893 "If I<oss> is not NULL, then it is used to return information about the "
4894 "alternate signal stack which was in effect prior to the call to "
4895 "B<sigaltstack>().  The I<oss.ss_sp> and I<oss.ss_size> fields return the "
4896 "starting address and size of that stack.  The I<oss.ss_flags> may return "
4897 "either of the following values:"
4898 msgstr ""
4899
4900 #. type: TP
4901 #: build/C/man2/sigaltstack.2:124
4902 #, no-wrap
4903 msgid "B<SS_ONSTACK>"
4904 msgstr ""
4905
4906 #. type: Plain text
4907 #: build/C/man2/sigaltstack.2:130
4908 msgid ""
4909 "The process is currently executing on the alternate signal stack.  (Note "
4910 "that it is not possible to change the alternate signal stack if the process "
4911 "is currently executing on it.)"
4912 msgstr ""
4913
4914 #. type: TP
4915 #: build/C/man2/sigaltstack.2:130
4916 #, no-wrap
4917 msgid "B<SS_DISABLE>"
4918 msgstr ""
4919
4920 #. type: Plain text
4921 #: build/C/man2/sigaltstack.2:133
4922 msgid "The alternate signal stack is currently disabled."
4923 msgstr ""
4924
4925 #. type: Plain text
4926 #: build/C/man2/sigaltstack.2:137
4927 msgid ""
4928 "B<sigaltstack>()  returns 0 on success, or -1 on failure with I<errno> set "
4929 "to indicate the error."
4930 msgstr ""
4931
4932 #. type: Plain text
4933 #: build/C/man2/sigaltstack.2:142
4934 msgid ""
4935 "Either I<ss> or I<oss> is not NULL and points to an area outside of the "
4936 "process's address space."
4937 msgstr ""
4938
4939 #. type: Plain text
4940 #: build/C/man2/sigaltstack.2:147
4941 msgid ""
4942 "I<ss> is not NULL and the I<ss_flags> field contains a nonzero value other "
4943 "than B<SS_DISABLE>."
4944 msgstr ""
4945
4946 #. type: Plain text
4947 #: build/C/man2/sigaltstack.2:153
4948 msgid ""
4949 "The specified size of the new alternate signal stack I<ss.ss_size> was less "
4950 "than B<MINSTKSZ>."
4951 msgstr ""
4952
4953 #. type: Plain text
4954 #: build/C/man2/sigaltstack.2:158
4955 msgid ""
4956 "An attempt was made to change the alternate signal stack while it was active "
4957 "(i.e., the process was already executing on the current alternate signal "
4958 "stack)."
4959 msgstr ""
4960
4961 #. type: Plain text
4962 #: build/C/man2/sigaltstack.2:160
4963 msgid "SUSv2, SVr4, POSIX.1-2001."
4964 msgstr ""
4965
4966 #. type: Plain text
4967 #: build/C/man2/sigaltstack.2:168
4968 msgid ""
4969 "The most common usage of an alternate signal stack is to handle the "
4970 "B<SIGSEGV> signal that is generated if the space available for the normal "
4971 "process stack is exhausted: in this case, a signal handler for B<SIGSEGV> "
4972 "cannot be invoked on the process stack; if we wish to handle it, we must use "
4973 "an alternate signal stack."
4974 msgstr ""
4975
4976 #. type: Plain text
4977 #: build/C/man2/sigaltstack.2:178
4978 msgid ""
4979 "Establishing an alternate signal stack is useful if a process expects that "
4980 "it may exhaust its standard stack.  This may occur, for example, because the "
4981 "stack grows so large that it encounters the upwardly growing heap, or it "
4982 "reaches a limit established by a call to B<setrlimit(RLIMIT_STACK, &rlim)>.  "
4983 "If the standard stack is exhausted, the kernel sends the process a "
4984 "B<SIGSEGV> signal.  In these circumstances the only way to catch this signal "
4985 "is on an alternate signal stack."
4986 msgstr ""
4987
4988 #. type: Plain text
4989 #: build/C/man2/sigaltstack.2:184
4990 msgid ""
4991 "On most hardware architectures supported by Linux, stacks grow downward.  "
4992 "B<sigaltstack>()  automatically takes account of the direction of stack "
4993 "growth."
4994 msgstr ""
4995
4996 #. type: Plain text
4997 #: build/C/man2/sigaltstack.2:193
4998 msgid ""
4999 "Functions called from a signal handler executing on an alternate signal "
5000 "stack will also use the alternate signal stack.  (This also applies to any "
5001 "handlers invoked for other signals while the process is executing on the "
5002 "alternate signal stack.)  Unlike the standard stack, the system does not "
5003 "automatically extend the alternate signal stack.  Exceeding the allocated "
5004 "size of the alternate signal stack will lead to unpredictable results."
5005 msgstr ""
5006
5007 #. type: Plain text
5008 #: build/C/man2/sigaltstack.2:201
5009 msgid ""
5010 "A successful call to B<execve>(2)  removes any existing alternate signal "
5011 "stack.  A child process created via B<fork>(2)  inherits a copy of its "
5012 "parent's alternate signal stack settings."
5013 msgstr ""
5014
5015 #. type: Plain text
5016 #: build/C/man2/sigaltstack.2:210
5017 msgid ""
5018 "B<sigaltstack>()  supersedes the older B<sigstack>()  call.  For backward "
5019 "compatibility, glibc also provides B<sigstack>().  All new applications "
5020 "should be written using B<sigaltstack>()."
5021 msgstr ""
5022
5023 #. type: SS
5024 #: build/C/man2/sigaltstack.2:210 build/C/man3/sigpause.3:66
5025 #, no-wrap
5026 msgid "History"
5027 msgstr ""
5028
5029 #. type: Plain text
5030 #: build/C/man2/sigaltstack.2:217
5031 msgid ""
5032 "4.2BSD had a B<sigstack>()  system call.  It used a slightly different "
5033 "struct, and had the major disadvantage that the caller had to know the "
5034 "direction of stack growth."
5035 msgstr ""
5036
5037 #. type: Plain text
5038 #: build/C/man2/sigaltstack.2:220
5039 msgid "The following code segment demonstrates the use of B<sigaltstack>():"
5040 msgstr ""
5041
5042 #. type: Plain text
5043 #: build/C/man2/sigaltstack.2:224
5044 #, no-wrap
5045 msgid "stack_t ss;\n"
5046 msgstr ""
5047
5048 #. type: Plain text
5049 #: build/C/man2/sigaltstack.2:232
5050 #, no-wrap
5051 msgid ""
5052 "ss.ss_sp = malloc(SIGSTKSZ);\n"
5053 "if (ss.ss_sp == NULL)\n"
5054 "    /* Handle error */;\n"
5055 "ss.ss_size = SIGSTKSZ;\n"
5056 "ss.ss_flags = 0;\n"
5057 "if (sigaltstack(&ss, NULL) == -1)\n"
5058 "    /* Handle error */;\n"
5059 msgstr ""
5060
5061 #. type: Plain text
5062 #: build/C/man2/sigaltstack.2:241
5063 msgid ""
5064 "B<execve>(2), B<setrlimit>(2), B<sigaction>(2), B<siglongjmp>(3), "
5065 "B<sigsetjmp>(3), B<signal>(7)"
5066 msgstr ""
5067
5068 #. type: TH
5069 #: build/C/man7/sigevent.7:26
5070 #, no-wrap
5071 msgid "SIGEVENT"
5072 msgstr ""
5073
5074 #. type: TH
5075 #: build/C/man7/sigevent.7:26
5076 #, no-wrap
5077 msgid "2011-09-09"
5078 msgstr ""
5079
5080 #. type: Plain text
5081 #: build/C/man7/sigevent.7:29
5082 msgid "sigevent - structure for notification from asynchronous routines"
5083 msgstr ""
5084
5085 #. type: Plain text
5086 #: build/C/man7/sigevent.7:36
5087 #, no-wrap
5088 msgid ""
5089 "union sigval {          /* Data passed with notification */\n"
5090 "    int     sival_int;         /* Integer value */\n"
5091 "    void   *sival_ptr;         /* Pointer value */\n"
5092 "};\n"
5093 msgstr ""
5094
5095 #. type: Plain text
5096 #: build/C/man7/sigevent.7:51
5097 #, no-wrap
5098 msgid ""
5099 "struct sigevent {\n"
5100 "    int          sigev_notify; /* Notification method */\n"
5101 "    int          sigev_signo;  /* Notification signal */\n"
5102 "    union sigval sigev_value;  /* Data passed with\n"
5103 "                                  notification */\n"
5104 "    void       (*sigev_notify_function) (union sigval);\n"
5105 "                     /* Function used for thread\n"
5106 "                        notification (SIGEV_THREAD) */\n"
5107 "    void        *sigev_notify_attributes;\n"
5108 "                     /* Attributes for notification thread\n"
5109 "                        (SIGEV_THREAD) */\n"
5110 "    pid_t        sigev_notify_thread_id;\n"
5111 "                     /* ID of thread to signal (SIGEV_THREAD_ID) */\n"
5112 "};\n"
5113 msgstr ""
5114
5115 #. type: Plain text
5116 #: build/C/man7/sigevent.7:60
5117 msgid ""
5118 "The I<sigevent> structure is used by various APIs to describe the way a "
5119 "process is to be notified about an event (e.g., completion of an "
5120 "asynchronous request, expiration of a timer, or the arrival of a message)."
5121 msgstr ""
5122
5123 #. type: Plain text
5124 #: build/C/man7/sigevent.7:68
5125 msgid ""
5126 "The definition shown in the SYNOPSIS is approximate: some of the fields in "
5127 "the I<sigevent> structure may be defined as part of a union.  Programs "
5128 "should employ only those fields relevant to the value specified in "
5129 "I<sigev_notify>."
5130 msgstr ""
5131
5132 #. type: Plain text
5133 #: build/C/man7/sigevent.7:73
5134 msgid ""
5135 "The I<sigev_notify> field specifies how notification is to be performed.  "
5136 "This field can have one of the following values:"
5137 msgstr ""
5138
5139 #. type: TP
5140 #: build/C/man7/sigevent.7:73 build/C/man2/timer_create.2:109
5141 #, no-wrap
5142 msgid "B<SIGEV_NONE>"
5143 msgstr ""
5144
5145 #. type: Plain text
5146 #: build/C/man7/sigevent.7:76
5147 msgid "A \"null\" notification: don't do anything when the event occurs."
5148 msgstr ""
5149
5150 #. type: TP
5151 #: build/C/man7/sigevent.7:76 build/C/man2/timer_create.2:114
5152 #, no-wrap
5153 msgid "B<SIGEV_SIGNAL>"
5154 msgstr ""
5155
5156 #. type: Plain text
5157 #: build/C/man7/sigevent.7:80
5158 msgid "Notify the process by sending the signal specified in I<sigev_signo>."
5159 msgstr ""
5160
5161 #. type: Plain text
5162 #: build/C/man7/sigevent.7:87
5163 msgid ""
5164 "If the signal is caught with a signal handler that was registered using the "
5165 "B<sigaction>(2)  B<SA_SIGINFO> flag, then the following fields are set in "
5166 "the I<siginfo_t> structure that is passed as the second argument of the "
5167 "handler:"
5168 msgstr ""
5169
5170 #. type: Plain text
5171 #: build/C/man7/sigevent.7:92
5172 msgid ""
5173 "This field is set to a value that depends on the API delivering the "
5174 "notification."
5175 msgstr ""
5176
5177 #. type: TP
5178 #: build/C/man7/sigevent.7:92 build/C/man2/wait.2:302
5179 #, no-wrap
5180 msgid "I<si_signo>"
5181 msgstr ""
5182
5183 #. type: Plain text
5184 #: build/C/man7/sigevent.7:96
5185 msgid ""
5186 "This field is set to the signal number (i.e., the same value as in "
5187 "I<sigev_signo>)."
5188 msgstr ""
5189
5190 #. type: Plain text
5191 #: build/C/man7/sigevent.7:100
5192 msgid "This field is set to the value specified in I<sigev_value>."
5193 msgstr ""
5194
5195 #. type: Plain text
5196 #: build/C/man7/sigevent.7:105
5197 msgid ""
5198 "Depending on the API, other fields may also be set in the I<siginfo_t> "
5199 "structure."
5200 msgstr ""
5201
5202 #. type: Plain text
5203 #: build/C/man7/sigevent.7:108
5204 msgid ""
5205 "The same information is also available if the signal is accepted using "
5206 "B<sigwaitinfo>(2)."
5207 msgstr ""
5208
5209 #. type: TP
5210 #: build/C/man7/sigevent.7:108 build/C/man2/timer_create.2:132
5211 #, no-wrap
5212 msgid "B<SIGEV_THREAD>"
5213 msgstr ""
5214
5215 #. type: Plain text
5216 #: build/C/man7/sigevent.7:125
5217 msgid ""
5218 "Notify the process by invoking I<sigev_notify_function> \"as if\" it were "
5219 "the start function of a new thread.  (Among the implementation possibilities "
5220 "here are that each timer notification could result in the creation of a new "
5221 "thread, or that a single thread is created to receive all notifications.)  "
5222 "The function is invoked with I<sigev_value> as its sole argument.  If "
5223 "I<sigev_notify_attributes> is not NULL, it should point to a "
5224 "I<pthread_attr_t> structure that defines attributes for the new thread (see "
5225 "B<pthread_attr_init>(3))."
5226 msgstr ""
5227
5228 #. type: TP
5229 #: build/C/man7/sigevent.7:125 build/C/man2/timer_create.2:140
5230 #, no-wrap
5231 msgid "B<SIGEV_THREAD_ID> (Linux-specific)"
5232 msgstr ""
5233
5234 #.  | SIGEV_SIGNAL vs not?
5235 #. type: Plain text
5236 #: build/C/man7/sigevent.7:130
5237 msgid "Currently used only by POSIX timers; see B<timer_create>(2)."
5238 msgstr ""
5239
5240 #. type: Plain text
5241 #: build/C/man7/sigevent.7:132 build/C/man2/sigpending.2:66 build/C/man2/sigprocmask.2:114 build/C/man3/sigqueue.3:121 build/C/man3/sigsetops.3:147 build/C/man2/sigsuspend.2:86 build/C/man3/sigwait.3:87 build/C/man2/sigwaitinfo.2:135 build/C/man2/timer_create.2:197 build/C/man2/timer_delete.2:69 build/C/man2/timer_getoverrun.2:99 build/C/man2/timer_settime.2:209
5242 msgid "POSIX.1-2001."
5243 msgstr ""
5244
5245 #. type: Plain text
5246 #: build/C/man7/sigevent.7:142
5247 msgid ""
5248 "B<timer_create>(2), B<aio_fsync>(3), B<aio_read>(3), B<aio_write>(3), "
5249 "B<getaddrinfo_a>(3), B<lio_listio>(3), B<mq_notify>(3), B<aio>(7), "
5250 "B<pthreads>(7)"
5251 msgstr ""
5252
5253 #. type: TH
5254 #: build/C/man3/siginterrupt.3:31
5255 #, no-wrap
5256 msgid "SIGINTERRUPT"
5257 msgstr ""
5258
5259 #. type: TH
5260 #: build/C/man3/siginterrupt.3:31
5261 #, no-wrap
5262 msgid "2014-06-13"
5263 msgstr ""
5264
5265 #. type: Plain text
5266 #: build/C/man3/siginterrupt.3:34
5267 msgid "siginterrupt - allow signals to interrupt system calls"
5268 msgstr ""
5269
5270 #. type: Plain text
5271 #: build/C/man3/siginterrupt.3:39
5272 #, no-wrap
5273 msgid "B<int siginterrupt(int >I<sig>B<, int >I<flag>B<);>\n"
5274 msgstr ""
5275
5276 #. type: Plain text
5277 #: build/C/man3/siginterrupt.3:47
5278 msgid "B<siginterrupt>():"
5279 msgstr ""
5280
5281 #. type: Plain text
5282 #: build/C/man3/siginterrupt.3:64
5283 msgid ""
5284 "The B<siginterrupt>()  function changes the restart behavior when a system "
5285 "call is interrupted by the signal I<sig>.  If the I<flag> argument is false "
5286 "(0), then system calls will be restarted if interrupted by the specified "
5287 "signal I<sig>.  This is the default behavior in Linux."
5288 msgstr ""
5289
5290 #. type: Plain text
5291 #: build/C/man3/siginterrupt.3:69
5292 msgid ""
5293 "If the I<flag> argument is true (1) and no data has been transferred, then a "
5294 "system call interrupted by the signal I<sig> will return -1 and I<errno> "
5295 "will be set to B<EINTR>."
5296 msgstr ""
5297
5298 #. type: Plain text
5299 #: build/C/man3/siginterrupt.3:73
5300 msgid ""
5301 "If the I<flag> argument is true (1) and data transfer has started, then the "
5302 "system call will be interrupted and will return the actual amount of data "
5303 "transferred."
5304 msgstr ""
5305
5306 #. type: Plain text
5307 #: build/C/man3/siginterrupt.3:83
5308 msgid ""
5309 "The B<siginterrupt>()  function returns 0 on success.  It returns -1 if the "
5310 "signal number I<sig> is invalid, with I<errno> set to indicate the cause of "
5311 "the error."
5312 msgstr ""
5313
5314 #. type: Plain text
5315 #: build/C/man3/siginterrupt.3:87
5316 msgid "The specified signal number is invalid."
5317 msgstr ""
5318
5319 #. type: Plain text
5320 #: build/C/man3/siginterrupt.3:93
5321 msgid ""
5322 "The B<siginterrupt>()  function uses a global variable that is not "
5323 "protected, so it is not thread-safe."
5324 msgstr ""
5325
5326 #. type: Plain text
5327 #: build/C/man3/siginterrupt.3:102
5328 msgid ""
5329 "4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<siginterrupt>()  as obsolete, "
5330 "recommending the use of B<sigaction>(2)  with the B<SA_RESTART> flag "
5331 "instead."
5332 msgstr ""
5333
5334 #. type: Plain text
5335 #: build/C/man3/siginterrupt.3:104
5336 msgid "B<signal>(2)"
5337 msgstr ""
5338
5339 #. type: TH
5340 #: build/C/man2/signal.2:36 build/C/man7/signal.7:46
5341 #, no-wrap
5342 msgid "SIGNAL"
5343 msgstr ""
5344
5345 #. type: TH
5346 #: build/C/man2/signal.2:36 build/C/man3/sigpause.3:25 build/C/man2/sigwaitinfo.2:25 build/C/man2/timer_create.2:33 build/C/man2/wait.2:49
5347 #, no-wrap
5348 msgid "2014-08-19"
5349 msgstr ""
5350
5351 #. type: Plain text
5352 #: build/C/man2/signal.2:39
5353 msgid "signal - ANSI C signal handling"
5354 msgstr ""
5355
5356 #. type: Plain text
5357 #: build/C/man2/signal.2:45
5358 msgid "B<sighandler_t signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
5359 msgstr ""
5360
5361 #. type: Plain text
5362 #: build/C/man2/signal.2:54
5363 msgid ""
5364 "The behavior of B<signal>()  varies across UNIX versions, and has also "
5365 "varied historically across different versions of Linux.  B<Avoid its use>: "
5366 "use B<sigaction>(2)  instead.  See I<Portability> below."
5367 msgstr ""
5368
5369 #. type: Plain text
5370 #: build/C/man2/signal.2:64
5371 msgid ""
5372 "B<signal>()  sets the disposition of the signal I<signum> to I<handler>, "
5373 "which is either B<SIG_IGN>, B<SIG_DFL>, or the address of a "
5374 "programmer-defined function (a \"signal handler\")."
5375 msgstr ""
5376
5377 #. type: Plain text
5378 #: build/C/man2/signal.2:68
5379 msgid ""
5380 "If the signal I<signum> is delivered to the process, then one of the "
5381 "following happens:"
5382 msgstr ""
5383
5384 #. type: Plain text
5385 #: build/C/man2/signal.2:73
5386 msgid "If the disposition is set to B<SIG_IGN>, then the signal is ignored."
5387 msgstr ""
5388
5389 #. type: Plain text
5390 #: build/C/man2/signal.2:80
5391 msgid ""
5392 "If the disposition is set to B<SIG_DFL>, then the default action associated "
5393 "with the signal (see B<signal>(7))  occurs."
5394 msgstr ""
5395
5396 #. type: Plain text
5397 #: build/C/man2/signal.2:91
5398 msgid ""
5399 "If the disposition is set to a function, then first either the disposition "
5400 "is reset to B<SIG_DFL>, or the signal is blocked (see I<Portability> below), "
5401 "and then I<handler> is called with argument I<signum>.  If invocation of the "
5402 "handler caused the signal to be blocked, then the signal is unblocked upon "
5403 "return from the handler."
5404 msgstr ""
5405
5406 #. type: Plain text
5407 #: build/C/man2/signal.2:97
5408 msgid "The signals B<SIGKILL> and B<SIGSTOP> cannot be caught or ignored."
5409 msgstr ""
5410
5411 #. type: Plain text
5412 #: build/C/man2/signal.2:105
5413 msgid ""
5414 "B<signal>()  returns the previous value of the signal handler, or B<SIG_ERR> "
5415 "on error.  In the event of an error, I<errno> is set to indicate the cause."
5416 msgstr ""
5417
5418 #. type: Plain text
5419 #: build/C/man2/signal.2:110
5420 msgid "I<signum> is invalid."
5421 msgstr ""
5422
5423 #. type: Plain text
5424 #: build/C/man2/signal.2:116
5425 msgid "The effects of B<signal>()  in a multithreaded process are unspecified."
5426 msgstr ""
5427
5428 #. type: Plain text
5429 #: build/C/man2/signal.2:141
5430 msgid ""
5431 "See B<sigaction>(2)  for details on what happens when B<SIGCHLD> is set to "
5432 "B<SIG_IGN>."
5433 msgstr ""
5434
5435 #. type: Plain text
5436 #: build/C/man2/signal.2:146
5437 msgid ""
5438 "See B<signal>(7)  for a list of the async-signal-safe functions that can be "
5439 "safely called from inside a signal handler."
5440 msgstr ""
5441
5442 #.  libc4 and libc5 define
5443 #.  .IR SignalHandler ;
5444 #. type: Plain text
5445 #: build/C/man2/signal.2:162
5446 msgid ""
5447 "The use of I<sighandler_t> is a GNU extension, exposed if B<_GNU_SOURCE> is "
5448 "defined; glibc also defines (the BSD-derived)  I<sig_t> if B<_BSD_SOURCE> is "
5449 "defined.  Without use of such a type, the declaration of B<signal>()  is the "
5450 "somewhat harder to read:"
5451 msgstr ""
5452
5453 #. type: Plain text
5454 #: build/C/man2/signal.2:166
5455 #, no-wrap
5456 msgid ""
5457 "B<void ( *>I<signal>B<(int >I<signum>B<, void (*>I<handler>B<)(int)) ) "
5458 "(int);>\n"
5459 msgstr ""
5460
5461 #. type: SS
5462 #: build/C/man2/signal.2:168
5463 #, no-wrap
5464 msgid "Portability"
5465 msgstr ""
5466
5467 #. type: Plain text
5468 #: build/C/man2/signal.2:180
5469 msgid ""
5470 "The only portable use of B<signal>()  is to set a signal's disposition to "
5471 "B<SIG_DFL> or B<SIG_IGN>.  The semantics when using B<signal>()  to "
5472 "establish a signal handler vary across systems (and POSIX.1 explicitly "
5473 "permits this variation); B<do not use it for this purpose.>"
5474 msgstr ""
5475
5476 #. type: Plain text
5477 #: build/C/man2/signal.2:186
5478 msgid ""
5479 "POSIX.1 solved the portability mess by specifying B<sigaction>(2), which "
5480 "provides explicit control of the semantics when a signal handler is invoked; "
5481 "use that interface instead of B<signal>()."
5482 msgstr ""
5483
5484 #. type: Plain text
5485 #: build/C/man2/signal.2:196
5486 msgid ""
5487 "In the original UNIX systems, when a handler that was established using "
5488 "B<signal>()  was invoked by the delivery of a signal, the disposition of the "
5489 "signal would be reset to B<SIG_DFL>, and the system did not block delivery "
5490 "of further instances of the signal.  This is equivalent to calling "
5491 "B<sigaction>(2)  with the following flags:"
5492 msgstr ""
5493
5494 #. type: Plain text
5495 #: build/C/man2/signal.2:198
5496 #, no-wrap
5497 msgid "    sa.sa_flags = SA_RESETHAND | SA_NODEFER;\n"
5498 msgstr ""
5499
5500 #. type: Plain text
5501 #: build/C/man2/signal.2:205
5502 msgid ""
5503 "System\\ V also provides these semantics for B<signal>().  This was bad "
5504 "because the signal might be delivered again before the handler had a chance "
5505 "to reestablish itself.  Furthermore, rapid deliveries of the same signal "
5506 "could result in recursive invocations of the handler."
5507 msgstr ""
5508
5509 #. type: Plain text
5510 #: build/C/man2/signal.2:220
5511 msgid ""
5512 "BSD improved on this situation, but unfortunately also changed the semantics "
5513 "of the existing B<signal>()  interface while doing so.  On BSD, when a "
5514 "signal handler is invoked, the signal disposition is not reset, and further "
5515 "instances of the signal are blocked from being delivered while the handler "
5516 "is executing.  Furthermore, certain blocking system calls are automatically "
5517 "restarted if interrupted by a signal handler (see B<signal>(7)).  The BSD "
5518 "semantics are equivalent to calling B<sigaction>(2)  with the following "
5519 "flags:"
5520 msgstr ""
5521
5522 #. type: Plain text
5523 #: build/C/man2/signal.2:222
5524 #, no-wrap
5525 msgid "    sa.sa_flags = SA_RESTART;\n"
5526 msgstr ""
5527
5528 #. type: Plain text
5529 #: build/C/man2/signal.2:224
5530 msgid "The situation on Linux is as follows:"
5531 msgstr ""
5532
5533 #. type: Plain text
5534 #: build/C/man2/signal.2:228
5535 msgid "The kernel's B<signal>()  system call provides System\\ V semantics."
5536 msgstr ""
5537
5538 #. type: Plain text
5539 #: build/C/man2/signal.2:244
5540 msgid ""
5541 "By default, in glibc 2 and later, the B<signal>()  wrapper function does not "
5542 "invoke the kernel system call.  Instead, it calls B<sigaction>(2)  using "
5543 "flags that supply BSD semantics.  This default behavior is provided as long "
5544 "as the B<_BSD_SOURCE> feature test macro is defined.  By default, "
5545 "B<_BSD_SOURCE> is defined; it is also implicitly defined if one defines "
5546 "B<_GNU_SOURCE>, and can of course be explicitly defined."
5547 msgstr ""
5548
5549 #
5550 #.  System V semantics are also provided if one uses the separate
5551 #.  .BR sysv_signal (3)
5552 #.  function.
5553 #.  .IP *
5554 #.  The
5555 #.  .BR signal ()
5556 #.  function in Linux libc4 and libc5 provide System\ V semantics.
5557 #.  If one on a libc5 system includes
5558 #.  .I <bsd/signal.h>
5559 #.  instead of
5560 #.  .IR <signal.h> ,
5561 #.  then
5562 #.  .BR signal ()
5563 #.  provides BSD semantics.
5564 #. type: Plain text
5565 #: build/C/man2/signal.2:278
5566 msgid ""
5567 "On glibc 2 and later, if the B<_BSD_SOURCE> feature test macro is not "
5568 "defined, then B<signal>()  provides System\\ V semantics.  (The default "
5569 "implicit definition of B<_BSD_SOURCE> is not provided if one invokes "
5570 "B<gcc>(1)  in one of its standard modes (I<-std=xxx> or I<-ansi>)  or "
5571 "defines various other feature test macros such as B<_POSIX_SOURCE>, "
5572 "B<_XOPEN_SOURCE>, or B<_SVID_SOURCE>; see B<feature_test_macros>(7).)"
5573 msgstr ""
5574
5575 #. type: Plain text
5576 #: build/C/man2/signal.2:297
5577 msgid ""
5578 "B<kill>(1), B<alarm>(2), B<kill>(2), B<killpg>(2), B<pause>(2), "
5579 "B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), "
5580 "B<sigsuspend>(2), B<bsd_signal>(3), B<raise>(3), B<siginterrupt>(3), "
5581 "B<sigqueue>(3), B<sigsetops>(3), B<sigvec>(3), B<sysv_signal>(3), "
5582 "B<signal>(7)"
5583 msgstr ""
5584
5585 #. type: Plain text
5586 #: build/C/man7/signal.7:49
5587 msgid "signal - overview of signals"
5588 msgstr ""
5589
5590 #. type: Plain text
5591 #: build/C/man7/signal.7:52
5592 msgid ""
5593 "Linux supports both POSIX reliable signals (hereinafter \"standard "
5594 "signals\") and POSIX real-time signals."
5595 msgstr ""
5596
5597 #. type: SS
5598 #: build/C/man7/signal.7:52
5599 #, no-wrap
5600 msgid "Signal dispositions"
5601 msgstr ""
5602
5603 #. type: Plain text
5604 #: build/C/man7/signal.7:57
5605 msgid ""
5606 "Each signal has a current I<disposition>, which determines how the process "
5607 "behaves when it is delivered the signal."
5608 msgstr ""
5609
5610 #. type: Plain text
5611 #: build/C/man7/signal.7:60
5612 msgid ""
5613 "The entries in the \"Action\" column of the tables below specify the default "
5614 "disposition for each signal, as follows:"
5615 msgstr ""
5616
5617 #. type: IP
5618 #: build/C/man7/signal.7:60
5619 #, no-wrap
5620 msgid "Term"
5621 msgstr ""
5622
5623 #. type: Plain text
5624 #: build/C/man7/signal.7:62
5625 msgid "Default action is to terminate the process."
5626 msgstr ""
5627
5628 #. type: IP
5629 #: build/C/man7/signal.7:62
5630 #, no-wrap
5631 msgid "Ign"
5632 msgstr ""
5633
5634 #. type: Plain text
5635 #: build/C/man7/signal.7:64
5636 msgid "Default action is to ignore the signal."
5637 msgstr ""
5638
5639 #. type: IP
5640 #: build/C/man7/signal.7:64
5641 #, no-wrap
5642 msgid "Core"
5643 msgstr ""
5644
5645 #. type: Plain text
5646 #: build/C/man7/signal.7:67
5647 msgid "Default action is to terminate the process and dump core (see B<core>(5))."
5648 msgstr ""
5649
5650 #. type: IP
5651 #: build/C/man7/signal.7:67
5652 #, no-wrap
5653 msgid "Stop"
5654 msgstr ""
5655
5656 #. type: Plain text
5657 #: build/C/man7/signal.7:69
5658 msgid "Default action is to stop the process."
5659 msgstr ""
5660
5661 #. type: IP
5662 #: build/C/man7/signal.7:69
5663 #, no-wrap
5664 msgid "Cont"
5665 msgstr ""
5666
5667 #. type: Plain text
5668 #: build/C/man7/signal.7:71
5669 msgid "Default action is to continue the process if it is currently stopped."
5670 msgstr ""
5671
5672 #. type: Plain text
5673 #: build/C/man7/signal.7:93
5674 msgid ""
5675 "A process can change the disposition of a signal using B<sigaction>(2)  or "
5676 "B<signal>(2).  (The latter is less portable when establishing a signal "
5677 "handler; see B<signal>(2)  for details.)  Using these system calls, a "
5678 "process can elect one of the following behaviors to occur on delivery of the "
5679 "signal: perform the default action; ignore the signal; or catch the signal "
5680 "with a I<signal handler>, a programmer-defined function that is "
5681 "automatically invoked when the signal is delivered.  (By default, the signal "
5682 "handler is invoked on the normal process stack.  It is possible to arrange "
5683 "that the signal handler uses an alternate stack; see B<sigaltstack>(2)  for "
5684 "a discussion of how to do this and when it might be useful.)"
5685 msgstr ""
5686
5687 #. type: Plain text
5688 #: build/C/man7/signal.7:97
5689 msgid ""
5690 "The signal disposition is a per-process attribute: in a multithreaded "
5691 "application, the disposition of a particular signal is the same for all "
5692 "threads."
5693 msgstr ""
5694
5695 #. type: SS
5696 #: build/C/man7/signal.7:105
5697 #, no-wrap
5698 msgid "Sending a signal"
5699 msgstr ""
5700
5701 #. type: Plain text
5702 #: build/C/man7/signal.7:108
5703 msgid ""
5704 "The following system calls and library functions allow the caller to send a "
5705 "signal:"
5706 msgstr ""
5707
5708 #. type: TP
5709 #: build/C/man7/signal.7:108
5710 #, no-wrap
5711 msgid "B<raise>(3)"
5712 msgstr ""
5713
5714 #. type: Plain text
5715 #: build/C/man7/signal.7:111
5716 msgid "Sends a signal to the calling thread."
5717 msgstr ""
5718
5719 #. type: Plain text
5720 #: build/C/man7/signal.7:116
5721 msgid ""
5722 "Sends a signal to a specified process, to all members of a specified process "
5723 "group, or to all processes on the system."
5724 msgstr ""
5725
5726 #. type: TP
5727 #: build/C/man7/signal.7:116
5728 #, no-wrap
5729 msgid "B<killpg>(2)"
5730 msgstr ""
5731
5732 #. type: Plain text
5733 #: build/C/man7/signal.7:119
5734 msgid "Sends a signal to all of the members of a specified process group."
5735 msgstr ""
5736
5737 #. type: TP
5738 #: build/C/man7/signal.7:119
5739 #, no-wrap
5740 msgid "B<pthread_kill>(3)"
5741 msgstr ""
5742
5743 #. type: Plain text
5744 #: build/C/man7/signal.7:123
5745 msgid ""
5746 "Sends a signal to a specified POSIX thread in the same process as the "
5747 "caller."
5748 msgstr ""
5749
5750 #. type: TP
5751 #: build/C/man7/signal.7:123
5752 #, no-wrap
5753 msgid "B<tgkill>(2)"
5754 msgstr ""
5755
5756 #. type: Plain text
5757 #: build/C/man7/signal.7:128
5758 msgid ""
5759 "Sends a signal to a specified thread within a specific process.  (This is "
5760 "the system call used to implement B<pthread_kill>(3).)"
5761 msgstr ""
5762
5763 #. type: Plain text
5764 #: build/C/man7/signal.7:131
5765 msgid "Sends a real-time signal with accompanying data to a specified process."
5766 msgstr ""
5767
5768 #. type: SS
5769 #: build/C/man7/signal.7:131
5770 #, no-wrap
5771 msgid "Waiting for a signal to be caught"
5772 msgstr ""
5773
5774 #. type: Plain text
5775 #: build/C/man7/signal.7:135
5776 msgid ""
5777 "The following system calls suspend execution of the calling process or "
5778 "thread until a signal is caught (or an unhandled signal terminates the "
5779 "process):"
5780 msgstr ""
5781
5782 #. type: TP
5783 #: build/C/man7/signal.7:135
5784 #, no-wrap
5785 msgid "B<pause>(2)"
5786 msgstr ""
5787
5788 #. type: Plain text
5789 #: build/C/man7/signal.7:138
5790 msgid "Suspends execution until any signal is caught."
5791 msgstr ""
5792
5793 #. type: TP
5794 #: build/C/man7/signal.7:138
5795 #, no-wrap
5796 msgid "B<sigsuspend>(2)"
5797 msgstr ""
5798
5799 #. type: Plain text
5800 #: build/C/man7/signal.7:142
5801 msgid ""
5802 "Temporarily changes the signal mask (see below) and suspends execution until "
5803 "one of the unmasked signals is caught."
5804 msgstr ""
5805
5806 #. type: SS
5807 #: build/C/man7/signal.7:142
5808 #, no-wrap
5809 msgid "Synchronously accepting a signal"
5810 msgstr ""
5811
5812 #. type: Plain text
5813 #: build/C/man7/signal.7:149
5814 msgid ""
5815 "Rather than asynchronously catching a signal via a signal handler, it is "
5816 "possible to synchronously accept the signal, that is, to block execution "
5817 "until the signal is delivered, at which point the kernel returns information "
5818 "about the signal to the caller.  There are two general ways to do this:"
5819 msgstr ""
5820
5821 #. type: Plain text
5822 #: build/C/man7/signal.7:157
5823 msgid ""
5824 "B<sigwaitinfo>(2), B<sigtimedwait>(2), and B<sigwait>(3)  suspend execution "
5825 "until one of the signals in a specified set is delivered.  Each of these "
5826 "calls returns information about the delivered signal."
5827 msgstr ""
5828
5829 #. type: Plain text
5830 #: build/C/man7/signal.7:170
5831 msgid ""
5832 "B<signalfd>(2)  returns a file descriptor that can be used to read "
5833 "information about signals that are delivered to the caller.  Each B<read>(2)  "
5834 "from this file descriptor blocks until one of the signals in the set "
5835 "specified in the B<signalfd>(2)  call is delivered to the caller.  The "
5836 "buffer returned by B<read>(2)  contains a structure describing the signal."
5837 msgstr ""
5838
5839 #. type: SS
5840 #: build/C/man7/signal.7:170
5841 #, no-wrap
5842 msgid "Signal mask and pending signals"
5843 msgstr ""
5844
5845 #. type: Plain text
5846 #: build/C/man7/signal.7:177
5847 msgid ""
5848 "A signal may be I<blocked>, which means that it will not be delivered until "
5849 "it is later unblocked.  Between the time when it is generated and when it is "
5850 "delivered a signal is said to be I<pending>."
5851 msgstr ""
5852
5853 #. type: Plain text
5854 #: build/C/man7/signal.7:186
5855 msgid ""
5856 "Each thread in a process has an independent I<signal mask>, which indicates "
5857 "the set of signals that the thread is currently blocking.  A thread can "
5858 "manipulate its signal mask using B<pthread_sigmask>(3).  In a traditional "
5859 "single-threaded application, B<sigprocmask>(2)  can be used to manipulate "
5860 "the signal mask."
5861 msgstr ""
5862
5863 #. type: Plain text
5864 #: build/C/man7/signal.7:192 build/C/man2/sigprocmask.2:126
5865 msgid ""
5866 "A child created via B<fork>(2)  inherits a copy of its parent's signal mask; "
5867 "the signal mask is preserved across B<execve>(2)."
5868 msgstr ""
5869
5870 #. type: Plain text
5871 #: build/C/man7/signal.7:209
5872 msgid ""
5873 "A signal may be generated (and thus pending)  for a process as a whole "
5874 "(e.g., when sent using B<kill>(2))  or for a specific thread (e.g., certain "
5875 "signals, such as B<SIGSEGV> and B<SIGFPE>, generated as a consequence of "
5876 "executing a specific machine-language instruction are thread directed, as "
5877 "are signals targeted at a specific thread using B<pthread_kill>(3)).  A "
5878 "process-directed signal may be delivered to any one of the threads that does "
5879 "not currently have the signal blocked.  If more than one of the threads has "
5880 "the signal unblocked, then the kernel chooses an arbitrary thread to which "
5881 "to deliver the signal."
5882 msgstr ""
5883
5884 #. type: Plain text
5885 #: build/C/man7/signal.7:216
5886 msgid ""
5887 "A thread can obtain the set of signals that it currently has pending using "
5888 "B<sigpending>(2).  This set will consist of the union of the set of pending "
5889 "process-directed signals and the set of signals pending for the calling "
5890 "thread."
5891 msgstr ""
5892
5893 #. type: Plain text
5894 #: build/C/man7/signal.7:222 build/C/man2/sigpending.2:85
5895 msgid ""
5896 "A child created via B<fork>(2)  initially has an empty pending signal set; "
5897 "the pending signal set is preserved across an B<execve>(2)."
5898 msgstr ""
5899
5900 #. type: SS
5901 #: build/C/man7/signal.7:222
5902 #, no-wrap
5903 msgid "Standard signals"
5904 msgstr ""
5905
5906 #. type: Plain text
5907 #: build/C/man7/signal.7:234
5908 msgid ""
5909 "Linux supports the standard signals listed below.  Several signal numbers "
5910 "are architecture-dependent, as indicated in the \"Value\" column.  (Where "
5911 "three values are given, the first one is usually valid for alpha and sparc, "
5912 "the middle one for x86, arm, and most other architectures, and the last one "
5913 "for mips.  (Values for parisc are I<not> shown; see the Linux kernel source "
5914 "for signal numbering on that architecture.)  A - denotes that a signal is "
5915 "absent on the corresponding architecture.)"
5916 msgstr ""
5917
5918 #. type: Plain text
5919 #: build/C/man7/signal.7:236
5920 msgid "First the signals described in the original POSIX.1-1990 standard."
5921 msgstr ""
5922
5923 #. type: tbl table
5924 #: build/C/man7/signal.7:240 build/C/man7/signal.7:276 build/C/man7/signal.7:305
5925 #, no-wrap
5926 msgid "Signal\tValue\tAction\tComment\n"
5927 msgstr ""
5928
5929 #. type: tbl table
5930 #: build/C/man7/signal.7:241
5931 #, no-wrap
5932 msgid "SIGHUP\t\\01\tTerm\tHangup detected on controlling terminal\n"
5933 msgstr ""
5934
5935 #. type: tbl table
5936 #: build/C/man7/signal.7:242
5937 #, no-wrap
5938 msgid "\t\t\tor death of controlling process\n"
5939 msgstr ""
5940
5941 #. type: tbl table
5942 #: build/C/man7/signal.7:243
5943 #, no-wrap
5944 msgid "SIGINT\t\\02\tTerm\tInterrupt from keyboard\n"
5945 msgstr ""
5946
5947 #. type: tbl table
5948 #: build/C/man7/signal.7:244
5949 #, no-wrap
5950 msgid "SIGQUIT\t\\03\tCore\tQuit from keyboard\n"
5951 msgstr ""
5952
5953 #. type: tbl table
5954 #: build/C/man7/signal.7:245
5955 #, no-wrap
5956 msgid "SIGILL\t\\04\tCore\tIllegal Instruction\n"
5957 msgstr ""
5958
5959 #. type: tbl table
5960 #: build/C/man7/signal.7:246
5961 #, no-wrap
5962 msgid "SIGABRT\t\\06\tCore\tAbort signal from B<abort>(3)\n"
5963 msgstr ""
5964
5965 #. type: tbl table
5966 #: build/C/man7/signal.7:247
5967 #, no-wrap
5968 msgid "SIGFPE\t\\08\tCore\tFloating point exception\n"
5969 msgstr ""
5970
5971 #. type: tbl table
5972 #: build/C/man7/signal.7:248
5973 #, no-wrap
5974 msgid "SIGKILL\t\\09\tTerm\tKill signal\n"
5975 msgstr ""
5976
5977 #. type: tbl table
5978 #: build/C/man7/signal.7:249
5979 #, no-wrap
5980 msgid "SIGSEGV\t11\tCore\tInvalid memory reference\n"
5981 msgstr ""
5982
5983 #. type: tbl table
5984 #: build/C/man7/signal.7:250
5985 #, no-wrap
5986 msgid "SIGPIPE\t13\tTerm\tBroken pipe: write to pipe with no\n"
5987 msgstr ""
5988
5989 #. type: tbl table
5990 #: build/C/man7/signal.7:251
5991 #, no-wrap
5992 msgid "\t\t\treaders\n"
5993 msgstr ""
5994
5995 #. type: tbl table
5996 #: build/C/man7/signal.7:252
5997 #, no-wrap
5998 msgid "SIGALRM\t14\tTerm\tTimer signal from B<alarm>(2)\n"
5999 msgstr ""
6000
6001 #. type: tbl table
6002 #: build/C/man7/signal.7:253
6003 #, no-wrap
6004 msgid "SIGTERM\t15\tTerm\tTermination signal\n"
6005 msgstr ""
6006
6007 #. type: tbl table
6008 #: build/C/man7/signal.7:254
6009 #, no-wrap
6010 msgid "SIGUSR1\t30,10,16\tTerm\tUser-defined signal 1\n"
6011 msgstr ""
6012
6013 #. type: tbl table
6014 #: build/C/man7/signal.7:255
6015 #, no-wrap
6016 msgid "SIGUSR2\t31,12,17\tTerm\tUser-defined signal 2\n"
6017 msgstr ""
6018
6019 #. type: tbl table
6020 #: build/C/man7/signal.7:256
6021 #, no-wrap
6022 msgid "SIGCHLD\t20,17,18\tIgn\tChild stopped or terminated\n"
6023 msgstr ""
6024
6025 #. type: tbl table
6026 #: build/C/man7/signal.7:257
6027 #, no-wrap
6028 msgid "SIGCONT\t19,18,25\tCont\tContinue if stopped\n"
6029 msgstr ""
6030
6031 #. type: tbl table
6032 #: build/C/man7/signal.7:258
6033 #, no-wrap
6034 msgid "SIGSTOP\t17,19,23\tStop\tStop process\n"
6035 msgstr ""
6036
6037 #. type: tbl table
6038 #: build/C/man7/signal.7:259
6039 #, no-wrap
6040 msgid "SIGTSTP\t18,20,24\tStop\tStop typed at terminal\n"
6041 msgstr ""
6042
6043 #. type: tbl table
6044 #: build/C/man7/signal.7:260
6045 #, no-wrap
6046 msgid "SIGTTIN\t21,21,26\tStop\tTerminal input for background process\n"
6047 msgstr ""
6048
6049 #. type: tbl table
6050 #: build/C/man7/signal.7:261
6051 #, no-wrap
6052 msgid "SIGTTOU\t22,22,27\tStop\tTerminal output for background process\n"
6053 msgstr ""
6054
6055 #. type: Plain text
6056 #: build/C/man7/signal.7:269
6057 msgid "The signals B<SIGKILL> and B<SIGSTOP> cannot be caught, blocked, or ignored."
6058 msgstr ""
6059
6060 #. type: Plain text
6061 #: build/C/man7/signal.7:272
6062 msgid ""
6063 "Next the signals not in the POSIX.1-1990 standard but described in SUSv2 and "
6064 "POSIX.1-2001."
6065 msgstr ""
6066
6067 #. type: tbl table
6068 #: build/C/man7/signal.7:277
6069 #, no-wrap
6070 msgid "SIGBUS\t10,7,10\tCore\tBus error (bad memory access)\n"
6071 msgstr ""
6072
6073 #. type: tbl table
6074 #: build/C/man7/signal.7:278
6075 #, no-wrap
6076 msgid "SIGPOLL\t\tTerm\tPollable event (Sys V).\n"
6077 msgstr ""
6078
6079 #. type: tbl table
6080 #: build/C/man7/signal.7:279
6081 #, no-wrap
6082 msgid "\t\t\tSynonym for B<SIGIO>\n"
6083 msgstr ""
6084
6085 #. type: tbl table
6086 #: build/C/man7/signal.7:280
6087 #, no-wrap
6088 msgid "SIGPROF\t27,27,29\tTerm\tProfiling timer expired\n"
6089 msgstr ""
6090
6091 #. type: tbl table
6092 #: build/C/man7/signal.7:281
6093 #, no-wrap
6094 msgid "SIGSYS\t12,31,12\tCore\tBad argument to routine (SVr4)\n"
6095 msgstr ""
6096
6097 #. type: tbl table
6098 #: build/C/man7/signal.7:282
6099 #, no-wrap
6100 msgid "SIGTRAP\t5\tCore\tTrace/breakpoint trap\n"
6101 msgstr ""
6102
6103 #. type: tbl table
6104 #: build/C/man7/signal.7:283
6105 #, no-wrap
6106 msgid "SIGURG\t16,23,21\tIgn\tUrgent condition on socket (4.2BSD)\n"
6107 msgstr ""
6108
6109 #. type: tbl table
6110 #: build/C/man7/signal.7:284
6111 #, no-wrap
6112 msgid "SIGVTALRM\t26,26,28\tTerm\tVirtual alarm clock (4.2BSD)\n"
6113 msgstr ""
6114
6115 #. type: tbl table
6116 #: build/C/man7/signal.7:285
6117 #, no-wrap
6118 msgid "SIGXCPU\t24,24,30\tCore\tCPU time limit exceeded (4.2BSD)\n"
6119 msgstr ""
6120
6121 #. type: tbl table
6122 #: build/C/man7/signal.7:286
6123 #, no-wrap
6124 msgid "SIGXFSZ\t25,25,31\tCore\tFile size limit exceeded (4.2BSD)\n"
6125 msgstr ""
6126
6127 #. type: Plain text
6128 #: build/C/man7/signal.7:299
6129 msgid ""
6130 "Up to and including Linux 2.2, the default behavior for B<SIGSYS>, "
6131 "B<SIGXCPU>, B<SIGXFSZ>, and (on architectures other than SPARC and MIPS)  "
6132 "B<SIGBUS> was to terminate the process (without a core dump).  (On some "
6133 "other UNIX systems the default action for B<SIGXCPU> and B<SIGXFSZ> is to "
6134 "terminate the process without a core dump.)  Linux 2.4 conforms to the "
6135 "POSIX.1-2001 requirements for these signals, terminating the process with a "
6136 "core dump."
6137 msgstr ""
6138
6139 #. type: Plain text
6140 #: build/C/man7/signal.7:301
6141 msgid "Next various other signals."
6142 msgstr ""
6143
6144 #. type: tbl table
6145 #: build/C/man7/signal.7:306
6146 #, no-wrap
6147 msgid "SIGIOT\t6\tCore\tIOT trap. A synonym for B<SIGABRT>\n"
6148 msgstr ""
6149
6150 #. type: tbl table
6151 #: build/C/man7/signal.7:307
6152 #, no-wrap
6153 msgid "SIGEMT\t7,-,7\tTerm\n"
6154 msgstr ""
6155
6156 #. type: tbl table
6157 #: build/C/man7/signal.7:308
6158 #, no-wrap
6159 msgid "SIGSTKFLT\t-,16,-\tTerm\tStack fault on coprocessor (unused)\n"
6160 msgstr ""
6161
6162 #. type: tbl table
6163 #: build/C/man7/signal.7:309
6164 #, no-wrap
6165 msgid "SIGIO\t23,29,22\tTerm\tI/O now possible (4.2BSD)\n"
6166 msgstr ""
6167
6168 #. type: tbl table
6169 #: build/C/man7/signal.7:310
6170 #, no-wrap
6171 msgid "SIGCLD\t-,-,18\tIgn\tA synonym for B<SIGCHLD>\n"
6172 msgstr ""
6173
6174 #. type: tbl table
6175 #: build/C/man7/signal.7:311
6176 #, no-wrap
6177 msgid "SIGPWR\t29,30,19\tTerm\tPower failure (System V)\n"
6178 msgstr ""
6179
6180 #. type: tbl table
6181 #: build/C/man7/signal.7:312
6182 #, no-wrap
6183 msgid "SIGINFO\t29,-,-\t\tA synonym for B<SIGPWR>\n"
6184 msgstr ""
6185
6186 #. type: tbl table
6187 #: build/C/man7/signal.7:313
6188 #, no-wrap
6189 msgid "SIGLOST\t-,-,-\tTerm\tFile lock lost (unused)\n"
6190 msgstr ""
6191
6192 #. type: tbl table
6193 #: build/C/man7/signal.7:314
6194 #, no-wrap
6195 msgid "SIGWINCH\t28,28,20\tIgn\tWindow resize signal (4.3BSD, Sun)\n"
6196 msgstr ""
6197
6198 #. type: tbl table
6199 #: build/C/man7/signal.7:315
6200 #, no-wrap
6201 msgid "SIGUNUSED\t-,31,-\tCore\tSynonymous with B<SIGSYS>\n"
6202 msgstr ""
6203
6204 #. type: Plain text
6205 #: build/C/man7/signal.7:325
6206 msgid "(Signal 29 is B<SIGINFO> / B<SIGPWR> on an alpha but B<SIGLOST> on a sparc.)"
6207 msgstr ""
6208
6209 #. type: Plain text
6210 #: build/C/man7/signal.7:331
6211 msgid ""
6212 "B<SIGEMT> is not specified in POSIX.1-2001, but nevertheless appears on most "
6213 "other UNIX systems, where its default action is typically to terminate the "
6214 "process with a core dump."
6215 msgstr ""
6216
6217 #. type: Plain text
6218 #: build/C/man7/signal.7:335
6219 msgid ""
6220 "B<SIGPWR> (which is not specified in POSIX.1-2001) is typically ignored by "
6221 "default on those other UNIX systems where it appears."
6222 msgstr ""
6223
6224 #. type: Plain text
6225 #: build/C/man7/signal.7:339
6226 msgid ""
6227 "B<SIGIO> (which is not specified in POSIX.1-2001) is ignored by default on "
6228 "several other UNIX systems."
6229 msgstr ""
6230
6231 #.  parisc is the only exception: SIGSYS is 12, SIGUNUSED is 31
6232 #. type: Plain text
6233 #: build/C/man7/signal.7:346
6234 msgid ""
6235 "Where defined, B<SIGUNUSED> is synonymous with B<SIGSYS> on most "
6236 "architectures."
6237 msgstr ""
6238
6239 #. type: SS
6240 #: build/C/man7/signal.7:346
6241 #, no-wrap
6242 msgid "Real-time signals"
6243 msgstr ""
6244
6245 #. type: Plain text
6246 #: build/C/man7/signal.7:356
6247 msgid ""
6248 "Linux supports real-time signals as originally defined in the POSIX.1b "
6249 "real-time extensions (and now included in POSIX.1-2001).  The range of "
6250 "supported real-time signals is defined by the macros B<SIGRTMIN> and "
6251 "B<SIGRTMAX>.  POSIX.1-2001 requires that an implementation support at least "
6252 "B<_POSIX_RTSIG_MAX> (8) real-time signals."
6253 msgstr ""
6254
6255 #. type: Plain text
6256 #: build/C/man7/signal.7:378
6257 msgid ""
6258 "The Linux kernel supports a range of 32 different real-time signals, "
6259 "numbered 33 to 64.  However, the glibc POSIX threads implementation "
6260 "internally uses two (for NPTL) or three (for LinuxThreads) real-time signals "
6261 "(see B<pthreads>(7)), and adjusts the value of B<SIGRTMIN> suitably (to 34 "
6262 "or 35).  Because the range of available real-time signals varies according "
6263 "to the glibc threading implementation (and this variation can occur at run "
6264 "time according to the available kernel and glibc), and indeed the range of "
6265 "real-time signals varies across UNIX systems, programs should I<never refer "
6266 "to real-time signals using hard-coded numbers>, but instead should always "
6267 "refer to real-time signals using the notation B<SIGRTMIN>+n, and include "
6268 "suitable (run-time) checks that B<SIGRTMIN>+n does not exceed B<SIGRTMAX>."
6269 msgstr ""
6270
6271 #. type: Plain text
6272 #: build/C/man7/signal.7:382
6273 msgid ""
6274 "Unlike standard signals, real-time signals have no predefined meanings: the "
6275 "entire set of real-time signals can be used for application-defined "
6276 "purposes."
6277 msgstr ""
6278
6279 #. type: Plain text
6280 #: build/C/man7/signal.7:385
6281 msgid ""
6282 "The default action for an unhandled real-time signal is to terminate the "
6283 "receiving process."
6284 msgstr ""
6285
6286 #. type: Plain text
6287 #: build/C/man7/signal.7:387
6288 msgid "Real-time signals are distinguished by the following:"
6289 msgstr ""
6290
6291 #. type: Plain text
6292 #: build/C/man7/signal.7:391
6293 msgid ""
6294 "Multiple instances of real-time signals can be queued.  By contrast, if "
6295 "multiple instances of a standard signal are delivered while that signal is "
6296 "currently blocked, then only one instance is queued."
6297 msgstr ""
6298
6299 #. type: Plain text
6300 #: build/C/man7/signal.7:411
6301 msgid ""
6302 "If the signal is sent using B<sigqueue>(3), an accompanying value (either an "
6303 "integer or a pointer) can be sent with the signal.  If the receiving process "
6304 "establishes a handler for this signal using the B<SA_SIGINFO> flag to "
6305 "B<sigaction>(2), then it can obtain this data via the I<si_value> field of "
6306 "the I<siginfo_t> structure passed as the second argument to the handler.  "
6307 "Furthermore, the I<si_pid> and I<si_uid> fields of this structure can be "
6308 "used to obtain the PID and real user ID of the process sending the signal."
6309 msgstr ""
6310
6311 #. type: Plain text
6312 #: build/C/man7/signal.7:420
6313 msgid ""
6314 "Real-time signals are delivered in a guaranteed order.  Multiple real-time "
6315 "signals of the same type are delivered in the order they were sent.  If "
6316 "different real-time signals are sent to a process, they are delivered "
6317 "starting with the lowest-numbered signal.  (I.e., low-numbered signals have "
6318 "highest priority.)  By contrast, if multiple standard signals are pending "
6319 "for a process, the order in which they are delivered is unspecified."
6320 msgstr ""
6321
6322 #. type: Plain text
6323 #: build/C/man7/signal.7:425
6324 msgid ""
6325 "If both standard and real-time signals are pending for a process, POSIX "
6326 "leaves it unspecified which is delivered first.  Linux, like many other "
6327 "implementations, gives priority to standard signals in this case."
6328 msgstr ""
6329
6330 #. type: Plain text
6331 #: build/C/man7/signal.7:448
6332 msgid ""
6333 "According to POSIX, an implementation should permit at least "
6334 "B<_POSIX_SIGQUEUE_MAX> (32) real-time signals to be queued to a process.  "
6335 "However, Linux does things differently.  In kernels up to and including "
6336 "2.6.7, Linux imposes a system-wide limit on the number of queued real-time "
6337 "signals for all processes.  This limit can be viewed and (with privilege) "
6338 "changed via the I</proc/sys/kernel/rtsig-max> file.  A related file, "
6339 "I</proc/sys/kernel/rtsig-nr>, can be used to find out how many real-time "
6340 "signals are currently queued.  In Linux 2.6.8, these I</proc> interfaces "
6341 "were replaced by the B<RLIMIT_SIGPENDING> resource limit, which specifies a "
6342 "per-user limit for queued signals; see B<setrlimit>(2)  for further details."
6343 msgstr ""
6344
6345 #. type: SS
6346 #: build/C/man7/signal.7:448
6347 #, no-wrap
6348 msgid "Async-signal-safe functions"
6349 msgstr ""
6350
6351 #. type: Plain text
6352 #: build/C/man7/signal.7:457
6353 msgid ""
6354 "A signal handler function must be very careful, since processing elsewhere "
6355 "may be interrupted at some arbitrary point in the execution of the program.  "
6356 "POSIX has the concept of \"safe function\".  If a signal interrupts the "
6357 "execution of an unsafe function, and I<handler> calls an unsafe function, "
6358 "then the behavior of the program is undefined."
6359 msgstr ""
6360
6361 #. type: Plain text
6362 #: build/C/man7/signal.7:461
6363 msgid ""
6364 "POSIX.1-2004 (also known as POSIX.1-2001 Technical Corrigendum 2)  requires "
6365 "an implementation to guarantee that the following functions can be safely "
6366 "called inside a signal handler:"
6367 msgstr ""
6368
6369 #. type: Plain text
6370 #: build/C/man7/signal.7:582
6371 #, no-wrap
6372 msgid ""
6373 "_Exit()\n"
6374 "_exit()\n"
6375 "abort()\n"
6376 "accept()\n"
6377 "access()\n"
6378 "aio_error()\n"
6379 "aio_return()\n"
6380 "aio_suspend()\n"
6381 "alarm()\n"
6382 "bind()\n"
6383 "cfgetispeed()\n"
6384 "cfgetospeed()\n"
6385 "cfsetispeed()\n"
6386 "cfsetospeed()\n"
6387 "chdir()\n"
6388 "chmod()\n"
6389 "chown()\n"
6390 "clock_gettime()\n"
6391 "close()\n"
6392 "connect()\n"
6393 "creat()\n"
6394 "dup()\n"
6395 "dup2()\n"
6396 "execle()\n"
6397 "execve()\n"
6398 "fchmod()\n"
6399 "fchown()\n"
6400 "fcntl()\n"
6401 "fdatasync()\n"
6402 "fork()\n"
6403 "fpathconf()\n"
6404 "fstat()\n"
6405 "fsync()\n"
6406 "ftruncate()\n"
6407 "getegid()\n"
6408 "geteuid()\n"
6409 "getgid()\n"
6410 "getgroups()\n"
6411 "getpeername()\n"
6412 "getpgrp()\n"
6413 "getpid()\n"
6414 "getppid()\n"
6415 "getsockname()\n"
6416 "getsockopt()\n"
6417 "getuid()\n"
6418 "kill()\n"
6419 "link()\n"
6420 "listen()\n"
6421 "lseek()\n"
6422 "lstat()\n"
6423 "mkdir()\n"
6424 "mkfifo()\n"
6425 "open()\n"
6426 "pathconf()\n"
6427 "pause()\n"
6428 "pipe()\n"
6429 "poll()\n"
6430 "posix_trace_event()\n"
6431 "pselect()\n"
6432 "raise()\n"
6433 "read()\n"
6434 "readlink()\n"
6435 "recv()\n"
6436 "recvfrom()\n"
6437 "recvmsg()\n"
6438 "rename()\n"
6439 "rmdir()\n"
6440 "select()\n"
6441 "sem_post()\n"
6442 "send()\n"
6443 "sendmsg()\n"
6444 "sendto()\n"
6445 "setgid()\n"
6446 "setpgid()\n"
6447 "setsid()\n"
6448 "setsockopt()\n"
6449 "setuid()\n"
6450 "shutdown()\n"
6451 "sigaction()\n"
6452 "sigaddset()\n"
6453 "sigdelset()\n"
6454 "sigemptyset()\n"
6455 "sigfillset()\n"
6456 "sigismember()\n"
6457 "signal()\n"
6458 "sigpause()\n"
6459 "sigpending()\n"
6460 "sigprocmask()\n"
6461 "sigqueue()\n"
6462 "sigset()\n"
6463 "sigsuspend()\n"
6464 "sleep()\n"
6465 "sockatmark()\n"
6466 "socket()\n"
6467 "socketpair()\n"
6468 "stat()\n"
6469 "symlink()\n"
6470 "sysconf()\n"
6471 "tcdrain()\n"
6472 "tcflow()\n"
6473 "tcflush()\n"
6474 "tcgetattr()\n"
6475 "tcgetpgrp()\n"
6476 "tcsendbreak()\n"
6477 "tcsetattr()\n"
6478 "tcsetpgrp()\n"
6479 "time()\n"
6480 "timer_getoverrun()\n"
6481 "timer_gettime()\n"
6482 "timer_settime()\n"
6483 "times()\n"
6484 "umask()\n"
6485 "uname()\n"
6486 "unlink()\n"
6487 "utime()\n"
6488 "wait()\n"
6489 "waitpid()\n"
6490 "write()\n"
6491 msgstr ""
6492
6493 #. type: Plain text
6494 #: build/C/man7/signal.7:587
6495 msgid ""
6496 "POSIX.1-2008 removes fpathconf(), pathconf(), and sysconf()  from the above "
6497 "list, and adds the following functions:"
6498 msgstr ""
6499
6500 #. type: Plain text
6501 #: build/C/man7/signal.7:610
6502 #, no-wrap
6503 msgid ""
6504 "execl()\n"
6505 "execv()\n"
6506 "faccessat()\n"
6507 "fchmodat()\n"
6508 "fchownat()\n"
6509 "fexecve()\n"
6510 "fstatat()\n"
6511 "futimens()\n"
6512 "linkat()\n"
6513 "mkdirat()\n"
6514 "mkfifoat()\n"
6515 "mknod()\n"
6516 "mknodat()\n"
6517 "openat()\n"
6518 "readlinkat()\n"
6519 "renameat()\n"
6520 "symlinkat()\n"
6521 "unlinkat()\n"
6522 "utimensat()\n"
6523 "utimes()\n"
6524 msgstr ""
6525
6526 #. type: SS
6527 #: build/C/man7/signal.7:612
6528 #, no-wrap
6529 msgid "Interruption of system calls and library functions by signal handlers"
6530 msgstr ""
6531
6532 #. type: Plain text
6533 #: build/C/man7/signal.7:615
6534 msgid ""
6535 "If a signal handler is invoked while a system call or library function call "
6536 "is blocked, then either:"
6537 msgstr ""
6538
6539 #. type: Plain text
6540 #: build/C/man7/signal.7:617
6541 msgid "the call is automatically restarted after the signal handler returns; or"
6542 msgstr ""
6543
6544 #. type: Plain text
6545 #: build/C/man7/signal.7:620
6546 msgid "the call fails with the error B<EINTR>."
6547 msgstr ""
6548
6549 #. type: Plain text
6550 #: build/C/man7/signal.7:628
6551 msgid ""
6552 "Which of these two behaviors occurs depends on the interface and whether or "
6553 "not the signal handler was established using the B<SA_RESTART> flag (see "
6554 "B<sigaction>(2)).  The details vary across UNIX systems; below, the details "
6555 "for Linux."
6556 msgstr ""
6557
6558 #.  The following system calls use ERESTARTSYS,
6559 #.  so that they are restartable
6560 #. type: Plain text
6561 #: build/C/man7/signal.7:637
6562 msgid ""
6563 "If a blocked call to one of the following interfaces is interrupted by a "
6564 "signal handler, then the call will be automatically restarted after the "
6565 "signal handler returns if the B<SA_RESTART> flag was used; otherwise the "
6566 "call will fail with the error B<EINTR>:"
6567 msgstr ""
6568
6569 #.  commit 1ca39ab9d21ac93f94b9e3eb364ea9a5cf2aba06
6570 #. type: Plain text
6571 #: build/C/man7/signal.7:672
6572 msgid ""
6573 "B<read>(2), B<readv>(2), B<write>(2), B<writev>(2), and B<ioctl>(2)  calls "
6574 "on \"slow\" devices.  A \"slow\" device is one where the I/O call may block "
6575 "for an indefinite time, for example, a terminal, pipe, or socket.  (A disk "
6576 "is not a slow device according to this definition.)  A B<read>(2)  on an "
6577 "B<eventfd>(2), B<signalfd>(2), B<timerfd>(2), B<fanotify>(7), or "
6578 "B<inotify>(7)  file descriptor is also considered to be a \"slow\" "
6579 "operation.  (Before Linux 3.8, reads from an B<inotify>(7)  file descriptor "
6580 "were not restartable; when interrupted by a signal handler, B<read>(2)  "
6581 "always failed with the error B<EINTR>.)  If an I/O call on a slow device has "
6582 "already transferred some data by the time it is interrupted by a signal "
6583 "handler, then the call will return a success status (normally, the number of "
6584 "bytes transferred)."
6585 msgstr ""
6586
6587 #. type: Plain text
6588 #: build/C/man7/signal.7:676
6589 msgid "B<open>(2), if it can block (e.g., when opening a FIFO; see B<fifo>(7))."
6590 msgstr ""
6591
6592 #. type: Plain text
6593 #: build/C/man7/signal.7:683
6594 msgid "B<wait>(2), B<wait3>(2), B<wait4>(2), B<waitid>(2), and B<waitpid>(2)."
6595 msgstr ""
6596
6597 #.  If a timeout (setsockopt()) is in effect on the socket, then these
6598 #.  system calls switch to using EINTR.  Consequently, they and are not
6599 #.  automatically restarted, and they show the stop/cont behavior
6600 #.  described below.  (Verified from 2.6.26 source, and by experiment; mtk)
6601 #.  FIXME . What about sendmmsg()?
6602 #. type: Plain text
6603 #: build/C/man7/signal.7:701
6604 msgid ""
6605 "Socket interfaces: B<accept>(2), B<connect>(2), B<recv>(2), B<recvfrom>(2), "
6606 "B<recvmmsg>(2), B<recvmsg>(2), B<send>(2), B<sendto>(2), and B<sendmsg>(2), "
6607 "unless a timeout has been set on the socket (see below)."
6608 msgstr ""
6609
6610 #. type: Plain text
6611 #: build/C/man7/signal.7:707
6612 msgid "File locking interfaces: B<flock>(2)  and B<fcntl>(2)  B<F_SETLKW>."
6613 msgstr ""
6614
6615 #. type: Plain text
6616 #: build/C/man7/signal.7:714
6617 msgid ""
6618 "POSIX message queue interfaces: B<mq_receive>(3), B<mq_timedreceive>(3), "
6619 "B<mq_send>(3), and B<mq_timedsend>(3)."
6620 msgstr ""
6621
6622 #. type: Plain text
6623 #: build/C/man7/signal.7:719
6624 msgid ""
6625 "B<futex>(2)  B<FUTEX_WAIT> (since Linux 2.6.22; beforehand, always failed "
6626 "with B<EINTR>)."
6627 msgstr ""
6628
6629 #. type: Plain text
6630 #: build/C/man7/signal.7:723
6631 msgid "B<pthread_mutex_lock>(3), B<pthread_cond_wait>(3), and related APIs."
6632 msgstr ""
6633
6634 #. type: Plain text
6635 #: build/C/man7/signal.7:730
6636 msgid ""
6637 "POSIX semaphore interfaces: B<sem_wait>(3)  and B<sem_timedwait>(3)  (since "
6638 "Linux 2.6.22; beforehand, always failed with B<EINTR>)."
6639 msgstr ""
6640
6641 #.  These are the system calls that give EINTR or ERESTARTNOHAND
6642 #.  on interruption by a signal handler.
6643 #. type: Plain text
6644 #: build/C/man7/signal.7:741
6645 msgid ""
6646 "The following interfaces are never restarted after being interrupted by a "
6647 "signal handler, regardless of the use of B<SA_RESTART>; they always fail "
6648 "with the error B<EINTR> when interrupted by a signal handler:"
6649 msgstr ""
6650
6651 #. type: Plain text
6652 #: build/C/man7/signal.7:756 build/C/man7/signal.7:831
6653 msgid ""
6654 "\"Input\" socket interfaces, when a timeout (B<SO_RCVTIMEO>)  has been set "
6655 "on the socket using B<setsockopt>(2): B<accept>(2), B<recv>(2), "
6656 "B<recvfrom>(2), B<recvmmsg>(2)  (also with a non-NULL I<timeout> argument), "
6657 "and B<recvmsg>(2)."
6658 msgstr ""
6659
6660 #.  FIXME . What about sendmmsg()?
6661 #. type: Plain text
6662 #: build/C/man7/signal.7:767 build/C/man7/signal.7:842
6663 msgid ""
6664 "\"Output\" socket interfaces, when a timeout (B<SO_SNDTIMEO>)  has been set "
6665 "on the socket using B<setsockopt>(2): B<connect>(2), B<send>(2), "
6666 "B<sendto>(2), and B<sendmsg>(2)."
6667 msgstr ""
6668
6669 #. type: Plain text
6670 #: build/C/man7/signal.7:774
6671 msgid ""
6672 "Interfaces used to wait for signals: B<pause>(2), B<sigsuspend>(2), "
6673 "B<sigtimedwait>(2), and B<sigwaitinfo>(2)."
6674 msgstr ""
6675
6676 #. type: Plain text
6677 #: build/C/man7/signal.7:783
6678 msgid ""
6679 "File descriptor multiplexing interfaces: B<epoll_wait>(2), "
6680 "B<epoll_pwait>(2), B<poll>(2), B<ppoll>(2), B<select>(2), and B<pselect>(2)."
6681 msgstr ""
6682
6683 #.  On some other systems, SA_RESTART does restart these system calls
6684 #. type: Plain text
6685 #: build/C/man7/signal.7:791
6686 msgid ""
6687 "System V IPC interfaces: B<msgrcv>(2), B<msgsnd>(2), B<semop>(2), and "
6688 "B<semtimedop>(2)."
6689 msgstr ""
6690
6691 #. type: Plain text
6692 #: build/C/man7/signal.7:797
6693 msgid "Sleep interfaces: B<clock_nanosleep>(2), B<nanosleep>(2), and B<usleep>(3)."
6694 msgstr ""
6695
6696 #. type: Plain text
6697 #: build/C/man7/signal.7:799
6698 msgid "B<io_getevents>(2)."
6699 msgstr ""
6700
6701 #. type: Plain text
6702 #: build/C/man7/signal.7:805
6703 msgid ""
6704 "The B<sleep>(3)  function is also never restarted if interrupted by a "
6705 "handler, but gives a success return: the number of seconds remaining to "
6706 "sleep."
6707 msgstr ""
6708
6709 #. type: SS
6710 #: build/C/man7/signal.7:805
6711 #, no-wrap
6712 msgid "Interruption of system calls and library functions by stop signals"
6713 msgstr ""
6714
6715 #. type: Plain text
6716 #: build/C/man7/signal.7:814
6717 msgid ""
6718 "On Linux, even in the absence of signal handlers, certain blocking "
6719 "interfaces can fail with the error B<EINTR> after the process is stopped by "
6720 "one of the stop signals and then resumed via B<SIGCONT>.  This behavior is "
6721 "not sanctioned by POSIX.1, and doesn't occur on other systems."
6722 msgstr ""
6723
6724 #. type: Plain text
6725 #: build/C/man7/signal.7:816
6726 msgid "The Linux interfaces that display this behavior are:"
6727 msgstr ""
6728
6729 #. type: Plain text
6730 #: build/C/man7/signal.7:845
6731 msgid "B<epoll_wait>(2), B<epoll_pwait>(2)."
6732 msgstr ""
6733
6734 #. type: Plain text
6735 #: build/C/man7/signal.7:848
6736 msgid "B<semop>(2), B<semtimedop>(2)."
6737 msgstr ""
6738
6739 #. type: Plain text
6740 #: build/C/man7/signal.7:851
6741 msgid "B<sigtimedwait>(2), B<sigwaitinfo>(2)."
6742 msgstr ""
6743
6744 #.  commit 1ca39ab9d21ac93f94b9e3eb364ea9a5cf2aba06
6745 #. type: Plain text
6746 #: build/C/man7/signal.7:858
6747 msgid "Linux 3.7 and earlier: B<read>(2)  from an B<inotify>(7)  file descriptor."
6748 msgstr ""
6749
6750 #. type: Plain text
6751 #: build/C/man7/signal.7:864
6752 msgid ""
6753 "Linux 2.6.21 and earlier: B<futex>(2)  B<FUTEX_WAIT>, B<sem_timedwait>(3), "
6754 "B<sem_wait>(3)."
6755 msgstr ""
6756
6757 #. type: Plain text
6758 #: build/C/man7/signal.7:868
6759 msgid "Linux 2.6.8 and earlier: B<msgrcv>(2), B<msgsnd>(2)."
6760 msgstr ""
6761
6762 #. type: Plain text
6763 #: build/C/man7/signal.7:871
6764 msgid "Linux 2.4 and earlier: B<nanosleep>(2)."
6765 msgstr ""
6766
6767 #.  It must be a *very* long time since this was true:
6768 #.  .SH BUGS
6769 #.  .B SIGIO
6770 #.  and
6771 #.  .B SIGLOST
6772 #.  have the same value.
6773 #.  The latter is commented out in the kernel source, but
6774 #.  the build process of some software still thinks that
6775 #.  signal 29 is
6776 #.  .BR SIGLOST .
6777 #. type: Plain text
6778 #: build/C/man7/signal.7:884
6779 msgid "POSIX.1, except as noted."
6780 msgstr ""
6781
6782 #. type: Plain text
6783 #: build/C/man7/signal.7:919
6784 msgid ""
6785 "B<kill>(1), B<getrlimit>(2), B<kill>(2), B<killpg>(2), "
6786 "B<restart_syscall>(2), B<rt_sigqueueinfo>(2), B<setitimer>(2), "
6787 "B<setrlimit>(2), B<sgetmask>(2), B<sigaction>(2), B<sigaltstack>(2), "
6788 "B<signal>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), "
6789 "B<sigreturn>(2), B<sigsuspend>(2), B<sigwaitinfo>(2), B<abort>(3), "
6790 "B<bsd_signal>(3), B<longjmp>(3), B<raise>(3), B<pthread_sigqueue>(3), "
6791 "B<sigqueue>(3), B<sigset>(3), B<sigsetops>(3), B<sigvec>(3), B<sigwait>(3), "
6792 "B<strsignal>(3), B<sysv_signal>(3), B<core>(5), B<proc>(5), B<pthreads>(7), "
6793 "B<sigevent>(7)"
6794 msgstr ""
6795
6796 #. type: TH
6797 #: build/C/man2/signalfd.2:20
6798 #, no-wrap
6799 msgid "SIGNALFD"
6800 msgstr ""
6801
6802 #. type: Plain text
6803 #: build/C/man2/signalfd.2:23
6804 msgid "signalfd - create a file descriptor for accepting signals"
6805 msgstr ""
6806
6807 #. type: Plain text
6808 #: build/C/man2/signalfd.2:25
6809 msgid "B<#include E<lt>sys/signalfd.hE<gt>>"
6810 msgstr ""
6811
6812 #. type: Plain text
6813 #: build/C/man2/signalfd.2:27
6814 msgid "B<int signalfd(int >I<fd>B<, const sigset_t *>I<mask>B<, int >I<flags>B<);>"
6815 msgstr ""
6816
6817 #. type: Plain text
6818 #: build/C/man2/signalfd.2:38
6819 msgid ""
6820 "B<signalfd>()  creates a file descriptor that can be used to accept signals "
6821 "targeted at the caller.  This provides an alternative to the use of a signal "
6822 "handler or B<sigwaitinfo>(2), and has the advantage that the file descriptor "
6823 "may be monitored by B<select>(2), B<poll>(2), and B<epoll>(7)."
6824 msgstr ""
6825
6826 #. type: Plain text
6827 #: build/C/man2/signalfd.2:58
6828 msgid ""
6829 "The I<mask> argument specifies the set of signals that the caller wishes to "
6830 "accept via the file descriptor.  This argument is a signal set whose "
6831 "contents can be initialized using the macros described in B<sigsetops>(3).  "
6832 "Normally, the set of signals to be received via the file descriptor should "
6833 "be blocked using B<sigprocmask>(2), to prevent the signals being handled "
6834 "according to their default dispositions.  It is not possible to receive "
6835 "B<SIGKILL> or B<SIGSTOP> signals via a signalfd file descriptor; these "
6836 "signals are silently ignored if specified in I<mask>."
6837 msgstr ""
6838
6839 #. type: Plain text
6840 #: build/C/man2/signalfd.2:72
6841 msgid ""
6842 "If the I<fd> argument is -1, then the call creates a new file descriptor and "
6843 "associates the signal set specified in I<mask> with that descriptor.  If "
6844 "I<fd> is not -1, then it must specify a valid existing signalfd file "
6845 "descriptor, and I<mask> is used to replace the signal set associated with "
6846 "that descriptor."
6847 msgstr ""
6848
6849 #. type: Plain text
6850 #: build/C/man2/signalfd.2:77
6851 msgid ""
6852 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
6853 "I<flags> to change the behavior of B<signalfd>():"
6854 msgstr ""
6855
6856 #. type: TP
6857 #: build/C/man2/signalfd.2:77
6858 #, no-wrap
6859 msgid "B<SFD_NONBLOCK>"
6860 msgstr ""
6861
6862 #. type: TP
6863 #: build/C/man2/signalfd.2:85
6864 #, no-wrap
6865 msgid "B<SFD_CLOEXEC>"
6866 msgstr ""
6867
6868 #. type: Plain text
6869 #: build/C/man2/signalfd.2:102
6870 msgid ""
6871 "B<signalfd>()  returns a file descriptor that supports the following "
6872 "operations:"
6873 msgstr ""
6874
6875 #. type: Plain text
6876 #: build/C/man2/signalfd.2:121
6877 msgid ""
6878 "If one or more of the signals specified in I<mask> is pending for the "
6879 "process, then the buffer supplied to B<read>(2)  is used to return one or "
6880 "more I<signalfd_siginfo> structures (see below) that describe the signals.  "
6881 "The B<read>(2)  returns information for as many signals as are pending and "
6882 "will fit in the supplied buffer.  The buffer must be at least "
6883 "I<sizeof(struct signalfd_siginfo)> bytes.  The return value of the "
6884 "B<read>(2)  is the total number of bytes read."
6885 msgstr ""
6886
6887 #. type: Plain text
6888 #: build/C/man2/signalfd.2:129
6889 msgid ""
6890 "As a consequence of the B<read>(2), the signals are consumed, so that they "
6891 "are no longer pending for the process (i.e., will not be caught by signal "
6892 "handlers, and cannot be accepted using B<sigwaitinfo>(2))."
6893 msgstr ""
6894
6895 #. type: Plain text
6896 #: build/C/man2/signalfd.2:140
6897 msgid ""
6898 "If none of the signals in I<mask> is pending for the process, then the "
6899 "B<read>(2)  either blocks until one of the signals in I<mask> is generated "
6900 "for the process, or fails with the error B<EAGAIN> if the file descriptor "
6901 "has been made nonblocking."
6902 msgstr ""
6903
6904 #. type: Plain text
6905 #: build/C/man2/signalfd.2:153
6906 msgid ""
6907 "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the "
6908 "B<poll>(2)  B<POLLIN> flag)  if one or more of the signals in I<mask> is "
6909 "pending for the process."
6910 msgstr ""
6911
6912 #. type: Plain text
6913 #: build/C/man2/signalfd.2:160
6914 msgid ""
6915 "The signalfd file descriptor also supports the other file-descriptor "
6916 "multiplexing APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
6917 msgstr ""
6918
6919 #. type: Plain text
6920 #: build/C/man2/signalfd.2:165
6921 msgid ""
6922 "When the file descriptor is no longer required it should be closed.  When "
6923 "all file descriptors associated with the same signalfd object have been "
6924 "closed, the resources for object are freed by the kernel."
6925 msgstr ""
6926
6927 #. type: SS
6928 #: build/C/man2/signalfd.2:165
6929 #, no-wrap
6930 msgid "The signalfd_siginfo structure"
6931 msgstr ""
6932
6933 #. type: Plain text
6934 #: build/C/man2/signalfd.2:171
6935 msgid ""
6936 "The format of the I<signalfd_siginfo> structure(s) returned by B<read>(2)s "
6937 "from a signalfd file descriptor is as follows:"
6938 msgstr ""
6939
6940 #.  ssi_trapno is unused on most arches
6941 #.  FIXME Since Linux 2.6.37 there is 'uint16_t ssi_addr_lsb'
6942 #.  in the signalfd_siginfo structure. This needs to be documented.
6943 #. type: Plain text
6944 #: build/C/man2/signalfd.2:198
6945 #, no-wrap
6946 msgid ""
6947 "struct signalfd_siginfo {\n"
6948 "    uint32_t ssi_signo;   /* Signal number */\n"
6949 "    int32_t  ssi_errno;   /* Error number (unused) */\n"
6950 "    int32_t  ssi_code;    /* Signal code */\n"
6951 "    uint32_t ssi_pid;     /* PID of sender */\n"
6952 "    uint32_t ssi_uid;     /* Real UID of sender */\n"
6953 "    int32_t  ssi_fd;      /* File descriptor (SIGIO) */\n"
6954 "    uint32_t ssi_tid;     /* Kernel timer ID (POSIX timers)\n"
6955 "    uint32_t ssi_band;    /* Band event (SIGIO) */\n"
6956 "    uint32_t ssi_overrun; /* POSIX timer overrun count */\n"
6957 "    uint32_t ssi_trapno;  /* Trap number that caused signal */\n"
6958 "    int32_t  ssi_status;  /* Exit status or signal (SIGCHLD) */\n"
6959 "    int32_t  ssi_int;     /* Integer sent by sigqueue(3) */\n"
6960 "    uint64_t ssi_ptr;     /* Pointer sent by sigqueue(3) */\n"
6961 "    uint64_t ssi_utime;   /* User CPU time consumed (SIGCHLD) */\n"
6962 "    uint64_t ssi_stime;   /* System CPU time consumed (SIGCHLD) */\n"
6963 "    uint64_t ssi_addr;    /* Address that generated signal\n"
6964 "                             (for hardware-generated signals) */\n"
6965 "    uint8_t  pad[I<X>];      /* Pad size to 128 bytes (allow for\n"
6966 "                              additional fields in the future) */\n"
6967 "};\n"
6968 msgstr ""
6969
6970 #. type: Plain text
6971 #: build/C/man2/signalfd.2:221
6972 msgid ""
6973 "Each of the fields in this structure is analogous to the similarly named "
6974 "field in the I<siginfo_t> structure.  The I<siginfo_t> structure is "
6975 "described in B<sigaction>(2).  Not all fields in the returned "
6976 "I<signalfd_siginfo> structure will be valid for a specific signal; the set "
6977 "of valid fields can be determined from the value returned in the I<ssi_code> "
6978 "field.  This field is the analog of the I<siginfo_t> I<si_code> field; see "
6979 "B<sigaction>(2)  for details."
6980 msgstr ""
6981
6982 #. type: SS
6983 #: build/C/man2/signalfd.2:221 build/C/man2/timerfd_create.2:276
6984 #, no-wrap
6985 msgid "fork(2) semantics"
6986 msgstr ""
6987
6988 #. type: Plain text
6989 #: build/C/man2/signalfd.2:229
6990 msgid ""
6991 "After a B<fork>(2), the child inherits a copy of the signalfd file "
6992 "descriptor.  A B<read>(2)  from the file descriptor in the child will return "
6993 "information about signals queued to the child."
6994 msgstr ""
6995
6996 #. type: SS
6997 #: build/C/man2/signalfd.2:229 build/C/man2/timerfd_create.2:288
6998 #, no-wrap
6999 msgid "execve(2) semantics"
7000 msgstr ""
7001
7002 #. type: Plain text
7003 #: build/C/man2/signalfd.2:241
7004 msgid ""
7005 "Just like any other file descriptor, a signalfd file descriptor remains open "
7006 "across an B<execve>(2), unless it has been marked for close-on-exec (see "
7007 "B<fcntl>(2)).  Any signals that were available for reading before the "
7008 "B<execve>(2)  remain available to the newly loaded program.  (This is "
7009 "analogous to traditional signal semantics, where a blocked signal that is "
7010 "pending remains pending across an B<execve>(2).)"
7011 msgstr ""
7012
7013 #. type: SS
7014 #: build/C/man2/signalfd.2:241
7015 #, no-wrap
7016 msgid "Thread semantics"
7017 msgstr ""
7018
7019 #. type: Plain text
7020 #: build/C/man2/signalfd.2:251
7021 msgid ""
7022 "The semantics of signalfd file descriptors in a multithreaded program mirror "
7023 "the standard semantics for signals.  In other words, when a thread reads "
7024 "from a signalfd file descriptor, it will read the signals that are directed "
7025 "to the thread itself and the signals that are directed to the process (i.e., "
7026 "the entire thread group).  (A thread will not be able to read signals that "
7027 "are directed to other threads in the process.)"
7028 msgstr ""
7029
7030 #. type: Plain text
7031 #: build/C/man2/signalfd.2:265
7032 msgid ""
7033 "On success, B<signalfd>()  returns a signalfd file descriptor; this is "
7034 "either a new file descriptor (if I<fd> was -1), or I<fd> if I<fd> was a "
7035 "valid signalfd file descriptor.  On error, -1 is returned and I<errno> is "
7036 "set to indicate the error."
7037 msgstr ""
7038
7039 #. type: Plain text
7040 #: build/C/man2/signalfd.2:271
7041 msgid "The I<fd> file descriptor is not a valid file descriptor."
7042 msgstr ""
7043
7044 #.  or, the
7045 #.  .I sizemask
7046 #.  argument is not equal to
7047 #.  .IR sizeof(sigset_t) ;
7048 #. type: Plain text
7049 #: build/C/man2/signalfd.2:279
7050 msgid "I<fd> is not a valid signalfd file descriptor."
7051 msgstr ""
7052
7053 #. type: Plain text
7054 #: build/C/man2/signalfd.2:286 build/C/man2/timerfd_create.2:327
7055 msgid "I<flags> is invalid; or, in Linux 2.6.26 or earlier, I<flags> is nonzero."
7056 msgstr ""
7057
7058 #. type: Plain text
7059 #: build/C/man2/signalfd.2:289 build/C/man2/timerfd_create.2:330
7060 msgid "The per-process limit of open file descriptors has been reached."
7061 msgstr ""
7062
7063 #. type: Plain text
7064 #: build/C/man2/signalfd.2:299
7065 msgid "There was insufficient memory to create a new signalfd file descriptor."
7066 msgstr ""
7067
7068 #.  signalfd() is in glibc 2.7, but reportedly does not build
7069 #. type: Plain text
7070 #: build/C/man2/signalfd.2:307
7071 msgid ""
7072 "B<signalfd>()  is available on Linux since kernel 2.6.22.  Working support "
7073 "is provided in glibc since version 2.8.  The B<signalfd4>()  system call "
7074 "(see NOTES) is available on Linux since kernel 2.6.27."
7075 msgstr ""
7076
7077 #. type: Plain text
7078 #: build/C/man2/signalfd.2:312
7079 msgid "B<signalfd>()  and B<signalfd4>()  are Linux-specific."
7080 msgstr ""
7081
7082 #. type: Plain text
7083 #: build/C/man2/signalfd.2:326
7084 msgid ""
7085 "A process can create multiple signalfd file descriptors.  This makes it "
7086 "possible to accept different signals on different file descriptors.  (This "
7087 "may be useful if monitoring the file descriptors using B<select>(2), "
7088 "B<poll>(2), or B<epoll>(7): the arrival of different signals will make "
7089 "different descriptors ready.)  If a signal appears in the I<mask> of more "
7090 "than one of the file descriptors, then occurrences of that signal can be "
7091 "read (once) from any one of the descriptors."
7092 msgstr ""
7093
7094 #. type: Plain text
7095 #: build/C/man2/signalfd.2:336
7096 msgid ""
7097 "The underlying Linux system call requires an additional argument, I<size_t "
7098 "sizemask>, which specifies the size of the I<mask> argument.  The glibc "
7099 "B<signalfd>()  wrapper function does not include this argument, since it "
7100 "provides the required value for the underlying system call."
7101 msgstr ""
7102
7103 #. type: Plain text
7104 #: build/C/man2/signalfd.2:352
7105 msgid ""
7106 "There are two underlying Linux system calls: B<signalfd>()  and the more "
7107 "recent B<signalfd4>().  The former system call does not implement a I<flags> "
7108 "argument.  The latter system call implements the I<flags> values described "
7109 "above.  Starting with glibc 2.9, the B<signalfd>()  wrapper function will "
7110 "use B<signalfd4>()  where it is available."
7111 msgstr ""
7112
7113 #.  The fix also was put into 2.6.24.5
7114 #. type: Plain text
7115 #: build/C/man2/signalfd.2:360
7116 msgid ""
7117 "In kernels before 2.6.25, the I<ssi_ptr> and I<ssi_int> fields are not "
7118 "filled in with the data accompanying a signal sent by B<sigqueue>(3)."
7119 msgstr ""
7120
7121 #. type: Plain text
7122 #: build/C/man2/signalfd.2:370
7123 msgid ""
7124 "The program below accepts the signals B<SIGINT> and B<SIGQUIT> via a "
7125 "signalfd file descriptor.  The program terminates after accepting a "
7126 "B<SIGQUIT> signal.  The following shell session demonstrates the use of the "
7127 "program:"
7128 msgstr ""
7129
7130 #. type: Plain text
7131 #: build/C/man2/signalfd.2:381
7132 #, no-wrap
7133 msgid ""
7134 "$B< ./signalfd_demo>\n"
7135 "B<^C>                   # Control-C generates SIGINT\n"
7136 "Got SIGINT\n"
7137 "B<^C>\n"
7138 "Got SIGINT\n"
7139 "B<^\\e>                    # Control-\\e generates SIGQUIT\n"
7140 "Got SIGQUIT\n"
7141 "$\n"
7142 msgstr ""
7143
7144 #. type: Plain text
7145 #: build/C/man2/signalfd.2:391
7146 #, no-wrap
7147 msgid ""
7148 "#include E<lt>sys/signalfd.hE<gt>\n"
7149 "#include E<lt>signal.hE<gt>\n"
7150 "#include E<lt>unistd.hE<gt>\n"
7151 "#include E<lt>stdlib.hE<gt>\n"
7152 "#include E<lt>stdio.hE<gt>\n"
7153 msgstr ""
7154
7155 #. type: Plain text
7156 #: build/C/man2/signalfd.2:402
7157 #, no-wrap
7158 msgid ""
7159 "int\n"
7160 "main(int argc, char *argv[])\n"
7161 "{\n"
7162 "    sigset_t mask;\n"
7163 "    int sfd;\n"
7164 "    struct signalfd_siginfo fdsi;\n"
7165 "    ssize_t s;\n"
7166 msgstr ""
7167
7168 #. type: Plain text
7169 #: build/C/man2/signalfd.2:406
7170 #, no-wrap
7171 msgid ""
7172 "    sigemptyset(&mask);\n"
7173 "    sigaddset(&mask, SIGINT);\n"
7174 "    sigaddset(&mask, SIGQUIT);\n"
7175 msgstr ""
7176
7177 #. type: Plain text
7178 #: build/C/man2/signalfd.2:409
7179 #, no-wrap
7180 msgid ""
7181 "    /* Block signals so that they aren\\(aqt handled\n"
7182 "       according to their default dispositions */\n"
7183 msgstr ""
7184
7185 #. type: Plain text
7186 #: build/C/man2/signalfd.2:412
7187 #, no-wrap
7188 msgid ""
7189 "    if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n"
7190 "        handle_error(\"sigprocmask\");\n"
7191 msgstr ""
7192
7193 #. type: Plain text
7194 #: build/C/man2/signalfd.2:416
7195 #, no-wrap
7196 msgid ""
7197 "    sfd = signalfd(-1, &mask, 0);\n"
7198 "    if (sfd == -1)\n"
7199 "        handle_error(\"signalfd\");\n"
7200 msgstr ""
7201
7202 #. type: Plain text
7203 #: build/C/man2/signalfd.2:421
7204 #, no-wrap
7205 msgid ""
7206 "    for (;;) {\n"
7207 "        s = read(sfd, &fdsi, sizeof(struct signalfd_siginfo));\n"
7208 "        if (s != sizeof(struct signalfd_siginfo))\n"
7209 "            handle_error(\"read\");\n"
7210 msgstr ""
7211
7212 #. type: Plain text
7213 #: build/C/man2/signalfd.2:432
7214 #, no-wrap
7215 msgid ""
7216 "        if (fdsi.ssi_signo == SIGINT) {\n"
7217 "            printf(\"Got SIGINT\\en\");\n"
7218 "        } else if (fdsi.ssi_signo == SIGQUIT) {\n"
7219 "            printf(\"Got SIGQUIT\\en\");\n"
7220 "            exit(EXIT_SUCCESS);\n"
7221 "        } else {\n"
7222 "            printf(\"Read unexpected signal\\en\");\n"
7223 "        }\n"
7224 "    }\n"
7225 "}\n"
7226 msgstr ""
7227
7228 #. type: Plain text
7229 #: build/C/man2/signalfd.2:446
7230 msgid ""
7231 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<sigaction>(2), "
7232 "B<sigprocmask>(2), B<sigwaitinfo>(2), B<timerfd_create>(2), B<sigsetops>(3), "
7233 "B<sigwait>(3), B<epoll>(7), B<signal>(7)"
7234 msgstr ""
7235
7236 #. type: TH
7237 #: build/C/man3/sigpause.3:25
7238 #, no-wrap
7239 msgid "SIGPAUSE"
7240 msgstr ""
7241
7242 #. type: Plain text
7243 #: build/C/man3/sigpause.3:28
7244 msgid "sigpause - atomically release blocked signals and wait for interrupt"
7245 msgstr ""
7246
7247 #. type: Plain text
7248 #: build/C/man3/sigpause.3:33
7249 #, no-wrap
7250 msgid "B<int sigpause(int >I<sigmask>B<);  /* BSD (but see NOTES) */>\n"
7251 msgstr ""
7252
7253 #. type: Plain text
7254 #: build/C/man3/sigpause.3:35
7255 #, no-wrap
7256 msgid "B<int sigpause(int >I<sig>B<);      /* System V / UNIX 95 */>\n"
7257 msgstr ""
7258
7259 #. type: Plain text
7260 #: build/C/man3/sigpause.3:41
7261 msgid "Don't use this function.  Use B<sigsuspend>(2)  instead."
7262 msgstr ""
7263
7264 #. type: Plain text
7265 #: build/C/man3/sigpause.3:48
7266 msgid ""
7267 "The function B<sigpause>()  is designed to wait for some signal.  It changes "
7268 "the process's signal mask (set of blocked signals), and then waits for a "
7269 "signal to arrive.  Upon arrival of a signal, the original signal mask is "
7270 "restored."
7271 msgstr ""
7272
7273 #. type: Plain text
7274 #: build/C/man3/sigpause.3:56
7275 msgid ""
7276 "If B<sigpause>()  returns, it was interrupted by a signal and the return "
7277 "value is -1 with I<errno> set to B<EINTR>."
7278 msgstr ""
7279
7280 #. type: Plain text
7281 #: build/C/man3/sigpause.3:61
7282 msgid "The B<sigpause>()  function is thread-safe."
7283 msgstr ""
7284
7285 #. type: Plain text
7286 #: build/C/man3/sigpause.3:65
7287 msgid "The System V version of B<sigpause>()  is standardized in POSIX.1-2001."
7288 msgstr ""
7289
7290 #.  __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG
7291 #. type: Plain text
7292 #: build/C/man3/sigpause.3:82
7293 msgid ""
7294 "The classical BSD version of this function appeared in 4.2BSD.  It sets the "
7295 "process's signal mask to I<sigmask>.  UNIX 95 standardized the incompatible "
7296 "System V version of this function, which removes only the specified signal "
7297 "I<sig> from the process's signal mask.  The unfortunate situation with two "
7298 "incompatible functions with the same name was solved by the "
7299 "B<\\%sigsuspend>(2)  function, that takes a I<sigset_t\\ *> argument "
7300 "(instead of an I<int>)."
7301 msgstr ""
7302
7303 #. type: Plain text
7304 #: build/C/man3/sigpause.3:85
7305 msgid ""
7306 "On Linux, this routine is a system call only on the Sparc (sparc64)  "
7307 "architecture."
7308 msgstr ""
7309
7310 #.  Libc4 and libc5 know only about the BSD version.
7311 #
7312 #
7313 #.  For the BSD version, one usually uses a zero
7314 #.  .I sigmask
7315 #.  to indicate that no signals are to be blocked.
7316 #. type: Plain text
7317 #: build/C/man3/sigpause.3:111
7318 msgid ""
7319 "Glibc uses the BSD version if the B<_BSD_SOURCE> feature test macro is "
7320 "defined and none of B<_POSIX_SOURCE>, B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, "
7321 "B<_GNU_SOURCE>, or B<_SVID_SOURCE> is defined.  Otherwise, the System V "
7322 "version is used (and B<_XOPEN_SOURCE> must be defined to obtain the "
7323 "declaration).  Since glibc 2.19, only the System V version is exposed by "
7324 "I<E<lt>signal.hE<gt>>; applications that formerly used the BSD B<sigpause>()  "
7325 "should be amended to use B<sigsuspend>(2)."
7326 msgstr ""
7327
7328 #. type: Plain text
7329 #: build/C/man3/sigpause.3:119
7330 msgid ""
7331 "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<sigsuspend>(2), "
7332 "B<sigblock>(3), B<sigvec>(3), B<feature_test_macros>(7)"
7333 msgstr ""
7334
7335 #. type: TH
7336 #: build/C/man2/sigpending.2:29
7337 #, no-wrap
7338 msgid "SIGPENDING"
7339 msgstr ""
7340
7341 #. type: TH
7342 #: build/C/man2/sigpending.2:29
7343 #, no-wrap
7344 msgid "2013-12-11"
7345 msgstr ""
7346
7347 #. type: Plain text
7348 #: build/C/man2/sigpending.2:32
7349 msgid "sigpending - examine pending signals"
7350 msgstr ""
7351
7352 #. type: Plain text
7353 #: build/C/man2/sigpending.2:36
7354 msgid "B<int sigpending(sigset_t *>I<set>B<);>"
7355 msgstr ""
7356
7357 #. type: Plain text
7358 #: build/C/man2/sigpending.2:45
7359 msgid ""
7360 "B<sigpending>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
7361 "_POSIX_SOURCE"
7362 msgstr ""
7363
7364 #. type: Plain text
7365 #: build/C/man2/sigpending.2:53
7366 msgid ""
7367 "B<sigpending>()  returns the set of signals that are pending for delivery to "
7368 "the calling thread (i.e., the signals which have been raised while "
7369 "blocked).  The mask of pending signals is returned in I<set>."
7370 msgstr ""
7371
7372 #. type: Plain text
7373 #: build/C/man2/sigpending.2:59
7374 msgid ""
7375 "B<sigpending>()  returns 0 on success and -1 on error.  In the event of an "
7376 "error, I<errno> is set to indicate the cause."
7377 msgstr ""
7378
7379 #. type: Plain text
7380 #: build/C/man2/sigpending.2:64
7381 msgid ""
7382 "I<set> points to memory which is not a valid part of the process address "
7383 "space."
7384 msgstr ""
7385
7386 #. type: Plain text
7387 #: build/C/man2/sigpending.2:74
7388 msgid ""
7389 "If a signal is both blocked and has a disposition of \"ignored\", it is "
7390 "I<not> added to the mask of pending signals when generated."
7391 msgstr ""
7392
7393 #. type: Plain text
7394 #: build/C/man2/sigpending.2:79
7395 msgid ""
7396 "The set of signals that is pending for a thread is the union of the set of "
7397 "signals that is pending for that thread and the set of signals that is "
7398 "pending for the process as a whole; see B<signal>(7)."
7399 msgstr ""
7400
7401 #. type: Plain text
7402 #: build/C/man2/sigpending.2:91
7403 msgid ""
7404 "In versions of glibc up to and including 2.2.1, there is a bug in the "
7405 "wrapper function for B<sigpending>()  which means that information about "
7406 "pending real-time signals is not correctly returned."
7407 msgstr ""
7408
7409 #. type: Plain text
7410 #: build/C/man2/sigpending.2:99
7411 msgid ""
7412 "B<kill>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
7413 "B<sigsuspend>(2), B<sigsetops>(3), B<signal>(7)"
7414 msgstr ""
7415
7416 #. type: TH
7417 #: build/C/man2/sigprocmask.2:29
7418 #, no-wrap
7419 msgid "SIGPROCMASK"
7420 msgstr ""
7421
7422 #. type: TH
7423 #: build/C/man2/sigprocmask.2:29 build/C/man2/sigsuspend.2:29
7424 #, no-wrap
7425 msgid "2013-04-19"
7426 msgstr ""
7427
7428 #. type: Plain text
7429 #: build/C/man2/sigprocmask.2:32
7430 msgid "sigprocmask - examine and change blocked signals"
7431 msgstr ""
7432
7433 #. type: Plain text
7434 #: build/C/man2/sigprocmask.2:37
7435 msgid ""
7436 "B<int sigprocmask(int >I<how>B<, const sigset_t *>I<set>B<,> B<sigset_t "
7437 "*>I<oldset>B<);>"
7438 msgstr ""
7439
7440 #. type: Plain text
7441 #: build/C/man2/sigprocmask.2:46
7442 msgid ""
7443 "B<sigprocmask>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
7444 "_POSIX_SOURCE"
7445 msgstr ""
7446
7447 #. type: Plain text
7448 #: build/C/man2/sigprocmask.2:55
7449 msgid ""
7450 "B<sigprocmask>()  is used to fetch and/or change the signal mask of the "
7451 "calling thread.  The signal mask is the set of signals whose delivery is "
7452 "currently blocked for the caller (see also B<signal>(7)  for more details)."
7453 msgstr ""
7454
7455 #. type: Plain text
7456 #: build/C/man2/sigprocmask.2:59
7457 msgid "The behavior of the call is dependent on the value of I<how>, as follows."
7458 msgstr ""
7459
7460 #. type: TP
7461 #: build/C/man2/sigprocmask.2:59
7462 #, no-wrap
7463 msgid "B<SIG_BLOCK>"
7464 msgstr ""
7465
7466 #. type: Plain text
7467 #: build/C/man2/sigprocmask.2:64
7468 msgid ""
7469 "The set of blocked signals is the union of the current set and the I<set> "
7470 "argument."
7471 msgstr ""
7472
7473 #. type: TP
7474 #: build/C/man2/sigprocmask.2:64
7475 #, no-wrap
7476 msgid "B<SIG_UNBLOCK>"
7477 msgstr ""
7478
7479 #. type: Plain text
7480 #: build/C/man2/sigprocmask.2:70
7481 msgid ""
7482 "The signals in I<set> are removed from the current set of blocked signals.  "
7483 "It is permissible to attempt to unblock a signal which is not blocked."
7484 msgstr ""
7485
7486 #. type: TP
7487 #: build/C/man2/sigprocmask.2:70
7488 #, no-wrap
7489 msgid "B<SIG_SETMASK>"
7490 msgstr ""
7491
7492 #. type: Plain text
7493 #: build/C/man2/sigprocmask.2:74
7494 msgid "The set of blocked signals is set to the argument I<set>."
7495 msgstr ""
7496
7497 #. type: Plain text
7498 #: build/C/man2/sigprocmask.2:79
7499 msgid ""
7500 "If I<oldset> is non-NULL, the previous value of the signal mask is stored in "
7501 "I<oldset>."
7502 msgstr ""
7503
7504 #. type: Plain text
7505 #: build/C/man2/sigprocmask.2:88
7506 msgid ""
7507 "If I<set> is NULL, then the signal mask is unchanged (i.e., I<how> is "
7508 "ignored), but the current value of the signal mask is nevertheless returned "
7509 "in I<oldset> (if it is not NULL)."
7510 msgstr ""
7511
7512 #. type: Plain text
7513 #: build/C/man2/sigprocmask.2:93
7514 msgid ""
7515 "The use of B<sigprocmask>()  is unspecified in a multithreaded process; see "
7516 "B<pthread_sigmask>(3)."
7517 msgstr ""
7518
7519 #. type: Plain text
7520 #: build/C/man2/sigprocmask.2:99
7521 msgid ""
7522 "B<sigprocmask>()  returns 0 on success and -1 on error.  In the event of an "
7523 "error, I<errno> is set to indicate the cause."
7524 msgstr ""
7525
7526 #. type: Plain text
7527 #: build/C/man2/sigprocmask.2:107
7528 msgid ""
7529 "the I<set> or I<oldset> argument points outside the process's allocated "
7530 "address space."
7531 msgstr ""
7532
7533 #. type: Plain text
7534 #: build/C/man2/sigprocmask.2:112
7535 msgid "The value specified in I<how> was invalid."
7536 msgstr ""
7537
7538 #. type: Plain text
7539 #: build/C/man2/sigprocmask.2:118
7540 msgid ""
7541 "It is not possible to block B<SIGKILL> or B<SIGSTOP>.  Attempts to do so are "
7542 "silently ignored."
7543 msgstr ""
7544
7545 #. type: Plain text
7546 #: build/C/man2/sigprocmask.2:120
7547 msgid "Each of the threads in a process has its own signal mask."
7548 msgstr ""
7549
7550 #. type: Plain text
7551 #: build/C/man2/sigprocmask.2:140
7552 msgid ""
7553 "If B<SIGBUS>, B<SIGFPE>, B<SIGILL>, or B<SIGSEGV> are generated while they "
7554 "are blocked, the result is undefined, unless the signal was generated by "
7555 "B<kill>(2), B<sigqueue>(3), or B<raise>(3)."
7556 msgstr ""
7557
7558 #. type: Plain text
7559 #: build/C/man2/sigprocmask.2:155
7560 msgid ""
7561 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigpending>(2), "
7562 "B<sigsuspend>(2), B<pthread_sigmask>(3), B<sigqueue>(3), B<sigsetops>(3), "
7563 "B<signal>(7)"
7564 msgstr ""
7565
7566 #. type: TH
7567 #: build/C/man3/sigqueue.3:28
7568 #, no-wrap
7569 msgid "SIGQUEUE"
7570 msgstr ""
7571
7572 #. type: TH
7573 #: build/C/man3/sigqueue.3:28 build/C/man3/sigwait.3:26
7574 #, no-wrap
7575 msgid "2013-12-16"
7576 msgstr ""
7577
7578 #. type: Plain text
7579 #: build/C/man3/sigqueue.3:31
7580 msgid "sigqueue - queue a signal and data to a process"
7581 msgstr ""
7582
7583 #. type: Plain text
7584 #: build/C/man3/sigqueue.3:35
7585 msgid ""
7586 "B<int sigqueue(pid_t >I<pid>B<, int >I<sig>B<, const union sigval "
7587 ">I<value>B<);>"
7588 msgstr ""
7589
7590 #. type: Plain text
7591 #: build/C/man3/sigqueue.3:43
7592 msgid "B<sigqueue>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
7593 msgstr ""
7594
7595 #. type: Plain text
7596 #: build/C/man3/sigqueue.3:55
7597 msgid ""
7598 "B<sigqueue>()  sends the signal specified in I<sig> to the process whose PID "
7599 "is given in I<pid>.  The permissions required to send a signal are the same "
7600 "as for B<kill>(2).  As with B<kill>(2), the null signal (0) can be used to "
7601 "check if a process with a given PID exists."
7602 msgstr ""
7603
7604 #. type: Plain text
7605 #: build/C/man3/sigqueue.3:60
7606 msgid ""
7607 "The I<value> argument is used to specify an accompanying item of data "
7608 "(either an integer or a pointer value) to be sent with the signal, and has "
7609 "the following type:"
7610 msgstr ""
7611
7612 #. type: Plain text
7613 #: build/C/man3/sigqueue.3:67
7614 #, no-wrap
7615 msgid ""
7616 "union sigval {\n"
7617 "    int   sival_int;\n"
7618 "    void *sival_ptr;\n"
7619 "};\n"
7620 msgstr ""
7621
7622 #. type: Plain text
7623 #: build/C/man3/sigqueue.3:83
7624 msgid ""
7625 "If the receiving process has installed a handler for this signal using the "
7626 "B<SA_SIGINFO> flag to B<sigaction>(2), then it can obtain this data via the "
7627 "I<si_value> field of the I<siginfo_t> structure passed as the second "
7628 "argument to the handler.  Furthermore, the I<si_code> field of that "
7629 "structure will be set to B<SI_QUEUE>."
7630 msgstr ""
7631
7632 #. type: Plain text
7633 #: build/C/man3/sigqueue.3:91
7634 msgid ""
7635 "On success, B<sigqueue>()  returns 0, indicating that the signal was "
7636 "successfully queued to the receiving process.  Otherwise, -1 is returned and "
7637 "I<errno> is set to indicate the error."
7638 msgstr ""
7639
7640 #. type: Plain text
7641 #: build/C/man3/sigqueue.3:102
7642 msgid "I<sig> was invalid."
7643 msgstr ""
7644
7645 #. type: Plain text
7646 #: build/C/man3/sigqueue.3:108
7647 msgid ""
7648 "The process does not have permission to send the signal to the receiving "
7649 "process.  For the required permissions, see B<kill>(2)."
7650 msgstr ""
7651
7652 #. type: Plain text
7653 #: build/C/man3/sigqueue.3:112
7654 msgid "No process has a PID matching I<pid>."
7655 msgstr ""
7656
7657 #. type: Plain text
7658 #: build/C/man3/sigqueue.3:114
7659 msgid "This system call first appeared in Linux 2.2."
7660 msgstr ""
7661
7662 #. type: Plain text
7663 #: build/C/man3/sigqueue.3:119
7664 msgid "The B<sigqueue>()  function is thread-safe."
7665 msgstr ""
7666
7667 #. type: Plain text
7668 #: build/C/man3/sigqueue.3:129
7669 msgid ""
7670 "If this function results in the sending of a signal to the process that "
7671 "invoked it, and that signal was not blocked by the calling thread, and no "
7672 "other threads were willing to handle this signal (either by having it "
7673 "unblocked, or by waiting for it using B<sigwait>(3)), then at least some "
7674 "signal must be delivered to this thread before this function returns."
7675 msgstr ""
7676
7677 #. type: Plain text
7678 #: build/C/man3/sigqueue.3:144
7679 msgid ""
7680 "On Linux, this function is implemented using the B<rt_sigqueueinfo>(2)  "
7681 "system call.  The system call differs in its third argument, which is the "
7682 "I<siginfo_t> structure that will be supplied to the receiving process's "
7683 "signal handler or returned by the receiving process's B<sigtimedwait>(2)  "
7684 "call.  Inside the glibc B<sigqueue>()  wrapper, this argument, I<uinfo>, is "
7685 "initialized as follows:"
7686 msgstr ""
7687
7688 #. type: Plain text
7689 #: build/C/man3/sigqueue.3:152
7690 #, no-wrap
7691 msgid ""
7692 "uinfo.si_signo = sig;      /* Argument supplied to sigqueue() */\n"
7693 "uinfo.si_code = SI_QUEUE;\n"
7694 "uinfo.si_pid = getpid();   /* Process ID of sender */\n"
7695 "uinfo.si_uid = getuid();   /* Real UID of sender */\n"
7696 "uinfo.si_value = val;      /* Argument supplied to sigqueue() */\n"
7697 msgstr ""
7698
7699 #. type: Plain text
7700 #: build/C/man3/sigqueue.3:162
7701 msgid ""
7702 "B<kill>(2), B<rt_sigqueueinfo>(2), B<sigaction>(2), B<signal>(2), "
7703 "B<pthread_sigqueue>(3), B<sigwait>(3), B<signal>(7)"
7704 msgstr ""
7705
7706 #. type: TH
7707 #: build/C/man2/sigreturn.2:30
7708 #, no-wrap
7709 msgid "SIGRETURN"
7710 msgstr ""
7711
7712 #. type: Plain text
7713 #: build/C/man2/sigreturn.2:33
7714 msgid "sigreturn - return from signal handler and cleanup stack frame"
7715 msgstr ""
7716
7717 #. type: Plain text
7718 #: build/C/man2/sigreturn.2:35
7719 msgid "B<int sigreturn(...);>"
7720 msgstr ""
7721
7722 #.  See arch/x86/kernel/signal.c::__setup_frame() [in 3.17 source code]
7723 #. type: Plain text
7724 #: build/C/man2/sigreturn.2:45
7725 msgid ""
7726 "If the Linux kernel determines that an unblocked signal is pending for a "
7727 "process, then, at the next transition back to user mode in that process "
7728 "(e.g., upon return from a system call or when the process is rescheduled "
7729 "onto the CPU), it saves various pieces of process context (processor status "
7730 "word, registers, signal mask, and signal stack settings)  into the "
7731 "user-space stack."
7732 msgstr ""
7733
7734 #. type: Plain text
7735 #: build/C/man2/sigreturn.2:52
7736 msgid ""
7737 "The kernel also arranges that, during the transition back to user mode, the "
7738 "signal handler is called, and that, upon return from the handler, control "
7739 "passes to a piece of user-space code commonly called the \"signal "
7740 "trampoline\".  The signal trampoline code in turn calls B<sigreturn>()."
7741 msgstr ""
7742
7743 #. type: Plain text
7744 #: build/C/man2/sigreturn.2:65
7745 msgid ""
7746 "This B<sigreturn>()  call undoes everything that was done\\(emchanging the "
7747 "process's signal mask, switching signal stacks (see "
7748 "B<sigaltstack>(2))\\(emin order to invoke the signal handler.  It restores "
7749 "the process's signal mask, switches stacks, and restores the process's "
7750 "context (processor flags and registers, including the stack pointer and "
7751 "instruction pointer), so that the process resumes execution at the point "
7752 "where it was interrupted by the signal."
7753 msgstr ""
7754
7755 #. type: Plain text
7756 #: build/C/man2/sigreturn.2:68
7757 msgid "B<sigreturn>()  never returns."
7758 msgstr ""
7759
7760 #. type: Plain text
7761 #: build/C/man2/sigreturn.2:74
7762 msgid ""
7763 "Many UNIX-type systems have a B<sigreturn>()  system call or near "
7764 "equivalent.  However, this call is not specified in POSIX, and details of "
7765 "its behavior vary across systems."
7766 msgstr ""
7767
7768 #. type: Plain text
7769 #: build/C/man2/sigreturn.2:83
7770 msgid ""
7771 "B<sigreturn>()  exists only to allow the implementation of signal handlers.  "
7772 "It should B<never> be called directly.  Details of the arguments (if any) "
7773 "passed to B<sigreturn>()  vary depending on the architecture."
7774 msgstr ""
7775
7776 #.  See, for example, sysdeps/unix/sysv/linux/i386/sigaction.c and
7777 #.  sysdeps/unix/sysv/linux/x86_64/sigaction.c in the glibc (2.20) source.
7778 #. type: Plain text
7779 #: build/C/man2/sigreturn.2:106
7780 msgid ""
7781 "Once upon a time, UNIX systems placed the signal trampoline code onto the "
7782 "user stack.  Nowadays, pages of the user stack are protected so as to "
7783 "disallow code execution.  Thus, on contemporary Linux systems, depending on "
7784 "the architecture, the signal trampoline code lives either in the B<vdso>(7)  "
7785 "or in the C library.  In the latter case, the C library supplies the "
7786 "location of the trampoline code using the I<sa_restorer> field of the "
7787 "I<sigaction> structure that is passed to B<sigaction>(2), and sets the "
7788 "B<SA_RESTORER> flag in the I<sa_flags> field."
7789 msgstr ""
7790
7791 #. type: Plain text
7792 #: build/C/man2/sigreturn.2:115
7793 msgid ""
7794 "The saved process context information is placed in a I<ucontext_t> structure "
7795 "(see I<E<lt>sys/ucontext.hE<gt>>).  That structure is visible within the "
7796 "signal handler as the third argument of a handler established with the "
7797 "B<SA_SIGINFO> flag."
7798 msgstr ""
7799
7800 #. type: Plain text
7801 #: build/C/man2/sigreturn.2:123
7802 msgid ""
7803 "On some other UNIX systems, the operation of the signal trampoline differs a "
7804 "little.  In particular, on some systems, upon transitioning back to user "
7805 "mode, the kernel passes control to the trampoline (rather than the signal "
7806 "handler), and the trampoline code calls the signal handler (and then calls "
7807 "B<sigreturn>()  once the handler returns)."
7808 msgstr ""
7809
7810 #. type: Plain text
7811 #: build/C/man2/sigreturn.2:130
7812 msgid ""
7813 "B<kill>(2), B<restart_syscall>(2), B<sigaltstack>(2), B<signal>(2), "
7814 "B<getcontext>(3), B<signal>(7)"
7815 msgstr ""
7816
7817 #. type: TH
7818 #: build/C/man3/sigset.3:26
7819 #, no-wrap
7820 msgid "SIGSET"
7821 msgstr ""
7822
7823 #. type: Plain text
7824 #: build/C/man3/sigset.3:29
7825 msgid "sigset, sighold, sigrelse, sigignore - System V signal API"
7826 msgstr ""
7827
7828 #. type: Plain text
7829 #: build/C/man3/sigset.3:35
7830 msgid "B<sighandler_t sigset(int >I<sig>B<, sighandler_t >I<disp>B<);>"
7831 msgstr ""
7832
7833 #. type: Plain text
7834 #: build/C/man3/sigset.3:37
7835 msgid "B<int sighold(int >I<sig>B<);>"
7836 msgstr ""
7837
7838 #. type: Plain text
7839 #: build/C/man3/sigset.3:39
7840 msgid "B<int sigrelse(int >I<sig>B<);>"
7841 msgstr ""
7842
7843 #. type: Plain text
7844 #: build/C/man3/sigset.3:41
7845 msgid "B<int sigignore(int >I<sig>B<);>"
7846 msgstr ""
7847
7848 #. type: Plain text
7849 #: build/C/man3/sigset.3:52
7850 msgid "B<sigset>(), B<sighold>(), B<sigrelse>(), B<sigignore>():"
7851 msgstr ""
7852
7853 #. type: Plain text
7854 #: build/C/man3/sigset.3:56
7855 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
7856 msgstr ""
7857
7858 #. type: Plain text
7859 #: build/C/man3/sigset.3:65
7860 msgid ""
7861 "These functions are provided in glibc as a compatibility interface for "
7862 "programs that make use of the historical System V signal API.  This API is "
7863 "obsolete: new applications should use the POSIX signal API (B<sigaction>(2), "
7864 "B<sigprocmask>(2), etc.)"
7865 msgstr ""
7866
7867 #. type: Plain text
7868 #: build/C/man3/sigset.3:74
7869 msgid ""
7870 "The B<sigset>()  function modifies the disposition of the signal I<sig>.  "
7871 "The I<disp> argument can be the address of a signal handler function, or one "
7872 "of the following constants:"
7873 msgstr ""
7874
7875 #. type: TP
7876 #: build/C/man3/sigset.3:74
7877 #, no-wrap
7878 msgid "B<SIG_DFL>"
7879 msgstr ""
7880
7881 #. type: Plain text
7882 #: build/C/man3/sigset.3:79
7883 msgid "Reset the disposition of I<sig> to the default."
7884 msgstr ""
7885
7886 #. type: TP
7887 #: build/C/man3/sigset.3:79
7888 #, no-wrap
7889 msgid "B<SIG_IGN>"
7890 msgstr ""
7891
7892 #. type: Plain text
7893 #: build/C/man3/sigset.3:83
7894 msgid "Ignore I<sig>."
7895 msgstr ""
7896
7897 #. type: TP
7898 #: build/C/man3/sigset.3:83
7899 #, no-wrap
7900 msgid "B<SIG_HOLD>"
7901 msgstr ""
7902
7903 #. type: Plain text
7904 #: build/C/man3/sigset.3:90
7905 msgid ""
7906 "Add I<sig> to the process's signal mask, but leave the disposition of I<sig> "
7907 "unchanged."
7908 msgstr ""
7909
7910 #. type: Plain text
7911 #: build/C/man3/sigset.3:96
7912 msgid ""
7913 "If I<disp> specifies the address of a signal handler, then I<sig> is added "
7914 "to the process's signal mask during execution of the handler."
7915 msgstr ""
7916
7917 #. type: Plain text
7918 #: build/C/man3/sigset.3:104
7919 msgid ""
7920 "If I<disp> was specified as a value other than B<SIG_HOLD>, then I<sig> is "
7921 "removed from the process's signal mask."
7922 msgstr ""
7923
7924 #. type: Plain text
7925 #: build/C/man3/sigset.3:110 build/C/man3/sigvec.3:87
7926 msgid "The dispositions for B<SIGKILL> and B<SIGSTOP> cannot be changed."
7927 msgstr ""
7928
7929 #. type: Plain text
7930 #: build/C/man3/sigset.3:116
7931 msgid "The B<sighold>()  function adds I<sig> to the calling process's signal mask."
7932 msgstr ""
7933
7934 #. type: Plain text
7935 #: build/C/man3/sigset.3:122
7936 msgid ""
7937 "The B<sigrelse>()  function removes I<sig> from the calling process's signal "
7938 "mask."
7939 msgstr ""
7940
7941 #. type: Plain text
7942 #: build/C/man3/sigset.3:129
7943 msgid "The B<sigignore>()  function sets the disposition of I<sig> to B<SIG_IGN>."
7944 msgstr ""
7945
7946 #. type: Plain text
7947 #: build/C/man3/sigset.3:145
7948 msgid ""
7949 "On success, B<sigset>()  returns B<SIG_HOLD> if I<sig> was blocked before "
7950 "the call, or the signal's previous disposition if it was not blocked before "
7951 "the call.  On error, B<sigset>()  returns -1, with I<errno> set to indicate "
7952 "the error.  (But see BUGS below.)"
7953 msgstr ""
7954
7955 #. type: Plain text
7956 #: build/C/man3/sigset.3:154
7957 msgid ""
7958 "The B<sighold>(), B<sigrelse>(), and B<sigignore>()  functions return 0 on "
7959 "success; on error, these functions return -1 and set I<errno> to indicate "
7960 "the error."
7961 msgstr ""
7962
7963 #. type: Plain text
7964 #: build/C/man3/sigset.3:161
7965 msgid ""
7966 "For B<sigset>()  see the ERRORS under B<sigaction>(2)  and "
7967 "B<sigprocmask>(2)."
7968 msgstr ""
7969
7970 #. type: Plain text
7971 #: build/C/man3/sigset.3:168
7972 msgid "For B<sighold>()  and B<sigrelse>()  see the ERRORS under B<sigprocmask>(2)."
7973 msgstr ""
7974
7975 #. type: Plain text
7976 #: build/C/man3/sigset.3:173
7977 msgid "For B<sigignore>(), see the errors under B<sigaction>(2)."
7978 msgstr ""
7979
7980 #. type: Plain text
7981 #: build/C/man3/sigset.3:190
7982 msgid ""
7983 "SVr4, POSIX.1-2001.  These functions are obsolete: do not use them in new "
7984 "programs.  POSIX.1-2008 marks B<sighold>(), B<sigignore>(), B<sigpause>(), "
7985 "B<sigrelse>(), and B<sigset>()  as obsolete, recommending the use of "
7986 "B<sigaction>(2), B<sigprocmask>(2), B<pthread_sigmask>(3), and "
7987 "B<sigsuspend>(2)  instead."
7988 msgstr ""
7989
7990 #. type: Plain text
7991 #: build/C/man3/sigset.3:192
7992 msgid "These functions appeared in glibc version 2.1."
7993 msgstr ""
7994
7995 #. type: Plain text
7996 #: build/C/man3/sigset.3:198
7997 msgid ""
7998 "The I<sighandler_t> type is a GNU extension; it is used on this page only to "
7999 "make the B<sigset>()  prototype more easily readable."
8000 msgstr ""
8001
8002 #. type: Plain text
8003 #: build/C/man3/sigset.3:206
8004 msgid ""
8005 "The B<sigset>()  function provides reliable signal handling semantics (as "
8006 "when calling B<sigaction>(2)  with I<sa_mask> equal to 0)."
8007 msgstr ""
8008
8009 #. type: Plain text
8010 #: build/C/man3/sigset.3:224
8011 msgid ""
8012 "On System V, the B<signal>()  function provides unreliable semantics (as "
8013 "when calling B<sigaction>(2)  with I<sa_mask> equal to I<SA_RESETHAND | "
8014 "SA_NODEFER>).  On BSD, B<signal>()  provides reliable semantics.  "
8015 "POSIX.1-2001 leaves these aspects of B<signal>()  unspecified.  See "
8016 "B<signal>(2)  for further details."
8017 msgstr ""
8018
8019 #. type: Plain text
8020 #: build/C/man3/sigset.3:232 build/C/man3/sigvec.3:272
8021 msgid ""
8022 "In order to wait for a signal, BSD and System V both provided a function "
8023 "named B<sigpause>(3), but this function has a different argument on the two "
8024 "systems.  See B<sigpause>(3)  for details."
8025 msgstr ""
8026
8027 #. type: Plain text
8028 #: build/C/man3/sigset.3:241
8029 msgid ""
8030 "In versions of glibc before 2.2, B<sigset>()  did not unblock I<sig> if "
8031 "I<disp> was specified as a value other than B<SIG_HOLD>."
8032 msgstr ""
8033
8034 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1951
8035 #. type: Plain text
8036 #: build/C/man3/sigset.3:266
8037 msgid ""
8038 "In versions of glibc before 2.5, B<sigset>()  does not correctly return the "
8039 "previous disposition of the signal in two cases.  First, if I<disp> is "
8040 "specified as B<SIG_HOLD>, then a successful B<sigset>()  always returns "
8041 "B<SIG_HOLD>.  Instead, it should return the previous disposition of the "
8042 "signal (unless the signal was blocked, in which case B<SIG_HOLD> should be "
8043 "returned).  Second, if the signal is currently blocked, then the return "
8044 "value of a successful B<sigset>()  should be B<SIG_HOLD>.  Instead, the "
8045 "previous disposition of the signal is returned.  These problems have been "
8046 "fixed since glibc 2.5."
8047 msgstr ""
8048
8049 #. type: Plain text
8050 #: build/C/man3/sigset.3:276
8051 msgid ""
8052 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
8053 "B<raise>(3), B<sigpause>(3), B<sigvec>(3), B<signal>(7)"
8054 msgstr ""
8055
8056 #. type: TH
8057 #: build/C/man3/sigsetops.3:31
8058 #, no-wrap
8059 msgid "SIGSETOPS"
8060 msgstr ""
8061
8062 #. type: TH
8063 #: build/C/man3/sigsetops.3:31
8064 #, no-wrap
8065 msgid "2014-04-14"
8066 msgstr ""
8067
8068 #. type: Plain text
8069 #: build/C/man3/sigsetops.3:35
8070 msgid ""
8071 "sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - POSIX signal "
8072 "set operations"
8073 msgstr ""
8074
8075 #. type: Plain text
8076 #: build/C/man3/sigsetops.3:39
8077 msgid "B<int sigemptyset(sigset_t *>I<set>B<);>"
8078 msgstr ""
8079
8080 #. type: Plain text
8081 #: build/C/man3/sigsetops.3:41
8082 msgid "B<int sigfillset(sigset_t *>I<set>B<);>"
8083 msgstr ""
8084
8085 #. type: Plain text
8086 #: build/C/man3/sigsetops.3:43
8087 msgid "B<int sigaddset(sigset_t *>I<set>B<, int >I<signum>B<);>"
8088 msgstr ""
8089
8090 #. type: Plain text
8091 #: build/C/man3/sigsetops.3:45
8092 msgid "B<int sigdelset(sigset_t *>I<set>B<, int >I<signum>B<);>"
8093 msgstr ""
8094
8095 #. type: Plain text
8096 #: build/C/man3/sigsetops.3:47
8097 msgid "B<int sigismember(const sigset_t *>I<set>B<, int >I<signum>B<);>"
8098 msgstr ""
8099
8100 #. type: Plain text
8101 #: build/C/man3/sigsetops.3:59
8102 msgid ""
8103 "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>(), "
8104 "B<sigismember>():"
8105 msgstr ""
8106
8107 #. type: Plain text
8108 #: build/C/man3/sigsetops.3:61
8109 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
8110 msgstr ""
8111
8112 #. type: Plain text
8113 #: build/C/man3/sigsetops.3:65
8114 msgid "These functions allow the manipulation of POSIX signal sets."
8115 msgstr ""
8116
8117 #. type: Plain text
8118 #: build/C/man3/sigsetops.3:70
8119 msgid ""
8120 "B<sigemptyset>()  initializes the signal set given by I<set> to empty, with "
8121 "all signals excluded from the set."
8122 msgstr ""
8123
8124 #. type: Plain text
8125 #: build/C/man3/sigsetops.3:75
8126 msgid "B<sigfillset>()  initializes I<set> to full, including all signals."
8127 msgstr ""
8128
8129 #. type: Plain text
8130 #: build/C/man3/sigsetops.3:83
8131 msgid ""
8132 "B<sigaddset>()  and B<sigdelset>()  add and delete respectively signal "
8133 "I<signum> from I<set>."
8134 msgstr ""
8135
8136 #. type: Plain text
8137 #: build/C/man3/sigsetops.3:89
8138 msgid "B<sigismember>()  tests whether I<signum> is a member of I<set>."
8139 msgstr ""
8140
8141 #. type: Plain text
8142 #: build/C/man3/sigsetops.3:107
8143 msgid ""
8144 "Objects of type I<sigset_t> must be initialized by a call to either "
8145 "B<sigemptyset>()  or B<sigfillset>()  before being passed to the functions "
8146 "B<sigaddset>(), B<sigdelset>()  and B<sigismember>()  or the additional "
8147 "glibc functions described below (B<sigisemptyset>(), B<sigandset>(), and "
8148 "B<sigorset>()).  The results are undefined if this is not done."
8149 msgstr ""
8150
8151 #. type: Plain text
8152 #: build/C/man3/sigsetops.3:114
8153 msgid ""
8154 "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), and B<sigdelset>()  "
8155 "return 0 on success and -1 on error."
8156 msgstr ""
8157
8158 #. type: Plain text
8159 #: build/C/man3/sigsetops.3:123
8160 msgid ""
8161 "B<sigismember>()  returns 1 if I<signum> is a member of I<set>, 0 if "
8162 "I<signum> is not a member, and -1 on error."
8163 msgstr ""
8164
8165 #. type: Plain text
8166 #: build/C/man3/sigsetops.3:127
8167 msgid "On error, these functions set I<errno> to indicate the cause of the error."
8168 msgstr ""
8169
8170 #. type: Plain text
8171 #: build/C/man3/sigsetops.3:132
8172 msgid "I<sig> is not a valid signal."
8173 msgstr ""
8174
8175 #. type: Plain text
8176 #: build/C/man3/sigsetops.3:145
8177 msgid ""
8178 "The B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>(), "
8179 "B<sigismember>(), B<sigisemptyset>(), B<sigorset>(), and B<sigandset>()  "
8180 "functions are thread-safe."
8181 msgstr ""
8182
8183 #. type: SS
8184 #: build/C/man3/sigsetops.3:148
8185 #, no-wrap
8186 msgid "Glibc notes"
8187 msgstr ""
8188
8189 #. type: Plain text
8190 #: build/C/man3/sigsetops.3:154
8191 msgid ""
8192 "If the B<_GNU_SOURCE> feature test macro is defined, then "
8193 "I<E<lt>signal.hE<gt>> exposes three other functions for manipulating signal "
8194 "sets:"
8195 msgstr ""
8196
8197 #. type: Plain text
8198 #: build/C/man3/sigsetops.3:161
8199 #, no-wrap
8200 msgid ""
8201 "B<int sigisemptyset(const sigset_t *>I<set>B<);>\n"
8202 "B<int sigorset(sigset_t *>I<dest>B<, const sigset_t *>I<left>B<,>\n"
8203 "B<              const sigset_t *>I<right>B<);>\n"
8204 "B<int sigandset(sigset_t *>I<dest>B<, const sigset_t *>I<left>B<,>\n"
8205 "B<              const sigset_t *>I<right>B<);>\n"
8206 msgstr ""
8207
8208 #. type: Plain text
8209 #: build/C/man3/sigsetops.3:167
8210 msgid ""
8211 "B<sigisemptyset>()  returns 1 if I<set> contains no signals, and 0 "
8212 "otherwise."
8213 msgstr ""
8214
8215 #. type: Plain text
8216 #: build/C/man3/sigsetops.3:183
8217 msgid ""
8218 "B<sigorset>()  places the union of the sets I<left> and I<right> in "
8219 "I<dest>.  B<sigandset>()  places the intersection of the sets I<left> and "
8220 "I<right> in I<dest>.  Both functions return 0 on success, and -1 on failure."
8221 msgstr ""
8222
8223 #. type: Plain text
8224 #: build/C/man3/sigsetops.3:186
8225 msgid ""
8226 "These functions are nonstandard (a few other systems provide similar "
8227 "functions) and their use should be avoided in portable applications."
8228 msgstr ""
8229
8230 #. type: Plain text
8231 #: build/C/man3/sigsetops.3:191
8232 msgid "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2)"
8233 msgstr ""
8234
8235 #. type: TH
8236 #: build/C/man2/sigsuspend.2:29
8237 #, no-wrap
8238 msgid "SIGSUSPEND"
8239 msgstr ""
8240
8241 #. type: Plain text
8242 #: build/C/man2/sigsuspend.2:32
8243 msgid "sigsuspend - wait for a signal"
8244 msgstr ""
8245
8246 #. type: Plain text
8247 #: build/C/man2/sigsuspend.2:36
8248 msgid "B<int sigsuspend(const sigset_t *>I<mask>B<);>"
8249 msgstr ""
8250
8251 #. type: Plain text
8252 #: build/C/man2/sigsuspend.2:45
8253 msgid ""
8254 "B<sigsuspend>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
8255 "_POSIX_SOURCE"
8256 msgstr ""
8257
8258 #. type: Plain text
8259 #: build/C/man2/sigsuspend.2:53
8260 msgid ""
8261 "B<sigsuspend>()  temporarily replaces the signal mask of the calling process "
8262 "with the mask given by I<mask> and then suspends the process until delivery "
8263 "of a signal whose action is to invoke a signal handler or to terminate a "
8264 "process."
8265 msgstr ""
8266
8267 #. type: Plain text
8268 #: build/C/man2/sigsuspend.2:62
8269 msgid ""
8270 "If the signal terminates the process, then B<sigsuspend>()  does not "
8271 "return.  If the signal is caught, then B<sigsuspend>()  returns after the "
8272 "signal handler returns, and the signal mask is restored to the state before "
8273 "the call to B<sigsuspend>()."
8274 msgstr ""
8275
8276 #. type: Plain text
8277 #: build/C/man2/sigsuspend.2:70
8278 msgid ""
8279 "It is not possible to block B<SIGKILL> or B<SIGSTOP>; specifying these "
8280 "signals in I<mask>, has no effect on the process's signal mask."
8281 msgstr ""
8282
8283 #. type: Plain text
8284 #: build/C/man2/sigsuspend.2:76
8285 msgid ""
8286 "B<sigsuspend>()  always returns -1, with I<errno> set to indicate the error "
8287 "(normally, B<EINTR>)."
8288 msgstr ""
8289
8290 #. type: Plain text
8291 #: build/C/man2/sigsuspend.2:81
8292 msgid ""
8293 "I<mask> points to memory which is not a valid part of the process address "
8294 "space."
8295 msgstr ""
8296
8297 #. type: Plain text
8298 #: build/C/man2/sigsuspend.2:84
8299 msgid "The call was interrupted by a signal."
8300 msgstr ""
8301
8302 #. type: Plain text
8303 #: build/C/man2/sigsuspend.2:104
8304 msgid ""
8305 "Normally, B<sigsuspend>()  is used in conjunction with B<sigprocmask>(2)  in "
8306 "order to prevent delivery of a signal during the execution of a critical "
8307 "code section.  The caller first blocks the signals with B<sigprocmask>(2).  "
8308 "When the critical code has completed, the caller then waits for the signals "
8309 "by calling B<sigsuspend>()  with the signal mask that was returned by "
8310 "B<sigprocmask>(2)  (in the I<oldset> argument)."
8311 msgstr ""
8312
8313 #. type: Plain text
8314 #: build/C/man2/sigsuspend.2:118
8315 msgid ""
8316 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
8317 "B<sigwaitinfo>(2), B<sigsetops>(3), B<sigwait>(3), B<signal>(7)"
8318 msgstr ""
8319
8320 #. type: TH
8321 #: build/C/man3/sigvec.3:26
8322 #, no-wrap
8323 msgid "SIGVEC"
8324 msgstr ""
8325
8326 #. type: Plain text
8327 #: build/C/man3/sigvec.3:29
8328 msgid "sigvec, sigblock, sigsetmask, siggetmask, sigmask - BSD signal API"
8329 msgstr ""
8330
8331 #. type: Plain text
8332 #: build/C/man3/sigvec.3:33
8333 msgid ""
8334 "B<int sigvec(int >I<sig>B<, const struct sigvec *>I<vec>B<, struct sigvec "
8335 "*>I<ovec>B<);>"
8336 msgstr ""
8337
8338 #. type: Plain text
8339 #: build/C/man3/sigvec.3:35
8340 msgid "B<int sigmask(int >I<signum>B<);>"
8341 msgstr ""
8342
8343 #. type: Plain text
8344 #: build/C/man3/sigvec.3:37
8345 msgid "B<int sigblock(int >I<mask>B<);>"
8346 msgstr ""
8347
8348 #. type: Plain text
8349 #: build/C/man3/sigvec.3:39
8350 msgid "B<int sigsetmask(int >I<mask>B<);>"
8351 msgstr ""
8352
8353 #. type: Plain text
8354 #: build/C/man3/sigvec.3:41
8355 msgid "B<int siggetmask(void);>"
8356 msgstr ""
8357
8358 #. type: Plain text
8359 #: build/C/man3/sigvec.3:49
8360 msgid "All functions shown above: _BSD_SOURCE"
8361 msgstr ""
8362
8363 #. type: Plain text
8364 #: build/C/man3/sigvec.3:56
8365 msgid ""
8366 "These functions are provided in glibc as a compatibility interface for "
8367 "programs that make use of the historical BSD signal API.  This API is "
8368 "obsolete: new applications should use the POSIX signal API (B<sigaction>(2), "
8369 "B<sigprocmask>(2), etc.)."
8370 msgstr ""
8371
8372 #. type: Plain text
8373 #: build/C/man3/sigvec.3:81
8374 msgid ""
8375 "The B<sigvec>()  function sets and/or gets the disposition of the signal "
8376 "I<sig> (like the POSIX B<sigaction>(2)).  If I<vec> is not NULL, it points "
8377 "to a I<sigvec> structure that defines the new disposition for I<sig>.  If "
8378 "I<ovec> is not NULL, it points to a I<sigvec> structure that is used to "
8379 "return the previous disposition of I<sig>.  To obtain the current "
8380 "disposition of I<sig> without changing it, specify NULL for I<vec>, and a "
8381 "non-null pointer for I<ovec>."
8382 msgstr ""
8383
8384 #. type: Plain text
8385 #: build/C/man3/sigvec.3:91
8386 msgid "The I<sigvec> structure has the following form:"
8387 msgstr ""
8388
8389 #. type: Plain text
8390 #: build/C/man3/sigvec.3:99
8391 #, no-wrap
8392 msgid ""
8393 "struct sigvec {\n"
8394 "    void (*sv_handler)(int); /* Signal disposition */\n"
8395 "    int    sv_mask;          /* Signals to be blocked in handler */\n"
8396 "    int    sv_flags;         /* Flags */\n"
8397 "};\n"
8398 msgstr ""
8399
8400 #. type: Plain text
8401 #: build/C/man3/sigvec.3:110
8402 msgid ""
8403 "The I<sv_handler> field specifies the disposition of the signal, and is "
8404 "either: the address of a signal handler function; B<SIG_DFL>, meaning the "
8405 "default disposition applies for the signal; or B<SIG_IGN>, meaning that the "
8406 "signal is ignored."
8407 msgstr ""
8408
8409 #. type: Plain text
8410 #: build/C/man3/sigvec.3:124
8411 msgid ""
8412 "If I<sv_handler> specifies the address of a signal handler, then I<sv_mask> "
8413 "specifies a mask of signals that are to be blocked while the handler is "
8414 "executing.  In addition, the signal for which the handler is invoked is also "
8415 "blocked.  Attempts to block B<SIGKILL> or B<SIGSTOP> are silently ignored."
8416 msgstr ""
8417
8418 #. type: Plain text
8419 #: build/C/man3/sigvec.3:131
8420 msgid ""
8421 "If I<sv_handler> specifies the address of a signal handler, then the "
8422 "I<sv_flags> field specifies flags controlling what happens when the handler "
8423 "is called.  This field may contain zero or more of the following flags:"
8424 msgstr ""
8425
8426 #. type: TP
8427 #: build/C/man3/sigvec.3:131
8428 #, no-wrap
8429 msgid "B<SV_INTERRUPT>"
8430 msgstr ""
8431
8432 #. type: Plain text
8433 #: build/C/man3/sigvec.3:139
8434 msgid ""
8435 "If the signal handler interrupts a blocking system call, then upon return "
8436 "from the handler the system call will not be restarted: instead it will fail "
8437 "with the error B<EINTR>.  If this flag is not specified, then system calls "
8438 "are restarted by default."
8439 msgstr ""
8440
8441 #. type: TP
8442 #: build/C/man3/sigvec.3:139
8443 #, no-wrap
8444 msgid "B<SV_RESETHAND>"
8445 msgstr ""
8446
8447 #. type: Plain text
8448 #: build/C/man3/sigvec.3:148
8449 msgid ""
8450 "Reset the disposition of the signal to the default before calling the signal "
8451 "handler.  If this flag is not specified, then the handler remains "
8452 "established until explicitly removed by a later call to B<sigvec>()  or "
8453 "until the process performs an B<execve>(2)."
8454 msgstr ""
8455
8456 #. type: TP
8457 #: build/C/man3/sigvec.3:148
8458 #, no-wrap
8459 msgid "B<SV_ONSTACK>"
8460 msgstr ""
8461
8462 #. type: Plain text
8463 #: build/C/man3/sigvec.3:155
8464 msgid ""
8465 "Handle the signal on the alternate signal stack (historically established "
8466 "under BSD using the obsolete B<sigstack>()  function; the POSIX replacement "
8467 "is B<sigaltstack>(2))."
8468 msgstr ""
8469
8470 #. type: Plain text
8471 #: build/C/man3/sigvec.3:165
8472 msgid ""
8473 "The B<sigmask>()  macro constructs and returns a \"signal mask\" for "
8474 "I<signum>.  For example, we can initialize the I<vec.sv_mask> field given to "
8475 "B<sigvec>()  using code such as the following:"
8476 msgstr ""
8477
8478 #. type: Plain text
8479 #: build/C/man3/sigvec.3:170
8480 #, no-wrap
8481 msgid ""
8482 "    vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT);\n"
8483 "                /* Block SIGQUIT and SIGABRT during\n"
8484 "                   handler execution */\n"
8485 msgstr ""
8486
8487 #. type: Plain text
8488 #: build/C/man3/sigvec.3:185
8489 msgid ""
8490 "The B<sigblock>()  function adds the signals in I<mask> to the process's "
8491 "signal mask (like POSIX I<sigprocmask(SIG_BLOCK)>), and returns the "
8492 "process's previous signal mask.  Attempts to block B<SIGKILL> or B<SIGSTOP> "
8493 "are silently ignored."
8494 msgstr ""
8495
8496 #. type: Plain text
8497 #: build/C/man3/sigvec.3:193
8498 msgid ""
8499 "The B<sigsetmask>()  function sets the process's signal mask to the value "
8500 "given in I<mask> (like POSIX I<sigprocmask(SIG_SETMASK)>), and returns the "
8501 "process's previous signal mask."
8502 msgstr ""
8503
8504 #. type: Plain text
8505 #: build/C/man3/sigvec.3:199
8506 msgid ""
8507 "The B<siggetmask>()  function returns the process's current signal mask.  "
8508 "This call is equivalent to I<sigblock(0)>."
8509 msgstr ""
8510
8511 #. type: Plain text
8512 #: build/C/man3/sigvec.3:205
8513 msgid ""
8514 "The B<sigvec>()  function returns 0 on success; on error, it returns -1 and "
8515 "sets I<errno> to indicate the error."
8516 msgstr ""
8517
8518 #. type: Plain text
8519 #: build/C/man3/sigvec.3:211
8520 msgid ""
8521 "The B<sigblock>()  and B<sigsetmask>()  functions return the previous signal "
8522 "mask."
8523 msgstr ""
8524
8525 #. type: Plain text
8526 #: build/C/man3/sigvec.3:216
8527 msgid "The B<sigmask>()  macro returns the signal mask for I<signum>."
8528 msgstr ""
8529
8530 #. type: Plain text
8531 #: build/C/man3/sigvec.3:221
8532 msgid "See the ERRORS under B<sigaction>(2)  and B<sigprocmask>(2)."
8533 msgstr ""
8534
8535 #. type: Plain text
8536 #: build/C/man3/sigvec.3:230
8537 msgid ""
8538 "The B<sigvec>(), B<sigblock>(), B<sigsetmask>(), and B<siggetmask>()  "
8539 "functions are thread-safe."
8540 msgstr ""
8541
8542 #. type: Plain text
8543 #: build/C/man3/sigvec.3:234
8544 msgid "The B<sigmask>()  macro is thread-safe."
8545 msgstr ""
8546
8547 #. type: Plain text
8548 #: build/C/man3/sigvec.3:241
8549 msgid ""
8550 "Starting with version 2.21, the GNU C library no longer exports the "
8551 "B<sigvec>()  function as part of the ABI.  (To ensure backward "
8552 "compatibility, the glibc symbol versioning scheme continues to export the "
8553 "interface to binaries linked against older versions of the library.)"
8554 msgstr ""
8555
8556 #. type: Plain text
8557 #: build/C/man3/sigvec.3:247
8558 msgid ""
8559 "All of these functions were in 4.3BSD, except B<siggetmask>(), whose origin "
8560 "is unclear.  These functions are obsolete: do not use them in new programs."
8561 msgstr ""
8562
8563 #. type: Plain text
8564 #: build/C/man3/sigvec.3:264
8565 msgid ""
8566 "On 4.3BSD, the B<signal>()  function provided reliable semantics (as when "
8567 "calling B<sigvec>()  with I<vec.sv_mask> equal to 0).  On System V, "
8568 "B<signal>()  provides unreliable semantics.  POSIX.1-2001 leaves these "
8569 "aspects of B<signal>()  unspecified.  See B<signal>(2)  for further details."
8570 msgstr ""
8571
8572 #. type: Plain text
8573 #: build/C/man3/sigvec.3:282
8574 msgid ""
8575 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
8576 "B<raise>(3), B<sigpause>(3), B<sigset>(3), B<signal>(7)"
8577 msgstr ""
8578
8579 #. type: TH
8580 #: build/C/man3/sigwait.3:26
8581 #, no-wrap
8582 msgid "SIGWAIT"
8583 msgstr ""
8584
8585 #. type: Plain text
8586 #: build/C/man3/sigwait.3:29
8587 msgid "sigwait - wait for a signal"
8588 msgstr ""
8589
8590 #. type: Plain text
8591 #: build/C/man3/sigwait.3:34
8592 #, no-wrap
8593 msgid "B< int sigwait(const sigset_t *>I<set>B<, int *>I<sig>B<);>\n"
8594 msgstr ""
8595
8596 #. type: Plain text
8597 #: build/C/man3/sigwait.3:44
8598 msgid "B<sigwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
8599 msgstr ""
8600
8601 #. type: Plain text
8602 #: build/C/man3/sigwait.3:56
8603 msgid ""
8604 "The B<sigwait>()  function suspends execution of the calling thread until "
8605 "one of the signals specified in the signal set I<set> becomes pending.  The "
8606 "function accepts the signal (removes it from the pending list of signals), "
8607 "and returns the signal number in I<sig>."
8608 msgstr ""
8609
8610 #. type: Plain text
8611 #: build/C/man3/sigwait.3:62
8612 msgid ""
8613 "The operation of B<sigwait>()  is the same as B<sigwaitinfo>(2), except "
8614 "that:"
8615 msgstr ""
8616
8617 #. type: Plain text
8618 #: build/C/man3/sigwait.3:67
8619 msgid ""
8620 "B<sigwait>()  returns only the signal number, rather than a I<siginfo_t> "
8621 "structure describing the signal."
8622 msgstr ""
8623
8624 #. type: Plain text
8625 #: build/C/man3/sigwait.3:69
8626 msgid "The return values of the two functions are different."
8627 msgstr ""
8628
8629 #. type: Plain text
8630 #: build/C/man3/sigwait.3:74
8631 msgid ""
8632 "On success, B<sigwait>()  returns 0.  On error, it returns a positive error "
8633 "number (listed in ERRORS)."
8634 msgstr ""
8635
8636 #.  Does not occur for glibc.
8637 #. type: Plain text
8638 #: build/C/man3/sigwait.3:80
8639 msgid "I<set> contains an invalid signal number."
8640 msgstr ""
8641
8642 #. type: Plain text
8643 #: build/C/man3/sigwait.3:85
8644 msgid "The B<sigwait>()  function is thread-safe."
8645 msgstr ""
8646
8647 #. type: Plain text
8648 #: build/C/man3/sigwait.3:91
8649 msgid "B<sigwait>()  is implemented using B<sigtimedwait>(2)."
8650 msgstr ""
8651
8652 #. type: Plain text
8653 #: build/C/man3/sigwait.3:94
8654 msgid "See B<pthread_sigmask>(3)."
8655 msgstr ""
8656
8657 #. type: Plain text
8658 #: build/C/man3/sigwait.3:102
8659 msgid ""
8660 "B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigsuspend>(2), "
8661 "B<sigwaitinfo>(2), B<sigsetops>(3), B<signal>(7)"
8662 msgstr ""
8663
8664 #. type: TH
8665 #: build/C/man2/sigwaitinfo.2:25
8666 #, no-wrap
8667 msgid "SIGWAITINFO"
8668 msgstr ""
8669
8670 #. type: Plain text
8671 #: build/C/man2/sigwaitinfo.2:28
8672 msgid "sigwaitinfo, sigtimedwait - synchronously wait for queued signals"
8673 msgstr ""
8674
8675 #. type: Plain text
8676 #: build/C/man2/sigwaitinfo.2:33
8677 #, no-wrap
8678 msgid "B<int sigwaitinfo(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<);>\n"
8679 msgstr ""
8680
8681 #. type: Plain text
8682 #: build/C/man2/sigwaitinfo.2:36
8683 #, no-wrap
8684 msgid ""
8685 "B<int sigtimedwait(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<, >\n"
8686 "B<                 const struct timespec *>I<timeout>B<);>\n"
8687 msgstr ""
8688
8689 #. type: Plain text
8690 #: build/C/man2/sigwaitinfo.2:46
8691 msgid "B<sigwaitinfo>(), B<sigtimedwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8692 msgstr ""
8693
8694 #. type: Plain text
8695 #: build/C/man2/sigwaitinfo.2:56
8696 msgid ""
8697 "B<sigwaitinfo>()  suspends execution of the calling thread until one of the "
8698 "signals in I<set> is pending (If one of the signals in I<set> is already "
8699 "pending for the calling thread, B<sigwaitinfo>()  will return immediately.)"
8700 msgstr ""
8701
8702 #. type: Plain text
8703 #: build/C/man2/sigwaitinfo.2:68
8704 msgid ""
8705 "B<sigwaitinfo>()  removes the signal from the set of pending signals and "
8706 "returns the signal number as its function result.  If the I<info> argument "
8707 "is not NULL, then the buffer that it points to is used to return a structure "
8708 "of type I<siginfo_t> (see B<sigaction>(2))  containing information about the "
8709 "signal."
8710 msgstr ""
8711
8712 #. type: Plain text
8713 #: build/C/man2/sigwaitinfo.2:76
8714 msgid ""
8715 "If multiple signals in I<set> are pending for the caller, the signal that is "
8716 "retrieved by B<sigwaitinfo>()  is determined according to the usual ordering "
8717 "rules; see B<signal>(7)  for further details."
8718 msgstr ""
8719
8720 #. type: Plain text
8721 #: build/C/man2/sigwaitinfo.2:88
8722 msgid ""
8723 "B<sigtimedwait>()  operates in exactly the same way as B<sigwaitinfo>()  "
8724 "except that it has an additional argument, I<timeout>, which specifies the "
8725 "interval for which the thread is suspended waiting for a signal.  (This "
8726 "interval will be rounded up to the system clock granularity, and kernel "
8727 "scheduling delays mean that the interval may overrun by a small amount.)  "
8728 "This argument is of the following type:"
8729 msgstr ""
8730
8731 #. type: Plain text
8732 #: build/C/man2/sigwaitinfo.2:95
8733 #, no-wrap
8734 msgid ""
8735 "struct timespec {\n"
8736 "    long    tv_sec;         /* seconds */\n"
8737 "    long    tv_nsec;        /* nanoseconds */\n"
8738 "}\n"
8739 msgstr ""
8740
8741 #. type: Plain text
8742 #: build/C/man2/sigwaitinfo.2:105
8743 msgid ""
8744 "If both fields of this structure are specified as 0, a poll is performed: "
8745 "B<sigtimedwait>()  returns immediately, either with information about a "
8746 "signal that was pending for the caller, or with an error if none of the "
8747 "signals in I<set> was pending."
8748 msgstr ""
8749
8750 #. type: Plain text
8751 #: build/C/man2/sigwaitinfo.2:114
8752 msgid ""
8753 "On success, both B<sigwaitinfo>()  and B<sigtimedwait>()  return a signal "
8754 "number (i.e., a value greater than zero).  On failure both calls return -1, "
8755 "with I<errno> set to indicate the error."
8756 msgstr ""
8757
8758 #. type: Plain text
8759 #: build/C/man2/sigwaitinfo.2:123
8760 msgid ""
8761 "No signal in I<set> was became pending within the I<timeout> period "
8762 "specified to B<sigtimedwait>()."
8763 msgstr ""
8764
8765 #. type: Plain text
8766 #: build/C/man2/sigwaitinfo.2:129
8767 msgid ""
8768 "The wait was interrupted by a signal handler; see B<signal>(7).  (This "
8769 "handler was for a signal other than one of those in I<set>.)"
8770 msgstr ""
8771
8772 #. type: Plain text
8773 #: build/C/man2/sigwaitinfo.2:133
8774 msgid "I<timeout> was invalid."
8775 msgstr ""
8776
8777 #. type: Plain text
8778 #: build/C/man2/sigwaitinfo.2:153
8779 msgid ""
8780 "In normal usage, the calling program blocks the signals in I<set> via a "
8781 "prior call to B<sigprocmask>(2)  (so that the default disposition for these "
8782 "signals does not occur if they become pending between successive calls to "
8783 "B<sigwaitinfo>()  or B<sigtimedwait>())  and does not establish handlers for "
8784 "these signals.  In a multithreaded program, the signal should be blocked in "
8785 "all threads, in order to prevent the signal being treated according to its "
8786 "default disposition in a thread other than the one calling B<sigwaitinfo>()  "
8787 "or B<sigtimedwait>())."
8788 msgstr ""
8789
8790 #. type: Plain text
8791 #: build/C/man2/sigwaitinfo.2:158
8792 msgid ""
8793 "The set of signals that is pending for a given thread is the union of the "
8794 "set of signals that is pending specifically for that thread and the set of "
8795 "signals that is pending for the process as a whole (see B<signal>(7))."
8796 msgstr ""
8797
8798 #. type: Plain text
8799 #: build/C/man2/sigwaitinfo.2:164
8800 msgid "Attempts to wait for B<SIGKILL> and B<SIGSTOP> are silently ignored."
8801 msgstr ""
8802
8803 #. type: Plain text
8804 #: build/C/man2/sigwaitinfo.2:173
8805 msgid ""
8806 "If multiple threads of a process are blocked waiting for the same signal(s) "
8807 "in B<sigwaitinfo>()  or B<sigtimedwait>(), then exactly one of the threads "
8808 "will actually receive the signal if it becomes pending for the process as a "
8809 "whole; which of the threads receives the signal is indeterminate."
8810 msgstr ""
8811
8812 #. type: Plain text
8813 #: build/C/man2/sigwaitinfo.2:183
8814 msgid ""
8815 "POSIX leaves the meaning of a NULL value for the I<timeout> argument of "
8816 "B<sigtimedwait>()  unspecified, permitting the possibility that this has the "
8817 "same meaning as a call to B<sigwaitinfo>(), and indeed this is what is done "
8818 "on Linux."
8819 msgstr ""
8820
8821 #. type: Plain text
8822 #: build/C/man2/sigwaitinfo.2:188
8823 msgid ""
8824 "On Linux, B<sigwaitinfo>()  is a library function implemented on top of "
8825 "B<sigtimedwait>()."
8826 msgstr ""
8827
8828 #. type: Plain text
8829 #: build/C/man2/sigwaitinfo.2:201
8830 msgid ""
8831 "The raw B<sigtimedwait>()  system call has a fifth argument, I<size_t "
8832 "sigsetsize>, which specifies the size in bytes of the I<set> argument.  The "
8833 "glibc B<sigtimedwait>()  wrapper function specifies this argument as a fixed "
8834 "value (equal to I<sizeof(sigset_t)>)."
8835 msgstr ""
8836
8837 #. type: Plain text
8838 #: build/C/man2/sigwaitinfo.2:213
8839 msgid ""
8840 "B<kill>(2), B<sigaction>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), "
8841 "B<sigprocmask>(2), B<sigqueue>(3), B<sigsetops>(3), B<sigwait>(3), "
8842 "B<signal>(7), B<time>(7)"
8843 msgstr ""
8844
8845 #. type: TH
8846 #: build/C/man3/sysv_signal.3:25
8847 #, no-wrap
8848 msgid "SYSV_SIGNAL"
8849 msgstr ""
8850
8851 #. type: TH
8852 #: build/C/man3/sysv_signal.3:25
8853 #, no-wrap
8854 msgid "2014-01-06"
8855 msgstr ""
8856
8857 #. type: Plain text
8858 #: build/C/man3/sysv_signal.3:28
8859 msgid "sysv_signal - signal handling with System V semantics"
8860 msgstr ""
8861
8862 #. type: Plain text
8863 #: build/C/man3/sysv_signal.3:30
8864 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
8865 msgstr ""
8866
8867 #. type: Plain text
8868 #: build/C/man3/sysv_signal.3:36
8869 msgid "B<sighandler_t sysv_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
8870 msgstr ""
8871
8872 #. type: Plain text
8873 #: build/C/man3/sysv_signal.3:41
8874 msgid ""
8875 "The B<sysv_signal>()  function takes the same arguments, and performs the "
8876 "same task, as B<signal>(2)."
8877 msgstr ""
8878
8879 #. type: Plain text
8880 #: build/C/man3/sysv_signal.3:51
8881 msgid ""
8882 "However B<sysv_signal>()  provides the System V unreliable signal semantics, "
8883 "that is: a) the disposition of the signal is reset to the default when the "
8884 "handler is invoked; b) delivery of further instances of the signal is not "
8885 "blocked while the signal handler is executing; and c) if the handler "
8886 "interrupts (certain) blocking system calls, then the system call is not "
8887 "automatically restarted."
8888 msgstr ""
8889
8890 #. type: Plain text
8891 #: build/C/man3/sysv_signal.3:57
8892 msgid ""
8893 "The B<sysv_signal>()  function returns the previous value of the signal "
8894 "handler, or B<SIG_ERR> on error."
8895 msgstr ""
8896
8897 #. type: Plain text
8898 #: build/C/man3/sysv_signal.3:65
8899 msgid "The B<sysv_signal>()  function is thread-safe."
8900 msgstr ""
8901
8902 #. type: Plain text
8903 #: build/C/man3/sysv_signal.3:67
8904 msgid "This function is nonstandard."
8905 msgstr ""
8906
8907 #. type: Plain text
8908 #: build/C/man3/sysv_signal.3:73
8909 msgid "Use of B<sysv_signal>()  should be avoided; use B<sigaction>(2)  instead."
8910 msgstr ""
8911
8912 #. type: Plain text
8913 #: build/C/man3/sysv_signal.3:84
8914 msgid ""
8915 "On older Linux systems, B<sysv_signal>()  and B<signal>(2)  were "
8916 "equivalent.  But on newer systems, B<signal>(2)  provides reliable signal "
8917 "semantics; see B<signal>(2)  for details."
8918 msgstr ""
8919
8920 #. type: Plain text
8921 #: build/C/man3/sysv_signal.3:97
8922 msgid "B<sigaction>(2), B<signal>(2), B<bsd_signal>(3), B<signal>(7)"
8923 msgstr ""
8924
8925 #. type: TH
8926 #: build/C/man2/timer_create.2:33
8927 #, no-wrap
8928 msgid "TIMER_CREATE"
8929 msgstr ""
8930
8931 #. type: Plain text
8932 #: build/C/man2/timer_create.2:36
8933 msgid "timer_create - create a POSIX per-process timer"
8934 msgstr ""
8935
8936 #. type: Plain text
8937 #: build/C/man2/timer_create.2:40
8938 #, no-wrap
8939 msgid ""
8940 "B<#include E<lt>signal.hE<gt>>\n"
8941 "B<#include E<lt>time.hE<gt>>\n"
8942 msgstr ""
8943
8944 #. type: Plain text
8945 #: build/C/man2/timer_create.2:43
8946 #, no-wrap
8947 msgid ""
8948 "B<int timer_create(clockid_t >I<clockid>B<, struct sigevent *>I<sevp>B<,>\n"
8949 "B<                 timer_t *>I<timerid>B<);>\n"
8950 msgstr ""
8951
8952 #. type: Plain text
8953 #: build/C/man2/timer_create.2:46 build/C/man2/timer_delete.2:37 build/C/man2/timer_getoverrun.2:37 build/C/man2/timer_settime.2:41
8954 msgid "Link with I<-lrt>."
8955 msgstr ""
8956
8957 #. type: Plain text
8958 #: build/C/man2/timer_create.2:54
8959 msgid "B<timer_create>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8960 msgstr ""
8961
8962 #. type: Plain text
8963 #: build/C/man2/timer_create.2:62
8964 msgid ""
8965 "B<timer_create>()  creates a new per-process interval timer.  The ID of the "
8966 "new timer is returned in the buffer pointed to by I<timerid>, which must be "
8967 "a non-null pointer.  This ID is unique within the process, until the timer "
8968 "is deleted.  The new timer is initially disarmed."
8969 msgstr ""
8970
8971 #. type: Plain text
8972 #: build/C/man2/timer_create.2:67
8973 msgid ""
8974 "The I<clockid> argument specifies the clock that the new timer uses to "
8975 "measure time.  It can be specified as one of the following values:"
8976 msgstr ""
8977
8978 #. type: TP
8979 #: build/C/man2/timer_create.2:67
8980 #, no-wrap
8981 msgid "B<CLOCK_REALTIME>"
8982 msgstr ""
8983
8984 #. type: Plain text
8985 #: build/C/man2/timer_create.2:70
8986 msgid "A settable system-wide real-time clock."
8987 msgstr ""
8988
8989 #. type: TP
8990 #: build/C/man2/timer_create.2:70
8991 #, no-wrap
8992 msgid "B<CLOCK_MONOTONIC>"
8993 msgstr ""
8994
8995 #.  Note: the CLOCK_MONOTONIC_RAW clock added for clock_gettime()
8996 #.  in 2.6.28 is not supported for POSIX timers -- mtk, Feb 2009
8997 #. type: Plain text
8998 #: build/C/man2/timer_create.2:77
8999 msgid ""
9000 "A nonsettable monotonically increasing clock that measures time from some "
9001 "unspecified point in the past that does not change after system startup."
9002 msgstr ""
9003
9004 #. type: TP
9005 #: build/C/man2/timer_create.2:77
9006 #, no-wrap
9007 msgid "B<CLOCK_PROCESS_CPUTIME_ID> (since Linux 2.6.12)"
9008 msgstr ""
9009
9010 #. type: Plain text
9011 #: build/C/man2/timer_create.2:81
9012 msgid ""
9013 "A clock that measures (user and system) CPU time consumed by (all of the "
9014 "threads in) the calling process."
9015 msgstr ""
9016
9017 #. type: TP
9018 #: build/C/man2/timer_create.2:81
9019 #, no-wrap
9020 msgid "B<CLOCK_THREAD_CPUTIME_ID> (since Linux 2.6.12)"
9021 msgstr ""
9022
9023 #.  The CLOCK_MONOTONIC_RAW that was added in 2.6.28 can't be used
9024 #.  to create a timer -- mtk, Feb 2009
9025 #. type: Plain text
9026 #: build/C/man2/timer_create.2:87
9027 msgid ""
9028 "A clock that measures (user and system) CPU time consumed by the calling "
9029 "thread."
9030 msgstr ""
9031
9032 #. type: Plain text
9033 #: build/C/man2/timer_create.2:96
9034 msgid ""
9035 "As well as the above values, I<clockid> can be specified as the I<clockid> "
9036 "returned by a call to B<clock_getcpuclockid>(3)  or "
9037 "B<pthread_getcpuclockid>(3)."
9038 msgstr ""
9039
9040 #. type: Plain text
9041 #: build/C/man2/timer_create.2:105
9042 msgid ""
9043 "The I<sevp> argument points to a I<sigevent> structure that specifies how "
9044 "the caller should be notified when the timer expires.  For the definition "
9045 "and general details of this structure, see B<sigevent>(7)."
9046 msgstr ""
9047
9048 #. type: Plain text
9049 #: build/C/man2/timer_create.2:109
9050 msgid "The I<sevp.sigev_notify> field can have the following values:"
9051 msgstr ""
9052
9053 #. type: Plain text
9054 #: build/C/man2/timer_create.2:114
9055 msgid ""
9056 "Don't asynchronously notify when the timer expires.  Progress of the timer "
9057 "can be monitored using B<timer_gettime>(2)."
9058 msgstr ""
9059
9060 #. type: Plain text
9061 #: build/C/man2/timer_create.2:132
9062 msgid ""
9063 "Upon timer expiration, generate the signal I<sigev_signo> for the process.  "
9064 "See B<sigevent>(7)  for general details.  The I<si_code> field of the "
9065 "I<siginfo_t> structure will be set to B<SI_TIMER>.  At any point in time, at "
9066 "most one signal is queued to the process for a given timer; see "
9067 "B<timer_getoverrun>(2)  for more details."
9068 msgstr ""
9069
9070 #. type: Plain text
9071 #: build/C/man2/timer_create.2:140
9072 msgid ""
9073 "Upon timer expiration, invoke I<sigev_notify_function> as if it were the "
9074 "start function of a new thread.  See B<sigevent>(7)  for details."
9075 msgstr ""
9076
9077 #. type: Plain text
9078 #: build/C/man2/timer_create.2:154
9079 msgid ""
9080 "As for B<SIGEV_SIGNAL>, but the signal is targeted at the thread whose ID is "
9081 "given in I<sigev_notify_thread_id>, which must be a thread in the same "
9082 "process as the caller.  The I<sigev_notify_thread_id> field specifies a "
9083 "kernel thread ID, that is, the value returned by B<clone>(2)  or "
9084 "B<gettid>(2).  This flag is intended only for use by threading libraries."
9085 msgstr ""
9086
9087 #. type: Plain text
9088 #: build/C/man2/timer_create.2:169
9089 msgid ""
9090 "Specifying I<sevp> as NULL is equivalent to specifying a pointer to a "
9091 "I<sigevent> structure in which I<sigev_notify> is B<SIGEV_SIGNAL>, "
9092 "I<sigev_signo> is B<SIGALRM>, and I<sigev_value.sival_int> is the timer ID."
9093 msgstr ""
9094
9095 #. type: Plain text
9096 #: build/C/man2/timer_create.2:177
9097 msgid ""
9098 "On success, B<timer_create>()  returns 0, and the ID of the new timer is "
9099 "placed in I<*timerid>.  On failure, -1 is returned, and I<errno> is set to "
9100 "indicate the error."
9101 msgstr ""
9102
9103 #. type: Plain text
9104 #: build/C/man2/timer_create.2:181
9105 msgid "Temporary error during kernel allocation of timer structures."
9106 msgstr ""
9107
9108 #. type: Plain text
9109 #: build/C/man2/timer_create.2:189
9110 msgid ""
9111 "Clock ID, I<sigev_notify>, I<sigev_signo>, or I<sigev_notify_thread_id> is "
9112 "invalid."
9113 msgstr ""
9114
9115 #.  glibc layer: malloc()
9116 #. type: Plain text
9117 #: build/C/man2/timer_create.2:193
9118 msgid "Could not allocate memory."
9119 msgstr ""
9120
9121 #. type: Plain text
9122 #: build/C/man2/timer_create.2:195 build/C/man2/timer_delete.2:67 build/C/man2/timer_getoverrun.2:97
9123 msgid "This system call is available since Linux 2.6."
9124 msgstr ""
9125
9126 #. type: Plain text
9127 #: build/C/man2/timer_create.2:200
9128 msgid "A program may create multiple interval timers using B<timer_create>()."
9129 msgstr ""
9130
9131 #. type: Plain text
9132 #: build/C/man2/timer_create.2:205
9133 msgid ""
9134 "Timers are not inherited by the child of a B<fork>(2), and are disarmed and "
9135 "deleted during an B<execve>(2)."
9136 msgstr ""
9137
9138 #. type: Plain text
9139 #: build/C/man2/timer_create.2:213
9140 msgid ""
9141 "The kernel preallocates a \"queued real-time signal\" for each timer created "
9142 "using B<timer_create>().  Consequently, the number of timers is limited by "
9143 "the B<RLIMIT_SIGPENDING> resource limit (see B<setrlimit>(2))."
9144 msgstr ""
9145
9146 #. type: Plain text
9147 #: build/C/man2/timer_create.2:218
9148 msgid ""
9149 "The timers created by B<timer_create>()  are commonly known as \"POSIX "
9150 "(interval) timers\".  The POSIX timers API consists of the following "
9151 "interfaces:"
9152 msgstr ""
9153
9154 #. type: Plain text
9155 #: build/C/man2/timer_create.2:221
9156 msgid "B<timer_create>(): Create a timer."
9157 msgstr ""
9158
9159 #. type: Plain text
9160 #: build/C/man2/timer_create.2:224
9161 msgid "B<timer_settime>(2): Arm (start) or disarm (stop) a timer."
9162 msgstr ""
9163
9164 #. type: Plain text
9165 #: build/C/man2/timer_create.2:228
9166 msgid ""
9167 "B<timer_gettime>(2): Fetch the time remaining until the next expiration of a "
9168 "timer, along with the interval setting of the timer."
9169 msgstr ""
9170
9171 #. type: Plain text
9172 #: build/C/man2/timer_create.2:231
9173 msgid ""
9174 "B<timer_getoverrun>(2): Return the overrun count for the last timer "
9175 "expiration."
9176 msgstr ""
9177
9178 #. type: Plain text
9179 #: build/C/man2/timer_create.2:234
9180 msgid "B<timer_delete>(2): Disarm and delete a timer."
9181 msgstr ""
9182
9183 #. type: Plain text
9184 #: build/C/man2/timer_create.2:243
9185 msgid ""
9186 "Since Linux 3.10, the I</proc/[pid]/timers> file can be used to list the "
9187 "POSIX timers for the process with PID I<pid>.  See B<proc>(5)  for further "
9188 "information."
9189 msgstr ""
9190
9191 #. type: Plain text
9192 #: build/C/man2/timer_create.2:246
9193 msgid ""
9194 "Part of the implementation of the POSIX timers API is provided by glibc.  In "
9195 "particular:"
9196 msgstr ""
9197
9198 #. type: Plain text
9199 #: build/C/man2/timer_create.2:250
9200 msgid ""
9201 "The functionality for B<SIGEV_THREAD> is implemented within glibc, rather "
9202 "than the kernel."
9203 msgstr ""
9204
9205 #.  See the glibc source file kernel-posix-timers.h for the structure
9206 #.  that glibc uses to map user-space timer IDs to kernel timer IDs
9207 #.  The kernel-level timer ID is exposed via siginfo.si_tid.
9208 #. type: Plain text
9209 #: build/C/man2/timer_create.2:256
9210 msgid ""
9211 "The timer IDs presented at user level are maintained by glibc, which maps "
9212 "these IDs to the timer IDs employed by the kernel."
9213 msgstr ""
9214
9215 #. type: Plain text
9216 #: build/C/man2/timer_create.2:264
9217 msgid ""
9218 "The POSIX timers system calls first appeared in Linux 2.6.  Prior to this, "
9219 "glibc provided an incomplete user-space implementation (B<CLOCK_REALTIME> "
9220 "timers only) using POSIX threads, and current glibc falls back to this "
9221 "implementation on systems running pre-2.6 Linux kernels."
9222 msgstr ""
9223
9224 #. type: Plain text
9225 #: build/C/man2/timer_create.2:276
9226 msgid ""
9227 "The program below takes two arguments: a sleep period in seconds, and a "
9228 "timer frequency in nanoseconds.  The program establishes a handler for the "
9229 "signal it uses for the timer, blocks that signal, creates and arms a timer "
9230 "that expires with the given frequency, sleeps for the specified number of "
9231 "seconds, and then unblocks the timer signal.  Assuming that the timer "
9232 "expired at least once while the program slept, the signal handler will be "
9233 "invoked, and the handler displays some information about the timer "
9234 "notification.  The program terminates after one invocation of the signal "
9235 "handler."
9236 msgstr ""
9237
9238 #. type: Plain text
9239 #: build/C/man2/timer_create.2:281
9240 msgid ""
9241 "In the following example run, the program sleeps for 1 second, after "
9242 "creating a timer that has a frequency of 100 nanoseconds.  By the time the "
9243 "signal is unblocked and delivered, there have been around ten million "
9244 "overruns."
9245 msgstr ""
9246
9247 #. type: Plain text
9248 #: build/C/man2/timer_create.2:293
9249 #, no-wrap
9250 msgid ""
9251 "$ B<./a.out 1 100>\n"
9252 "Establishing handler for signal 34\n"
9253 "Blocking signal 34\n"
9254 "timer ID is 0x804c008\n"
9255 "Sleeping for 1 seconds\n"
9256 "Unblocking signal 34\n"
9257 "Caught signal 34\n"
9258 "    sival_ptr = 0xbfb174f4;     *sival_ptr = 0x804c008\n"
9259 "    overrun count = 10004886\n"
9260 msgstr ""
9261
9262 #. type: Plain text
9263 #: build/C/man2/timer_create.2:303
9264 #, no-wrap
9265 msgid ""
9266 "#include E<lt>stdlib.hE<gt>\n"
9267 "#include E<lt>unistd.hE<gt>\n"
9268 "#include E<lt>stdio.hE<gt>\n"
9269 "#include E<lt>signal.hE<gt>\n"
9270 "#include E<lt>time.hE<gt>\n"
9271 msgstr ""
9272
9273 #. type: Plain text
9274 #: build/C/man2/timer_create.2:306
9275 #, no-wrap
9276 msgid ""
9277 "#define CLOCKID CLOCK_REALTIME\n"
9278 "#define SIG SIGRTMIN\n"
9279 msgstr ""
9280
9281 #. type: Plain text
9282 #: build/C/man2/timer_create.2:309
9283 #, no-wrap
9284 msgid ""
9285 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
9286 "                        } while (0)\n"
9287 msgstr ""
9288
9289 #. type: Plain text
9290 #: build/C/man2/timer_create.2:315
9291 #, no-wrap
9292 msgid ""
9293 "static void\n"
9294 "print_siginfo(siginfo_t *si)\n"
9295 "{\n"
9296 "    timer_t *tidp;\n"
9297 "    int or;\n"
9298 msgstr ""
9299
9300 #. type: Plain text
9301 #: build/C/man2/timer_create.2:317
9302 #, no-wrap
9303 msgid "    tidp = si-E<gt>si_value.sival_ptr;\n"
9304 msgstr ""
9305
9306 #. type: Plain text
9307 #: build/C/man2/timer_create.2:320
9308 #, no-wrap
9309 msgid ""
9310 "    printf(\"    sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n"
9311 "    printf(\"    *sival_ptr = 0x%lx\\en\", (long) *tidp);\n"
9312 msgstr ""
9313
9314 #. type: Plain text
9315 #: build/C/man2/timer_create.2:327
9316 #, no-wrap
9317 msgid ""
9318 "    or = timer_getoverrun(*tidp);\n"
9319 "    if (or == -1)\n"
9320 "        errExit(\"timer_getoverrun\");\n"
9321 "    else\n"
9322 "        printf(\"    overrun count = %d\\en\", or);\n"
9323 "}\n"
9324 msgstr ""
9325
9326 #. type: Plain text
9327 #: build/C/man2/timer_create.2:334
9328 #, no-wrap
9329 msgid ""
9330 "static void\n"
9331 "handler(int sig, siginfo_t *si, void *uc)\n"
9332 "{\n"
9333 "    /* Note: calling printf() from a signal handler is not\n"
9334 "       strictly correct, since printf() is not async-signal-safe;\n"
9335 "       see signal(7) */\n"
9336 msgstr ""
9337
9338 #. type: Plain text
9339 #: build/C/man2/timer_create.2:339
9340 #, no-wrap
9341 msgid ""
9342 "    printf(\"Caught signal %d\\en\", sig);\n"
9343 "    print_siginfo(si);\n"
9344 "    signal(sig, SIG_IGN);\n"
9345 "}\n"
9346 msgstr ""
9347
9348 #. type: Plain text
9349 #: build/C/man2/timer_create.2:349
9350 #, no-wrap
9351 msgid ""
9352 "int\n"
9353 "main(int argc, char *argv[])\n"
9354 "{\n"
9355 "    timer_t timerid;\n"
9356 "    struct sigevent sev;\n"
9357 "    struct itimerspec its;\n"
9358 "    long long freq_nanosecs;\n"
9359 "    sigset_t mask;\n"
9360 "    struct sigaction sa;\n"
9361 msgstr ""
9362
9363 #. type: Plain text
9364 #: build/C/man2/timer_create.2:355
9365 #, no-wrap
9366 msgid ""
9367 "    if (argc != 3) {\n"
9368 "        fprintf(stderr, \"Usage: %s E<lt>sleep-secsE<gt> "
9369 "E<lt>freq-nanosecsE<gt>\\en\",\n"
9370 "                argv[0]);\n"
9371 "        exit(EXIT_FAILURE);\n"
9372 "    }\n"
9373 msgstr ""
9374
9375 #. type: Plain text
9376 #: build/C/man2/timer_create.2:357
9377 #, no-wrap
9378 msgid "    /* Establish handler for timer signal */\n"
9379 msgstr ""
9380
9381 #. type: Plain text
9382 #: build/C/man2/timer_create.2:364
9383 #, no-wrap
9384 msgid ""
9385 "    printf(\"Establishing handler for signal %d\\en\", SIG);\n"
9386 "    sa.sa_flags = SA_SIGINFO;\n"
9387 "    sa.sa_sigaction = handler;\n"
9388 "    sigemptyset(&sa.sa_mask);\n"
9389 "    if (sigaction(SIG, &sa, NULL) == -1)\n"
9390 "        errExit(\"sigaction\");\n"
9391 msgstr ""
9392
9393 #. type: Plain text
9394 #: build/C/man2/timer_create.2:366
9395 #, no-wrap
9396 msgid "    /* Block timer signal temporarily */\n"
9397 msgstr ""
9398
9399 #. type: Plain text
9400 #: build/C/man2/timer_create.2:372
9401 #, no-wrap
9402 msgid ""
9403 "    printf(\"Blocking signal %d\\en\", SIG);\n"
9404 "    sigemptyset(&mask);\n"
9405 "    sigaddset(&mask, SIG);\n"
9406 "    if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n"
9407 "        errExit(\"sigprocmask\");\n"
9408 msgstr ""
9409
9410 #. type: Plain text
9411 #: build/C/man2/timer_create.2:374
9412 #, no-wrap
9413 msgid "    /* Create the timer */\n"
9414 msgstr ""
9415
9416 #. type: Plain text
9417 #: build/C/man2/timer_create.2:380
9418 #, no-wrap
9419 msgid ""
9420 "    sev.sigev_notify = SIGEV_SIGNAL;\n"
9421 "    sev.sigev_signo = SIG;\n"
9422 "    sev.sigev_value.sival_ptr = &timerid;\n"
9423 "    if (timer_create(CLOCKID, &sev, &timerid) == -1)\n"
9424 "        errExit(\"timer_create\");\n"
9425 msgstr ""
9426
9427 #. type: Plain text
9428 #: build/C/man2/timer_create.2:382
9429 #, no-wrap
9430 msgid "    printf(\"timer ID is 0x%lx\\en\", (long) timerid);\n"
9431 msgstr ""
9432
9433 #. type: Plain text
9434 #: build/C/man2/timer_create.2:384
9435 #, no-wrap
9436 msgid "    /* Start the timer */\n"
9437 msgstr ""
9438
9439 #. type: Plain text
9440 #: build/C/man2/timer_create.2:390
9441 #, no-wrap
9442 msgid ""
9443 "    freq_nanosecs = atoll(argv[2]);\n"
9444 "    its.it_value.tv_sec = freq_nanosecs / 1000000000;\n"
9445 "    its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n"
9446 "    its.it_interval.tv_sec = its.it_value.tv_sec;\n"
9447 "    its.it_interval.tv_nsec = its.it_value.tv_nsec;\n"
9448 msgstr ""
9449
9450 #. type: Plain text
9451 #: build/C/man2/timer_create.2:393
9452 #, no-wrap
9453 msgid ""
9454 "    if (timer_settime(timerid, 0, &its, NULL) == -1)\n"
9455 "         errExit(\"timer_settime\");\n"
9456 msgstr ""
9457
9458 #. type: Plain text
9459 #: build/C/man2/timer_create.2:396
9460 #, no-wrap
9461 msgid ""
9462 "    /* Sleep for a while; meanwhile, the timer may expire\n"
9463 "       multiple times */\n"
9464 msgstr ""
9465
9466 #. type: Plain text
9467 #: build/C/man2/timer_create.2:399
9468 #, no-wrap
9469 msgid ""
9470 "    printf(\"Sleeping for %d seconds\\en\", atoi(argv[1]));\n"
9471 "    sleep(atoi(argv[1]));\n"
9472 msgstr ""
9473
9474 #. type: Plain text
9475 #: build/C/man2/timer_create.2:402
9476 #, no-wrap
9477 msgid ""
9478 "    /* Unlock the timer signal, so that timer notification\n"
9479 "       can be delivered */\n"
9480 msgstr ""
9481
9482 #. type: Plain text
9483 #: build/C/man2/timer_create.2:406
9484 #, no-wrap
9485 msgid ""
9486 "    printf(\"Unblocking signal %d\\en\", SIG);\n"
9487 "    if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n"
9488 "        errExit(\"sigprocmask\");\n"
9489 msgstr ""
9490
9491 #. type: Plain text
9492 #: build/C/man2/timer_create.2:409 build/C/man2/timerfd_create.2:547
9493 #, no-wrap
9494 msgid ""
9495 "    exit(EXIT_SUCCESS);\n"
9496 "}\n"
9497 msgstr ""
9498
9499 #. type: Plain text
9500 #: build/C/man2/timer_create.2:425
9501 msgid ""
9502 "B<clock_gettime>(2), B<setitimer>(2), B<timer_delete>(2), "
9503 "B<timer_getoverrun>(2), B<timer_settime>(2), B<timerfd_create>(2), "
9504 "B<clock_getcpuclockid>(3), B<pthread_getcpuclockid>(3), B<pthreads>(7), "
9505 "B<sigevent>(7), B<signal>(7), B<time>(7)"
9506 msgstr ""
9507
9508 #. type: TH
9509 #: build/C/man2/timer_delete.2:26
9510 #, no-wrap
9511 msgid "TIMER_DELETE"
9512 msgstr ""
9513
9514 #. type: TH
9515 #: build/C/man2/timer_delete.2:26 build/C/man2/timer_getoverrun.2:26
9516 #, no-wrap
9517 msgid "2009-02-20"
9518 msgstr ""
9519
9520 #. type: Plain text
9521 #: build/C/man2/timer_delete.2:29
9522 msgid "timer_delete - delete a POSIX per-process timer"
9523 msgstr ""
9524
9525 #. type: Plain text
9526 #: build/C/man2/timer_delete.2:32 build/C/man2/timer_getoverrun.2:32 build/C/man2/timer_settime.2:33
9527 #, no-wrap
9528 msgid "B<#include E<lt>time.hE<gt>>\n"
9529 msgstr ""
9530
9531 #. type: Plain text
9532 #: build/C/man2/timer_delete.2:34
9533 #, no-wrap
9534 msgid "B<int timer_delete(timer_t >I<timerid>B<);>\n"
9535 msgstr ""
9536
9537 #. type: Plain text
9538 #: build/C/man2/timer_delete.2:45
9539 msgid "B<timer_delete>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
9540 msgstr ""
9541
9542 #. type: Plain text
9543 #: build/C/man2/timer_delete.2:53
9544 msgid ""
9545 "B<timer_delete>()  deletes the timer whose ID is given in I<timerid>.  If "
9546 "the timer was armed at the time of this call, it is disarmed before being "
9547 "deleted.  The treatment of any pending signal generated by the deleted timer "
9548 "is unspecified."
9549 msgstr ""
9550
9551 #. type: Plain text
9552 #: build/C/man2/timer_delete.2:60
9553 msgid ""
9554 "On success, B<timer_delete>()  returns 0.  On failure, -1 is returned, and "
9555 "I<errno> is set to indicate the error."
9556 msgstr ""
9557
9558 #. type: Plain text
9559 #: build/C/man2/timer_delete.2:65 build/C/man2/timer_getoverrun.2:95
9560 msgid "I<timerid> is not a valid timer ID."
9561 msgstr ""
9562
9563 #. type: Plain text
9564 #: build/C/man2/timer_delete.2:75
9565 msgid ""
9566 "B<clock_gettime>(2), B<timer_create>(2), B<timer_getoverrun>(2), "
9567 "B<timer_settime>(2), B<time>(7)"
9568 msgstr ""
9569
9570 #. type: TH
9571 #: build/C/man2/timer_getoverrun.2:26
9572 #, no-wrap
9573 msgid "TIMER_GETOVERRUN"
9574 msgstr ""
9575
9576 #. type: Plain text
9577 #: build/C/man2/timer_getoverrun.2:29
9578 msgid "timer_getoverrun - get overrun count for a POSIX per-process timer"
9579 msgstr ""
9580
9581 #. type: Plain text
9582 #: build/C/man2/timer_getoverrun.2:34
9583 #, no-wrap
9584 msgid "B<int timer_getoverrun(timer_t >I<timerid>B<);>\n"
9585 msgstr ""
9586
9587 #. type: Plain text
9588 #: build/C/man2/timer_getoverrun.2:45
9589 msgid "B<timer_getoverrun>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
9590 msgstr ""
9591
9592 #. type: Plain text
9593 #: build/C/man2/timer_getoverrun.2:56
9594 msgid ""
9595 "B<timer_getoverrun>()  returns the \"overrun count\" for the timer referred "
9596 "to by I<timerid>.  An application can use the overrun count to accurately "
9597 "calculate the number of timer expirations that would have occurred over a "
9598 "given time interval.  Timer overruns can occur both when receiving "
9599 "expiration notifications via signals (B<SIGEV_SIGNAL>), and via threads "
9600 "(B<SIGEV_THREAD>)."
9601 msgstr ""
9602
9603 #. type: Plain text
9604 #: build/C/man2/timer_getoverrun.2:76
9605 msgid ""
9606 "When expiration notifications are delivered via a signal, overruns can occur "
9607 "as follows.  Regardless of whether or not a real-time signal is used for "
9608 "timer notifications, the system queues at most one signal per timer.  (This "
9609 "is the behavior specified by POSIX.1-2001.  The alternative, queuing one "
9610 "signal for each timer expiration, could easily result in overflowing the "
9611 "allowed limits for queued signals on the system.)  Because of system "
9612 "scheduling delays, or because the signal may be temporarily blocked, there "
9613 "can be a delay between the time when the notification signal is generated "
9614 "and the time when it is delivered (e.g., caught by a signal handler) or "
9615 "accepted (e.g., using B<sigwaitinfo>(2)).  In this interval, further timer "
9616 "expirations may occur.  The timer overrun count is the number of additional "
9617 "timer expirations that occurred between the time when the signal was "
9618 "generated and when it was delivered or accepted."
9619 msgstr ""
9620
9621 #. type: Plain text
9622 #: build/C/man2/timer_getoverrun.2:82
9623 msgid ""
9624 "Timer overruns can also occur when expiration notifications are delivered "
9625 "via invocation of a thread, since there may be an arbitrary delay between an "
9626 "expiration of the timer and the invocation of the notification thread, and "
9627 "in that delay interval, additional timer expirations may occur."
9628 msgstr ""
9629
9630 #. type: Plain text
9631 #: build/C/man2/timer_getoverrun.2:90
9632 msgid ""
9633 "On success, B<timer_getoverrun>()  returns the overrun count of the "
9634 "specified timer; this count may be 0 if no overruns have occurred.  On "
9635 "failure, -1 is returned, and I<errno> is set to indicate the error."
9636 msgstr ""
9637
9638 #. type: Plain text
9639 #: build/C/man2/timer_getoverrun.2:111
9640 msgid ""
9641 "When timer notifications are delivered via signals (B<SIGEV_SIGNAL>), on "
9642 "Linux it is also possible to obtain the overrun count via the I<si_overrun> "
9643 "field of the I<siginfo_t> structure (see B<sigaction>(2)).  This allows an "
9644 "application to avoid the overhead of making a system call to obtain the "
9645 "overrun count, but is a nonportable extension to POSIX.1-2001."
9646 msgstr ""
9647
9648 #.  FIXME . Austin bug filed, 11 Feb 09
9649 #. type: Plain text
9650 #: build/C/man2/timer_getoverrun.2:115
9651 msgid ""
9652 "POSIX.1-2001 discusses timer overruns only in the context of timer "
9653 "notifications using signals."
9654 msgstr ""
9655
9656 #.  Bug filed: http://bugzilla.kernel.org/show_bug.cgi?id=12665
9657 #.  http://thread.gmane.org/gmane.linux.kernel/113276/
9658 #. type: Plain text
9659 #: build/C/man2/timer_getoverrun.2:128
9660 msgid ""
9661 "POSIX.1-2001 specifies that if the timer overrun count is equal to or "
9662 "greater than an implementation-defined maximum, B<DELAYTIMER_MAX>, then "
9663 "B<timer_getoverrun>()  should return B<DELAYTIMER_MAX>.  However, Linux does "
9664 "not implement this feature: instead, if the timer overrun value exceeds the "
9665 "maximum representable integer, the counter cycles, starting once more from "
9666 "low values."
9667 msgstr ""
9668
9669 #. type: Plain text
9670 #: build/C/man2/timer_getoverrun.2:131 build/C/man2/timer_settime.2:212
9671 msgid "See B<timer_create>(2)."
9672 msgstr ""
9673
9674 #. type: Plain text
9675 #: build/C/man2/timer_getoverrun.2:141
9676 msgid ""
9677 "B<clock_gettime>(2), B<sigaction>(2), B<signalfd>(2), B<sigwaitinfo>(2), "
9678 "B<timer_create>(2), B<timer_delete>(2), B<timer_settime>(2), B<signal>(7), "
9679 "B<time>(7)"
9680 msgstr ""
9681
9682 #. type: TH
9683 #: build/C/man2/timer_settime.2:26
9684 #, no-wrap
9685 msgid "TIMER_SETTIME"
9686 msgstr ""
9687
9688 #. type: TH
9689 #: build/C/man2/timer_settime.2:26
9690 #, no-wrap
9691 msgid "2012-10-15"
9692 msgstr ""
9693
9694 #. type: Plain text
9695 #: build/C/man2/timer_settime.2:30
9696 msgid ""
9697 "timer_settime, timer_gettime - arm/disarm and fetch state of POSIX "
9698 "per-process timer"
9699 msgstr ""
9700
9701 #. type: Plain text
9702 #: build/C/man2/timer_settime.2:38
9703 #, no-wrap
9704 msgid ""
9705 "B<int timer_settime(timer_t >I<timerid>B<, int >I<flags>B<,>\n"
9706 "B<                  const struct itimerspec *>I<new_value>B<,>\n"
9707 "B<                  struct itimerspec *>I<old_value>B<);>\n"
9708 "B<int timer_gettime(timer_t >I<timerid>B<, struct itimerspec "
9709 "*>I<curr_value>B<);>\n"
9710 msgstr ""
9711
9712 #. type: Plain text
9713 #: build/C/man2/timer_settime.2:50
9714 msgid "B<timer_settime>(), B<timer_gettime>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
9715 msgstr ""
9716
9717 #. type: Plain text
9718 #: build/C/man2/timer_settime.2:63
9719 msgid ""
9720 "B<timer_settime>()  arms or disarms the timer identified by I<timerid>.  The "
9721 "I<new_value> argument is pointer to an I<itimerspec> structure that "
9722 "specifies the new initial value and the new interval for the timer.  The "
9723 "I<itimerspec> structure is defined as follows:"
9724 msgstr ""
9725
9726 #. type: Plain text
9727 #: build/C/man2/timer_settime.2:70 build/C/man2/timerfd_create.2:135
9728 #, no-wrap
9729 msgid ""
9730 "struct timespec {\n"
9731 "    time_t tv_sec;                /* Seconds */\n"
9732 "    long   tv_nsec;               /* Nanoseconds */\n"
9733 "};\n"
9734 msgstr ""
9735
9736 #. type: Plain text
9737 #: build/C/man2/timer_settime.2:75
9738 #, no-wrap
9739 msgid ""
9740 "struct itimerspec {\n"
9741 "    struct timespec it_interval;  /* Timer interval */\n"
9742 "    struct timespec it_value;     /* Initial expiration */\n"
9743 "};\n"
9744 msgstr ""
9745
9746 #. type: Plain text
9747 #: build/C/man2/timer_settime.2:87
9748 msgid ""
9749 "Each of the substructures of the I<itimerspec> structure is a I<timespec> "
9750 "structure that allows a time value to be specified in seconds and "
9751 "nanoseconds.  These time values are measured according to the clock that was "
9752 "specified when the timer was created by B<timer_create>(2)."
9753 msgstr ""
9754
9755 #. type: Plain text
9756 #: build/C/man2/timer_settime.2:101
9757 msgid ""
9758 "If I<new_value-E<gt>it_value> specifies a nonzero value (i.e., either "
9759 "subfield is nonzero), then B<timer_settime>()  arms (starts) the timer, "
9760 "setting it to initially expire at the given time.  (If the timer was already "
9761 "armed, then the previous settings are overwritten.)  If "
9762 "I<new_value-E<gt>it_value> specifies a zero value (i.e., both subfields are "
9763 "zero), then the timer is disarmed."
9764 msgstr ""
9765
9766 #. type: Plain text
9767 #: build/C/man2/timer_settime.2:113
9768 msgid ""
9769 "The I<new_value-E<gt>it_interval> field specifies the period of the timer, "
9770 "in seconds and nanoseconds.  If this field is nonzero, then each time that "
9771 "an armed timer expires, the timer is reloaded from the value specified in "
9772 "I<new_value-E<gt>it_interval>.  If I<new_value-E<gt>it_interval> specifies a "
9773 "zero value, then the timer expires just once, at the time specified by "
9774 "I<it_value>."
9775 msgstr ""
9776
9777 #.  By experiment: the overrun count is set correctly, for CLOCK_REALTIME.
9778 #. type: Plain text
9779 #: build/C/man2/timer_settime.2:134
9780 msgid ""
9781 "By default, the initial expiration time specified in "
9782 "I<new_value-E<gt>it_value> is interpreted relative to the current time on "
9783 "the timer's clock at the time of the call.  This can be modified by "
9784 "specifying B<TIMER_ABSTIME> in I<flags>, in which case "
9785 "I<new_value-E<gt>it_value> is interpreted as an absolute value as measured "
9786 "on the timer's clock; that is, the timer will expire when the clock value "
9787 "reaches the value specified by I<new_value-E<gt>it_value>.  If the specified "
9788 "absolute time has already passed, then the timer expires immediately, and "
9789 "the overrun count (see B<timer_getoverrun>(2))  will be set correctly."
9790 msgstr ""
9791
9792 #.  Similar remarks might apply with respect to process and thread CPU time
9793 #.  clocks, but these clocks are not currently (2.6.28) settable on Linux.
9794 #. type: Plain text
9795 #: build/C/man2/timer_settime.2:144
9796 msgid ""
9797 "If the value of the B<CLOCK_REALTIME> clock is adjusted while an absolute "
9798 "timer based on that clock is armed, then the expiration of the timer will be "
9799 "appropriately adjusted.  Adjustments to the B<CLOCK_REALTIME> clock have no "
9800 "effect on relative timers based on that clock."
9801 msgstr ""
9802
9803 #. type: Plain text
9804 #: build/C/man2/timer_settime.2:153
9805 msgid ""
9806 "If I<old_value> is not NULL, then it points to a buffer that is used to "
9807 "return the previous interval of the timer (in I<old_value-E<gt>it_interval>)  "
9808 "and the amount of time until the timer would previously have next expired "
9809 "(in I<old_value-E<gt>it_value>)."
9810 msgstr ""
9811
9812 #. type: Plain text
9813 #: build/C/man2/timer_settime.2:173
9814 msgid ""
9815 "B<timer_gettime>()  returns the time until next expiration, and the "
9816 "interval, for the timer specified by I<timerid>, in the buffer pointed to by "
9817 "I<curr_value>.  The time remaining until the next timer expiration is "
9818 "returned in I<curr_value-E<gt>it_value>; this is always a relative value, "
9819 "regardless of whether the B<TIMER_ABSTIME> flag was used when arming the "
9820 "timer.  If the value returned in I<curr_value-E<gt>it_value> is zero, then "
9821 "the timer is currently disarmed.  The timer interval is returned in "
9822 "I<curr_value-E<gt>it_interval>.  If the value returned in "
9823 "I<curr_value-E<gt>it_interval> is zero, then this is a \"one-shot\" timer."
9824 msgstr ""
9825
9826 #. type: Plain text
9827 #: build/C/man2/timer_settime.2:182
9828 msgid ""
9829 "On success, B<timer_settime>()  and B<timer_gettime>()  return 0.  On error, "
9830 "-1 is returned, and I<errno> is set to indicate the error."
9831 msgstr ""
9832
9833 #. type: Plain text
9834 #: build/C/man2/timer_settime.2:184
9835 msgid "These functions may fail with the following errors:"
9836 msgstr ""
9837
9838 #. type: Plain text
9839 #: build/C/man2/timer_settime.2:191
9840 msgid "I<new_value>, I<old_value>, or I<curr_value> is not a valid pointer."
9841 msgstr ""
9842
9843 #.  FIXME . eventually: invalid value in flags
9844 #. type: Plain text
9845 #: build/C/man2/timer_settime.2:196
9846 msgid "I<timerid> is invalid."
9847 msgstr ""
9848
9849 #. type: Plain text
9850 #: build/C/man2/timer_settime.2:199
9851 msgid "B<timer_settime>()  may fail with the following errors:"
9852 msgstr ""
9853
9854 #. type: Plain text
9855 #: build/C/man2/timer_settime.2:205
9856 msgid ""
9857 "I<new_value.it_value> is negative; or I<new_value.it_value.tv_nsec> is "
9858 "negative or greater than 999,999,999."
9859 msgstr ""
9860
9861 #. type: Plain text
9862 #: build/C/man2/timer_settime.2:207
9863 msgid "These system calls are available since Linux 2.6."
9864 msgstr ""
9865
9866 #. type: Plain text
9867 #: build/C/man2/timer_settime.2:216
9868 msgid "B<timer_create>(2), B<timer_getoverrun>(2), B<time>(7)"
9869 msgstr ""
9870
9871 #. type: TH
9872 #: build/C/man2/timerfd_create.2:22
9873 #, no-wrap
9874 msgid "TIMERFD_CREATE"
9875 msgstr ""
9876
9877 #. type: TH
9878 #: build/C/man2/timerfd_create.2:22
9879 #, no-wrap
9880 msgid "2011-09-14"
9881 msgstr ""
9882
9883 #. type: Plain text
9884 #: build/C/man2/timerfd_create.2:26
9885 msgid ""
9886 "timerfd_create, timerfd_settime, timerfd_gettime - timers that notify via "
9887 "file descriptors"
9888 msgstr ""
9889
9890 #. type: Plain text
9891 #: build/C/man2/timerfd_create.2:29
9892 #, no-wrap
9893 msgid "B<#include E<lt>sys/timerfd.hE<gt>>\n"
9894 msgstr ""
9895
9896 #. type: Plain text
9897 #: build/C/man2/timerfd_create.2:31
9898 #, no-wrap
9899 msgid "B<int timerfd_create(int >I<clockid>B<, int >I<flags>B<);>\n"
9900 msgstr ""
9901
9902 #. type: Plain text
9903 #: build/C/man2/timerfd_create.2:35
9904 #, no-wrap
9905 msgid ""
9906 "B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n"
9907 "B<                    const struct itimerspec *>I<new_value>B<,>\n"
9908 "B<                    struct itimerspec *>I<old_value>B<);>\n"
9909 msgstr ""
9910
9911 #. type: Plain text
9912 #: build/C/man2/timerfd_create.2:37
9913 #, no-wrap
9914 msgid "B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n"
9915 msgstr ""
9916
9917 #. type: Plain text
9918 #: build/C/man2/timerfd_create.2:50
9919 msgid ""
9920 "These system calls create and operate on a timer that delivers timer "
9921 "expiration notifications via a file descriptor.  They provide an alternative "
9922 "to the use of B<setitimer>(2)  or B<timer_create>(2), with the advantage "
9923 "that the file descriptor may be monitored by B<select>(2), B<poll>(2), and "
9924 "B<epoll>(7)."
9925 msgstr ""
9926
9927 #. type: Plain text
9928 #: build/C/man2/timerfd_create.2:62
9929 msgid ""
9930 "The use of these three system calls is analogous to the use of "
9931 "B<timer_create>(2), B<timer_settime>(2), and B<timer_gettime>(2).  (There is "
9932 "no analog of B<timer_getoverrun>(2), since that functionality is provided by "
9933 "B<read>(2), as described below.)"
9934 msgstr ""
9935
9936 #. type: SS
9937 #: build/C/man2/timerfd_create.2:62
9938 #, no-wrap
9939 msgid "timerfd_create()"
9940 msgstr ""
9941
9942 #.  FIXME
9943 #.  Additional clocks are now supported:
9944 #.  CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM
9945 #.     Since Linux 3.11, commit 11ffa9d6065f344a9bd769a2452f26f2f671e5f8
9946 #.  CLOCK_BOOTTIME
9947 #.     Since Linux 3.15, commit 4a2378a943f09907fb1ae35c15de917f60289c14
9948 #. type: Plain text
9949 #: build/C/man2/timerfd_create.2:87
9950 msgid ""
9951 "B<timerfd_create>()  creates a new timer object, and returns a file "
9952 "descriptor that refers to that timer.  The I<clockid> argument specifies the "
9953 "clock that is used to mark the progress of the timer, and must be either "
9954 "B<CLOCK_REALTIME> or B<CLOCK_MONOTONIC>.  B<CLOCK_REALTIME> is a settable "
9955 "system-wide clock.  B<CLOCK_MONOTONIC> is a nonsettable clock that is not "
9956 "affected by discontinuous changes in the system clock (e.g., manual changes "
9957 "to system time).  The current value of each of these clocks can be retrieved "
9958 "using B<clock_gettime>(2)."
9959 msgstr ""
9960
9961 #. type: Plain text
9962 #: build/C/man2/timerfd_create.2:92
9963 msgid ""
9964 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
9965 "I<flags> to change the behavior of B<timerfd_create>():"
9966 msgstr ""
9967
9968 #. type: TP
9969 #: build/C/man2/timerfd_create.2:92
9970 #, no-wrap
9971 msgid "B<TFD_NONBLOCK>"
9972 msgstr ""
9973
9974 #. type: TP
9975 #: build/C/man2/timerfd_create.2:100
9976 #, no-wrap
9977 msgid "B<TFD_CLOEXEC>"
9978 msgstr ""
9979
9980 #. type: Plain text
9981 #: build/C/man2/timerfd_create.2:114
9982 msgid ""
9983 "In Linux versions up to and including 2.6.26, I<flags> must be specified as "
9984 "zero."
9985 msgstr ""
9986
9987 #. type: SS
9988 #: build/C/man2/timerfd_create.2:114
9989 #, no-wrap
9990 msgid "timerfd_settime()"
9991 msgstr ""
9992
9993 #. type: Plain text
9994 #: build/C/man2/timerfd_create.2:119
9995 msgid ""
9996 "B<timerfd_settime>()  arms (starts) or disarms (stops)  the timer referred "
9997 "to by the file descriptor I<fd>."
9998 msgstr ""
9999
10000 #. type: Plain text
10001 #: build/C/man2/timerfd_create.2:128
10002 msgid ""
10003 "The I<new_value> argument specifies the initial expiration and interval for "
10004 "the timer.  The I<itimer> structure used for this argument contains two "
10005 "fields, each of which is in turn a structure of type I<timespec>:"
10006 msgstr ""
10007
10008 #. type: Plain text
10009 #: build/C/man2/timerfd_create.2:140
10010 #, no-wrap
10011 msgid ""
10012 "struct itimerspec {\n"
10013 "    struct timespec it_interval;  /* Interval for periodic timer */\n"
10014 "    struct timespec it_value;     /* Initial expiration */\n"
10015 "};\n"
10016 msgstr ""
10017
10018 #. type: Plain text
10019 #: build/C/man2/timerfd_create.2:152
10020 msgid ""
10021 "I<new_value.it_value> specifies the initial expiration of the timer, in "
10022 "seconds and nanoseconds.  Setting either field of I<new_value.it_value> to a "
10023 "nonzero value arms the timer.  Setting both fields of I<new_value.it_value> "
10024 "to zero disarms the timer."
10025 msgstr ""
10026
10027 #. type: Plain text
10028 #: build/C/man2/timerfd_create.2:161
10029 msgid ""
10030 "Setting one or both fields of I<new_value.it_interval> to nonzero values "
10031 "specifies the period, in seconds and nanoseconds, for repeated timer "
10032 "expirations after the initial expiration.  If both fields of "
10033 "I<new_value.it_interval> are zero, the timer expires just once, at the time "
10034 "specified by I<new_value.it_value>."
10035 msgstr ""
10036
10037 #. type: Plain text
10038 #: build/C/man2/timerfd_create.2:177
10039 msgid ""
10040 "The I<flags> argument is either 0, to start a relative timer "
10041 "(I<new_value.it_value> specifies a time relative to the current value of the "
10042 "clock specified by I<clockid>), or B<TFD_TIMER_ABSTIME>, to start an "
10043 "absolute timer (I<new_value.it_value> specifies an absolute time for the "
10044 "clock specified by I<clockid>; that is, the timer will expire when the value "
10045 "of that clock reaches the value specified in I<new_value.it_value>)."
10046 msgstr ""
10047
10048 #. type: Plain text
10049 #: build/C/man2/timerfd_create.2:188
10050 msgid ""
10051 "If the I<old_value> argument is not NULL, then the I<itimerspec> structure "
10052 "that it points to is used to return the setting of the timer that was "
10053 "current at the time of the call; see the description of B<timerfd_gettime>()  "
10054 "following."
10055 msgstr ""
10056
10057 #. type: SS
10058 #: build/C/man2/timerfd_create.2:188
10059 #, no-wrap
10060 msgid "timerfd_gettime()"
10061 msgstr ""
10062
10063 #. type: Plain text
10064 #: build/C/man2/timerfd_create.2:197
10065 msgid ""
10066 "B<timerfd_gettime>()  returns, in I<curr_value>, an I<itimerspec> structure "
10067 "that contains the current setting of the timer referred to by the file "
10068 "descriptor I<fd>."
10069 msgstr ""
10070
10071 #. type: Plain text
10072 #: build/C/man2/timerfd_create.2:207
10073 msgid ""
10074 "The I<it_value> field returns the amount of time until the timer will next "
10075 "expire.  If both fields of this structure are zero, then the timer is "
10076 "currently disarmed.  This field always contains a relative value, regardless "
10077 "of whether the B<TFD_TIMER_ABSTIME> flag was specified when setting the "
10078 "timer."
10079 msgstr ""
10080
10081 #. type: Plain text
10082 #: build/C/man2/timerfd_create.2:214
10083 msgid ""
10084 "The I<it_interval> field returns the interval of the timer.  If both fields "
10085 "of this structure are zero, then the timer is set to expire just once, at "
10086 "the time specified by I<curr_value.it_value>."
10087 msgstr ""
10088
10089 #. type: SS
10090 #: build/C/man2/timerfd_create.2:214
10091 #, no-wrap
10092 msgid "Operating on a timer file descriptor"
10093 msgstr ""
10094
10095 #. type: Plain text
10096 #: build/C/man2/timerfd_create.2:218
10097 msgid ""
10098 "The file descriptor returned by B<timerfd_create>()  supports the following "
10099 "operations:"
10100 msgstr ""
10101
10102 #. type: Plain text
10103 #: build/C/man2/timerfd_create.2:232
10104 msgid ""
10105 "If the timer has already expired one or more times since its settings were "
10106 "last modified using B<timerfd_settime>(), or since the last successful "
10107 "B<read>(2), then the buffer given to B<read>(2)  returns an unsigned 8-byte "
10108 "integer (I<uint64_t>)  containing the number of expirations that have "
10109 "occurred.  (The returned value is in host byte order\\(emthat is, the native "
10110 "byte order for integers on the host machine.)"
10111 msgstr ""
10112
10113 #. type: Plain text
10114 #: build/C/man2/timerfd_create.2:245
10115 msgid ""
10116 "If no timer expirations have occurred at the time of the B<read>(2), then "
10117 "the call either blocks until the next timer expiration, or fails with the "
10118 "error B<EAGAIN> if the file descriptor has been made nonblocking (via the "
10119 "use of the B<fcntl>(2)  B<F_SETFL> operation to set the B<O_NONBLOCK> flag)."
10120 msgstr ""
10121
10122 #. type: Plain text
10123 #: build/C/man2/timerfd_create.2:251
10124 msgid ""
10125 "A B<read>(2)  will fail with the error B<EINVAL> if the size of the supplied "
10126 "buffer is less than 8 bytes."
10127 msgstr ""
10128
10129 #. type: Plain text
10130 #: build/C/man2/timerfd_create.2:262
10131 msgid ""
10132 "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the "
10133 "B<poll>(2)  B<POLLIN> flag)  if one or more timer expirations have occurred."
10134 msgstr ""
10135
10136 #. type: Plain text
10137 #: build/C/man2/timerfd_create.2:269
10138 msgid ""
10139 "The file descriptor also supports the other file-descriptor multiplexing "
10140 "APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
10141 msgstr ""
10142
10143 #. type: Plain text
10144 #: build/C/man2/timerfd_create.2:276
10145 msgid ""
10146 "When the file descriptor is no longer required it should be closed.  When "
10147 "all file descriptors associated with the same timer object have been closed, "
10148 "the timer is disarmed and its resources are freed by the kernel."
10149 msgstr ""
10150
10151 #. type: Plain text
10152 #: build/C/man2/timerfd_create.2:288
10153 msgid ""
10154 "After a B<fork>(2), the child inherits a copy of the file descriptor created "
10155 "by B<timerfd_create>().  The file descriptor refers to the same underlying "
10156 "timer object as the corresponding file descriptor in the parent, and "
10157 "B<read>(2)s in the child will return information about expirations of the "
10158 "timer."
10159 msgstr ""
10160
10161 #. type: Plain text
10162 #: build/C/man2/timerfd_create.2:294
10163 msgid ""
10164 "A file descriptor created by B<timerfd_create>()  is preserved across "
10165 "B<execve>(2), and continues to generate timer expirations if the timer was "
10166 "armed."
10167 msgstr ""
10168
10169 #. type: Plain text
10170 #: build/C/man2/timerfd_create.2:301
10171 msgid ""
10172 "On success, B<timerfd_create>()  returns a new file descriptor.  On error, "
10173 "-1 is returned and I<errno> is set to indicate the error."
10174 msgstr ""
10175
10176 #. type: Plain text
10177 #: build/C/man2/timerfd_create.2:309
10178 msgid ""
10179 "B<timerfd_settime>()  and B<timerfd_gettime>()  return 0 on success; on "
10180 "error they return -1, and set I<errno> to indicate the error."
10181 msgstr ""
10182
10183 #. type: Plain text
10184 #: build/C/man2/timerfd_create.2:312
10185 msgid "B<timerfd_create>()  can fail with the following errors:"
10186 msgstr ""
10187
10188 #. type: Plain text
10189 #: build/C/man2/timerfd_create.2:320
10190 msgid "The I<clockid> argument is neither B<CLOCK_MONOTONIC> nor B<CLOCK_REALTIME>;"
10191 msgstr ""
10192
10193 #. type: Plain text
10194 #: build/C/man2/timerfd_create.2:340
10195 msgid "There was insufficient kernel memory to create the timer."
10196 msgstr ""
10197
10198 #. type: Plain text
10199 #: build/C/man2/timerfd_create.2:345
10200 msgid ""
10201 "B<timerfd_settime>()  and B<timerfd_gettime>()  can fail with the following "
10202 "errors:"
10203 msgstr ""
10204
10205 #. type: Plain text
10206 #: build/C/man2/timerfd_create.2:349
10207 msgid "I<fd> is not a valid file descriptor."
10208 msgstr ""
10209
10210 #. type: Plain text
10211 #: build/C/man2/timerfd_create.2:360
10212 msgid "I<fd> is not a valid timerfd file descriptor."
10213 msgstr ""
10214
10215 #. type: Plain text
10216 #: build/C/man2/timerfd_create.2:363
10217 msgid "B<timerfd_settime>()  can also fail with the following errors:"
10218 msgstr ""
10219
10220 #. type: Plain text
10221 #: build/C/man2/timerfd_create.2:369
10222 msgid ""
10223 "I<new_value> is not properly initialized (one of the I<tv_nsec> falls "
10224 "outside the range zero to 999,999,999)."
10225 msgstr ""
10226
10227 #.  This case only checked since 2.6.29, and 2.2.2[78].some-stable-version.
10228 #.  In older kernel versions, no check was made for invalid flags.
10229 #. type: Plain text
10230 #: build/C/man2/timerfd_create.2:375
10231 msgid "I<flags> is invalid."
10232 msgstr ""
10233
10234 #. type: Plain text
10235 #: build/C/man2/timerfd_create.2:378
10236 msgid ""
10237 "These system calls are available on Linux since kernel 2.6.25.  Library "
10238 "support is provided by glibc since version 2.8."
10239 msgstr ""
10240
10241 #.  2.6.29
10242 #. type: Plain text
10243 #: build/C/man2/timerfd_create.2:386
10244 msgid ""
10245 "Currently, B<timerfd_create>()  supports fewer types of clock IDs than "
10246 "B<timer_create>(2)."
10247 msgstr ""
10248
10249 #. type: Plain text
10250 #: build/C/man2/timerfd_create.2:395
10251 msgid ""
10252 "The following program creates a timer and then monitors its progress.  The "
10253 "program accepts up to three command-line arguments.  The first argument "
10254 "specifies the number of seconds for the initial expiration of the timer.  "
10255 "The second argument specifies the interval for the timer, in seconds.  The "
10256 "third argument specifies the number of times the program should allow the "
10257 "timer to expire before terminating.  The second and third command-line "
10258 "arguments are optional."
10259 msgstr ""
10260
10261 #. type: Plain text
10262 #: build/C/man2/timerfd_create.2:397 build/C/man2/wait.2:571
10263 msgid "The following shell session demonstrates the use of the program:"
10264 msgstr ""
10265
10266 #. type: Plain text
10267 #: build/C/man2/timerfd_create.2:412
10268 #, no-wrap
10269 msgid ""
10270 "$B< a.out 3 1 100>\n"
10271 "0.000: timer started\n"
10272 "3.000: read: 1; total=1\n"
10273 "4.000: read: 1; total=2\n"
10274 "B<^Z >                 # type control-Z to suspend the program\n"
10275 "[1]+  Stopped                 ./timerfd3_demo 3 1 100\n"
10276 "$ B<fg>                # Resume execution after a few seconds\n"
10277 "a.out 3 1 100\n"
10278 "9.660: read: 5; total=7\n"
10279 "10.000: read: 1; total=8\n"
10280 "11.000: read: 1; total=9\n"
10281 "B<^C >                 # type control-C to suspend the program\n"
10282 msgstr ""
10283
10284 #.  The commented out code here is what we currently need until
10285 #.  the required stuff is in glibc
10286 #
10287 #
10288 #. /* Link with -lrt */
10289 #. #define _GNU_SOURCE
10290 #. #include <sys/syscall.h>
10291 #. #include <unistd.h>
10292 #. #include <time.h>
10293 #. #if defined(__i386__)
10294 #. #define __NR_timerfd_create 322
10295 #. #define __NR_timerfd_settime 325
10296 #. #define __NR_timerfd_gettime 326
10297 #. #endif
10298 #
10299 #. static int
10300 #. timerfd_create(int clockid, int flags)
10301 #. {
10302 #.     return syscall(__NR_timerfd_create, clockid, flags);
10303 #. }
10304 #
10305 #. static int
10306 #. timerfd_settime(int fd, int flags, struct itimerspec *new_value,
10307 #.         struct itimerspec *curr_value)
10308 #. {
10309 #.     return syscall(__NR_timerfd_settime, fd, flags, new_value,
10310 #.                    curr_value);
10311 #. }
10312 #
10313 #. static int
10314 #. timerfd_gettime(int fd, struct itimerspec *curr_value)
10315 #. {
10316 #.     return syscall(__NR_timerfd_gettime, fd, curr_value);
10317 #. }
10318 #
10319 #. #define TFD_TIMER_ABSTIME (1 << 0)
10320 #
10321 #. ////////////////////////////////////////////////////////////
10322 #. type: Plain text
10323 #: build/C/man2/timerfd_create.2:461
10324 #, no-wrap
10325 msgid ""
10326 "#include E<lt>sys/timerfd.hE<gt>\n"
10327 "#include E<lt>time.hE<gt>\n"
10328 "#include E<lt>unistd.hE<gt>\n"
10329 "#include E<lt>stdlib.hE<gt>\n"
10330 "#include E<lt>stdio.hE<gt>\n"
10331 "#include E<lt>stdint.hE<gt>        /* Definition of uint64_t */\n"
10332 msgstr ""
10333
10334 #. type: Plain text
10335 #: build/C/man2/timerfd_create.2:464
10336 #, no-wrap
10337 msgid ""
10338 "#define handle_error(msg) \\e\n"
10339 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
10340 msgstr ""
10341
10342 #. type: Plain text
10343 #: build/C/man2/timerfd_create.2:472
10344 #, no-wrap
10345 msgid ""
10346 "static void\n"
10347 "print_elapsed_time(void)\n"
10348 "{\n"
10349 "    static struct timespec start;\n"
10350 "    struct timespec curr;\n"
10351 "    static int first_call = 1;\n"
10352 "    int secs, nsecs;\n"
10353 msgstr ""
10354
10355 #. type: Plain text
10356 #: build/C/man2/timerfd_create.2:478
10357 #, no-wrap
10358 msgid ""
10359 "    if (first_call) {\n"
10360 "        first_call = 0;\n"
10361 "        if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
10362 "            handle_error(\"clock_gettime\");\n"
10363 "    }\n"
10364 msgstr ""
10365
10366 #. type: Plain text
10367 #: build/C/man2/timerfd_create.2:481
10368 #, no-wrap
10369 msgid ""
10370 "    if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
10371 "        handle_error(\"clock_gettime\");\n"
10372 msgstr ""
10373
10374 #. type: Plain text
10375 #: build/C/man2/timerfd_create.2:490
10376 #, no-wrap
10377 msgid ""
10378 "    secs = curr.tv_sec - start.tv_sec;\n"
10379 "    nsecs = curr.tv_nsec - start.tv_nsec;\n"
10380 "    if (nsecs E<lt> 0) {\n"
10381 "        secs--;\n"
10382 "        nsecs += 1000000000;\n"
10383 "    }\n"
10384 "    printf(\"%d.%03d: \", secs, (nsecs + 500000) / 1000000);\n"
10385 "}\n"
10386 msgstr ""
10387
10388 #. type: Plain text
10389 #: build/C/man2/timerfd_create.2:499
10390 #, no-wrap
10391 msgid ""
10392 "int\n"
10393 "main(int argc, char *argv[])\n"
10394 "{\n"
10395 "    struct itimerspec new_value;\n"
10396 "    int max_exp, fd;\n"
10397 "    struct timespec now;\n"
10398 "    uint64_t exp, tot_exp;\n"
10399 "    ssize_t s;\n"
10400 msgstr ""
10401
10402 #. type: Plain text
10403 #: build/C/man2/timerfd_create.2:505
10404 #, no-wrap
10405 msgid ""
10406 "    if ((argc != 2) && (argc != 4)) {\n"
10407 "        fprintf(stderr, \"%s init-secs [interval-secs max-exp]\\en\",\n"
10408 "                argv[0]);\n"
10409 "        exit(EXIT_FAILURE);\n"
10410 "    }\n"
10411 msgstr ""
10412
10413 #. type: Plain text
10414 #: build/C/man2/timerfd_create.2:508
10415 #, no-wrap
10416 msgid ""
10417 "    if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
10418 "        handle_error(\"clock_gettime\");\n"
10419 msgstr ""
10420
10421 #. type: Plain text
10422 #: build/C/man2/timerfd_create.2:511
10423 #, no-wrap
10424 msgid ""
10425 "    /* Create a CLOCK_REALTIME absolute timer with initial\n"
10426 "       expiration and interval as specified in command line */\n"
10427 msgstr ""
10428
10429 #. type: Plain text
10430 #: build/C/man2/timerfd_create.2:522
10431 #, no-wrap
10432 msgid ""
10433 "    new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
10434 "    new_value.it_value.tv_nsec = now.tv_nsec;\n"
10435 "    if (argc == 2) {\n"
10436 "        new_value.it_interval.tv_sec = 0;\n"
10437 "        max_exp = 1;\n"
10438 "    } else {\n"
10439 "        new_value.it_interval.tv_sec = atoi(argv[2]);\n"
10440 "        max_exp = atoi(argv[3]);\n"
10441 "    }\n"
10442 "    new_value.it_interval.tv_nsec = 0;\n"
10443 msgstr ""
10444
10445 #. type: Plain text
10446 #: build/C/man2/timerfd_create.2:526
10447 #, no-wrap
10448 msgid ""
10449 "    fd = timerfd_create(CLOCK_REALTIME, 0);\n"
10450 "    if (fd == -1)\n"
10451 "        handle_error(\"timerfd_create\");\n"
10452 msgstr ""
10453
10454 #. type: Plain text
10455 #: build/C/man2/timerfd_create.2:529
10456 #, no-wrap
10457 msgid ""
10458 "    if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
10459 "        handle_error(\"timerfd_settime\");\n"
10460 msgstr ""
10461
10462 #. type: Plain text
10463 #: build/C/man2/timerfd_create.2:532
10464 #, no-wrap
10465 msgid ""
10466 "    print_elapsed_time();\n"
10467 "    printf(\"timer started\\en\");\n"
10468 msgstr ""
10469
10470 #. type: Plain text
10471 #: build/C/man2/timerfd_create.2:537
10472 #, no-wrap
10473 msgid ""
10474 "    for (tot_exp = 0; tot_exp E<lt> max_exp;) {\n"
10475 "        s = read(fd, &exp, sizeof(uint64_t));\n"
10476 "        if (s != sizeof(uint64_t))\n"
10477 "            handle_error(\"read\");\n"
10478 msgstr ""
10479
10480 #. type: Plain text
10481 #: build/C/man2/timerfd_create.2:544
10482 #, no-wrap
10483 msgid ""
10484 "        tot_exp += exp;\n"
10485 "        print_elapsed_time();\n"
10486 "        printf(\"read: %llu; total=%llu\\en\",\n"
10487 "                (unsigned long long) exp,\n"
10488 "                (unsigned long long) tot_exp);\n"
10489 "    }\n"
10490 msgstr ""
10491
10492 #. type: Plain text
10493 #: build/C/man2/timerfd_create.2:560
10494 msgid ""
10495 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), "
10496 "B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), "
10497 "B<timer_settime>(2), B<epoll>(7), B<time>(7)"
10498 msgstr ""
10499
10500 #. type: TH
10501 #: build/C/man2/tkill.2:29
10502 #, no-wrap
10503 msgid "TKILL"
10504 msgstr ""
10505
10506 #. type: Plain text
10507 #: build/C/man2/tkill.2:32
10508 msgid "tkill, tgkill - send a signal to a thread"
10509 msgstr ""
10510
10511 #. type: Plain text
10512 #: build/C/man2/tkill.2:35
10513 #, no-wrap
10514 msgid "B<int tkill(int >I<tid>B<, int >I<sig>B<);>\n"
10515 msgstr ""
10516
10517 #. type: Plain text
10518 #: build/C/man2/tkill.2:37
10519 #, no-wrap
10520 msgid "B<int tgkill(int >I<tgid>B<, int >I<tid>B<, int >I<sig>B<);>\n"
10521 msgstr ""
10522
10523 #. type: Plain text
10524 #: build/C/man2/tkill.2:54
10525 msgid ""
10526 "B<tgkill>()  sends the signal I<sig> to the thread with the thread ID I<tid> "
10527 "in the thread group I<tgid>.  (By contrast, B<kill>(2)  can be used to send "
10528 "a signal only to a process (i.e., thread group)  as a whole, and the signal "
10529 "will be delivered to an arbitrary thread within that process.)"
10530 msgstr ""
10531
10532 #.  FIXME Maybe say something about the following:
10533 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=12889
10534 #.      Rich Felker <bugdal@aerifal.cx>
10535 #.      There is a race condition in pthread_kill: it is possible that,
10536 #.      between the time pthread_kill reads the pid/tid from the target
10537 #.      thread descriptor and the time it makes the tgkill syscall,
10538 #.      the target thread terminates and the same tid gets assigned
10539 #.      to a new thread in the same process.
10540 #
10541 #.      (The tgkill syscall was designed to eliminate a similar race
10542 #.      condition in tkill, but it only succeeded in eliminating races
10543 #.      where the tid gets reused in a different process, and does not
10544 #.      help if the same tid gets assigned to a new thread in the
10545 #.      same process.)
10546 #
10547 #.      The only solution I can see is to introduce a mutex that ensures
10548 #.      that a thread cannot exit while pthread_kill is being called on it.
10549 #
10550 #.      Note that in most real-world situations, like almost all race
10551 #.      conditions, this one will be extremely rare. To make it
10552 #.      measurable, one could exhaust all but 1-2 available pid values,
10553 #.      possibly by lowering the max pid parameter in /proc, forcing
10554 #.      the same tid to be reused rapidly.
10555 #. type: Plain text
10556 #: build/C/man2/tkill.2:85
10557 msgid ""
10558 "B<tkill>()  is an obsolete predecessor to B<tgkill>().  It allows only the "
10559 "target thread ID to be specified, which may result in the wrong thread being "
10560 "signaled if a thread terminates and its thread ID is recycled.  Avoid using "
10561 "this system call."
10562 msgstr ""
10563
10564 #. type: Plain text
10565 #: build/C/man2/tkill.2:88
10566 msgid ""
10567 "These are the raw system call interfaces, meant for internal thread library "
10568 "use."
10569 msgstr ""
10570
10571 #. type: Plain text
10572 #: build/C/man2/tkill.2:96
10573 msgid "An invalid thread ID, thread group ID, or signal was specified."
10574 msgstr ""
10575
10576 #. type: Plain text
10577 #: build/C/man2/tkill.2:101
10578 msgid "Permission denied.  For the required permissions, see B<kill>(2)."
10579 msgstr ""
10580
10581 #. type: Plain text
10582 #: build/C/man2/tkill.2:104
10583 msgid "No process with the specified thread ID (and thread group ID) exists."
10584 msgstr ""
10585
10586 #. type: Plain text
10587 #: build/C/man2/tkill.2:109
10588 msgid ""
10589 "B<tkill>()  is supported since Linux 2.4.19 / 2.5.4.  B<tgkill>()  was added "
10590 "in Linux 2.5.75."
10591 msgstr ""
10592
10593 #. type: Plain text
10594 #: build/C/man2/tkill.2:115
10595 msgid ""
10596 "B<tkill>()  and B<tgkill>()  are Linux-specific and should not be used in "
10597 "programs that are intended to be portable."
10598 msgstr ""
10599
10600 #. type: Plain text
10601 #: build/C/man2/tkill.2:121
10602 msgid ""
10603 "See the description of B<CLONE_THREAD> in B<clone>(2)  for an explanation of "
10604 "thread groups."
10605 msgstr ""
10606
10607 #. type: Plain text
10608 #: build/C/man2/tkill.2:124
10609 msgid ""
10610 "Glibc does not provide wrappers for these system calls; call them using "
10611 "B<syscall>(2)."
10612 msgstr ""
10613
10614 #. type: Plain text
10615 #: build/C/man2/tkill.2:129
10616 msgid "B<clone>(2), B<gettid>(2), B<kill>(2), B<rt_sigqueueinfo>(2)"
10617 msgstr ""
10618
10619 #. type: TH
10620 #: build/C/man2/wait.2:49
10621 #, no-wrap
10622 msgid "WAIT"
10623 msgstr ""
10624
10625 #. type: Plain text
10626 #: build/C/man2/wait.2:52
10627 msgid "wait, waitpid, waitid - wait for process to change state"
10628 msgstr ""
10629
10630 #. type: Plain text
10631 #: build/C/man2/wait.2:54
10632 msgid "B<#include E<lt>sys/types.hE<gt>>"
10633 msgstr ""
10634
10635 #. type: Plain text
10636 #: build/C/man2/wait.2:56
10637 msgid "B<#include E<lt>sys/wait.hE<gt>>"
10638 msgstr ""
10639
10640 #. type: Plain text
10641 #: build/C/man2/wait.2:58
10642 msgid "B<pid_t wait(int *>I<status>B<);>"
10643 msgstr ""
10644
10645 #. type: Plain text
10646 #: build/C/man2/wait.2:60
10647 msgid "B<pid_t waitpid(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<);>"
10648 msgstr ""
10649
10650 #. type: Plain text
10651 #: build/C/man2/wait.2:65
10652 #, no-wrap
10653 msgid ""
10654 "B<int waitid(idtype_t >I<idtype>B<, id_t >I<id>B<, siginfo_t *>I<infop>B<, "
10655 "int >I<options>B<);>\n"
10656 "                /* This is the glibc and POSIX interface; see\n"
10657 "                   NOTES for information on the raw system call. */\n"
10658 msgstr ""
10659
10660 #. type: Plain text
10661 #: build/C/man2/wait.2:74
10662 msgid "B<waitid>():"
10663 msgstr ""
10664
10665 #. type: Plain text
10666 #: build/C/man2/wait.2:78
10667 msgid ""
10668 "_SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
10669 "_XOPEN_SOURCE_EXTENDED"
10670 msgstr ""
10671
10672 #. type: Plain text
10673 #: build/C/man2/wait.2:93
10674 msgid ""
10675 "All of these system calls are used to wait for state changes in a child of "
10676 "the calling process, and obtain information about the child whose state has "
10677 "changed.  A state change is considered to be: the child terminated; the "
10678 "child was stopped by a signal; or the child was resumed by a signal.  In the "
10679 "case of a terminated child, performing a wait allows the system to release "
10680 "the resources associated with the child; if a wait is not performed, then "
10681 "the terminated child remains in a \"zombie\" state (see NOTES below)."
10682 msgstr ""
10683
10684 #. type: Plain text
10685 #: build/C/man2/wait.2:105
10686 msgid ""
10687 "If a child has already changed state, then these calls return immediately.  "
10688 "Otherwise, they block until either a child changes state or a signal handler "
10689 "interrupts the call (assuming that system calls are not automatically "
10690 "restarted using the B<SA_RESTART> flag of B<sigaction>(2)).  In the "
10691 "remainder of this page, a child whose state has changed and which has not "
10692 "yet been waited upon by one of these system calls is termed I<waitable>."
10693 msgstr ""
10694
10695 #. type: SS
10696 #: build/C/man2/wait.2:105
10697 #, no-wrap
10698 msgid "wait() and waitpid()"
10699 msgstr ""
10700
10701 #. type: Plain text
10702 #: build/C/man2/wait.2:113
10703 msgid ""
10704 "The B<wait>()  system call suspends execution of the calling process until "
10705 "one of its children terminates.  The call I<wait(&status)> is equivalent to:"
10706 msgstr ""
10707
10708 #. type: Plain text
10709 #: build/C/man2/wait.2:116
10710 #, no-wrap
10711 msgid "    waitpid(-1, &status, 0);\n"
10712 msgstr ""
10713
10714 #. type: Plain text
10715 #: build/C/man2/wait.2:130
10716 msgid ""
10717 "The B<waitpid>()  system call suspends execution of the calling process "
10718 "until a child specified by I<pid> argument has changed state.  By default, "
10719 "B<waitpid>()  waits only for terminated children, but this behavior is "
10720 "modifiable via the I<options> argument, as described below."
10721 msgstr ""
10722
10723 #. type: Plain text
10724 #: build/C/man2/wait.2:134
10725 msgid "The value of I<pid> can be:"
10726 msgstr ""
10727
10728 #. type: IP
10729 #: build/C/man2/wait.2:134
10730 #, no-wrap
10731 msgid "E<lt> -1"
10732 msgstr ""
10733
10734 #. type: Plain text
10735 #: build/C/man2/wait.2:138
10736 msgid ""
10737 "meaning wait for any child process whose process group ID is equal to the "
10738 "absolute value of I<pid>."
10739 msgstr ""
10740
10741 #. type: IP
10742 #: build/C/man2/wait.2:138
10743 #, no-wrap
10744 msgid "-1"
10745 msgstr ""
10746
10747 #. type: Plain text
10748 #: build/C/man2/wait.2:140
10749 msgid "meaning wait for any child process."
10750 msgstr ""
10751
10752 #. type: IP
10753 #: build/C/man2/wait.2:140
10754 #, no-wrap
10755 msgid "0"
10756 msgstr ""
10757
10758 #. type: Plain text
10759 #: build/C/man2/wait.2:143
10760 msgid ""
10761 "meaning wait for any child process whose process group ID is equal to that "
10762 "of the calling process."
10763 msgstr ""
10764
10765 #. type: IP
10766 #: build/C/man2/wait.2:143
10767 #, no-wrap
10768 msgid "E<gt> 0"
10769 msgstr ""
10770
10771 #. type: Plain text
10772 #: build/C/man2/wait.2:147
10773 msgid "meaning wait for the child whose process ID is equal to the value of I<pid>."
10774 msgstr ""
10775
10776 #. type: Plain text
10777 #: build/C/man2/wait.2:151
10778 msgid "The value of I<options> is an OR of zero or more of the following constants:"
10779 msgstr ""
10780
10781 #. type: TP
10782 #: build/C/man2/wait.2:151 build/C/man2/wait.2:280
10783 #, no-wrap
10784 msgid "B<WNOHANG>"
10785 msgstr ""
10786
10787 #. type: Plain text
10788 #: build/C/man2/wait.2:154
10789 msgid "return immediately if no child has exited."
10790 msgstr ""
10791
10792 #. type: TP
10793 #: build/C/man2/wait.2:154
10794 #, no-wrap
10795 msgid "B<WUNTRACED>"
10796 msgstr ""
10797
10798 #. type: Plain text
10799 #: build/C/man2/wait.2:163
10800 msgid ""
10801 "also return if a child has stopped (but not traced via B<ptrace>(2)).  "
10802 "Status for I<traced> children which have stopped is provided even if this "
10803 "option is not specified."
10804 msgstr ""
10805
10806 #. type: TP
10807 #: build/C/man2/wait.2:163
10808 #, no-wrap
10809 msgid "B<WCONTINUED> (since Linux 2.6.10)"
10810 msgstr ""
10811
10812 #. type: Plain text
10813 #: build/C/man2/wait.2:167
10814 msgid "also return if a stopped child has been resumed by delivery of B<SIGCONT>."
10815 msgstr ""
10816
10817 #. type: Plain text
10818 #: build/C/man2/wait.2:169
10819 msgid "(For Linux-only options, see below.)"
10820 msgstr ""
10821
10822 #. type: Plain text
10823 #: build/C/man2/wait.2:183
10824 msgid ""
10825 "If I<status> is not NULL, B<wait>()  and B<waitpid>()  store status "
10826 "information in the I<int> to which it points.  This integer can be inspected "
10827 "with the following macros (which take the integer itself as an argument, not "
10828 "a pointer to it, as is done in B<wait>()  and B<waitpid>()!):"
10829 msgstr ""
10830
10831 #. type: TP
10832 #: build/C/man2/wait.2:183
10833 #, no-wrap
10834 msgid "B<WIFEXITED(>I<status>B<)>"
10835 msgstr ""
10836
10837 #. type: Plain text
10838 #: build/C/man2/wait.2:191
10839 msgid ""
10840 "returns true if the child terminated normally, that is, by calling "
10841 "B<exit>(3)  or B<_exit>(2), or by returning from main()."
10842 msgstr ""
10843
10844 #. type: TP
10845 #: build/C/man2/wait.2:191
10846 #, no-wrap
10847 msgid "B<WEXITSTATUS(>I<status>B<)>"
10848 msgstr ""
10849
10850 #. type: Plain text
10851 #: build/C/man2/wait.2:204
10852 msgid ""
10853 "returns the exit status of the child.  This consists of the least "
10854 "significant 8 bits of the I<status> argument that the child specified in a "
10855 "call to B<exit>(3)  or B<_exit>(2)  or as the argument for a return "
10856 "statement in main().  This macro should be employed only if B<WIFEXITED> "
10857 "returned true."
10858 msgstr ""
10859
10860 #. type: TP
10861 #: build/C/man2/wait.2:204
10862 #, no-wrap
10863 msgid "B<WIFSIGNALED(>I<status>B<)>"
10864 msgstr ""
10865
10866 #. type: Plain text
10867 #: build/C/man2/wait.2:207
10868 msgid "returns true if the child process was terminated by a signal."
10869 msgstr ""
10870
10871 #. type: TP
10872 #: build/C/man2/wait.2:207
10873 #, no-wrap
10874 msgid "B<WTERMSIG(>I<status>B<)>"
10875 msgstr ""
10876
10877 #. type: Plain text
10878 #: build/C/man2/wait.2:214
10879 msgid ""
10880 "returns the number of the signal that caused the child process to "
10881 "terminate.  This macro should be employed only if B<WIFSIGNALED> returned "
10882 "true."
10883 msgstr ""
10884
10885 #. type: TP
10886 #: build/C/man2/wait.2:214
10887 #, no-wrap
10888 msgid "B<WCOREDUMP(>I<status>B<)>"
10889 msgstr ""
10890
10891 #. type: Plain text
10892 #: build/C/man2/wait.2:223
10893 msgid ""
10894 "returns true if the child produced a core dump.  This macro should be "
10895 "employed only if B<WIFSIGNALED> returned true.  This macro is not specified "
10896 "in POSIX.1-2001 and is not available on some UNIX implementations (e.g., "
10897 "AIX, SunOS).  Only use this enclosed in #ifdef WCOREDUMP ... #endif."
10898 msgstr ""
10899
10900 #. type: TP
10901 #: build/C/man2/wait.2:223
10902 #, no-wrap
10903 msgid "B<WIFSTOPPED(>I<status>B<)>"
10904 msgstr ""
10905
10906 #. type: Plain text
10907 #: build/C/man2/wait.2:230
10908 msgid ""
10909 "returns true if the child process was stopped by delivery of a signal; this "
10910 "is possible only if the call was done using B<WUNTRACED> or when the child "
10911 "is being traced (see B<ptrace>(2))."
10912 msgstr ""
10913
10914 #. type: TP
10915 #: build/C/man2/wait.2:230
10916 #, no-wrap
10917 msgid "B<WSTOPSIG(>I<status>B<)>"
10918 msgstr ""
10919
10920 #. type: Plain text
10921 #: build/C/man2/wait.2:236
10922 msgid ""
10923 "returns the number of the signal which caused the child to stop.  This macro "
10924 "should be employed only if B<WIFSTOPPED> returned true."
10925 msgstr ""
10926
10927 #. type: TP
10928 #: build/C/man2/wait.2:236
10929 #, no-wrap
10930 msgid "B<WIFCONTINUED(>I<status>B<)>"
10931 msgstr ""
10932
10933 #. type: Plain text
10934 #: build/C/man2/wait.2:241
10935 msgid ""
10936 "(since Linux 2.6.10)  returns true if the child process was resumed by "
10937 "delivery of B<SIGCONT>."
10938 msgstr ""
10939
10940 #. type: SS
10941 #: build/C/man2/wait.2:241
10942 #, no-wrap
10943 msgid "waitid()"
10944 msgstr ""
10945
10946 #. type: Plain text
10947 #: build/C/man2/wait.2:246
10948 msgid ""
10949 "The B<waitid>()  system call (available since Linux 2.6.9) provides more "
10950 "precise control over which child state changes to wait for."
10951 msgstr ""
10952
10953 #. type: Plain text
10954 #: build/C/man2/wait.2:252
10955 msgid ""
10956 "The I<idtype> and I<id> arguments select the child(ren) to wait for, as "
10957 "follows:"
10958 msgstr ""
10959
10960 #. type: IP
10961 #: build/C/man2/wait.2:252
10962 #, no-wrap
10963 msgid "I<idtype> == B<P_PID>"
10964 msgstr ""
10965
10966 #. type: Plain text
10967 #: build/C/man2/wait.2:255
10968 msgid "Wait for the child whose process ID matches I<id>."
10969 msgstr ""
10970
10971 #. type: IP
10972 #: build/C/man2/wait.2:255
10973 #, no-wrap
10974 msgid "I<idtype> == B<P_PGID>"
10975 msgstr ""
10976
10977 #. type: Plain text
10978 #: build/C/man2/wait.2:258
10979 msgid "Wait for any child whose process group ID matches I<id>."
10980 msgstr ""
10981
10982 #. type: IP
10983 #: build/C/man2/wait.2:258
10984 #, no-wrap
10985 msgid "I<idtype> == B<P_ALL>"
10986 msgstr ""
10987
10988 #. type: Plain text
10989 #: build/C/man2/wait.2:262
10990 msgid "Wait for any child; I<id> is ignored."
10991 msgstr ""
10992
10993 #. type: Plain text
10994 #: build/C/man2/wait.2:266
10995 msgid ""
10996 "The child state changes to wait for are specified by ORing one or more of "
10997 "the following flags in I<options>:"
10998 msgstr ""
10999
11000 #. type: TP
11001 #: build/C/man2/wait.2:266
11002 #, no-wrap
11003 msgid "B<WEXITED>"
11004 msgstr ""
11005
11006 #. type: Plain text
11007 #: build/C/man2/wait.2:269
11008 msgid "Wait for children that have terminated."
11009 msgstr ""
11010
11011 #. type: TP
11012 #: build/C/man2/wait.2:269
11013 #, no-wrap
11014 msgid "B<WSTOPPED>"
11015 msgstr ""
11016
11017 #. type: Plain text
11018 #: build/C/man2/wait.2:272
11019 msgid "Wait for children that have been stopped by delivery of a signal."
11020 msgstr ""
11021
11022 #. type: TP
11023 #: build/C/man2/wait.2:272
11024 #, no-wrap
11025 msgid "B<WCONTINUED>"
11026 msgstr ""
11027
11028 #. type: Plain text
11029 #: build/C/man2/wait.2:277
11030 msgid ""
11031 "Wait for (previously stopped) children that have been resumed by delivery of "
11032 "B<SIGCONT>."
11033 msgstr ""
11034
11035 #. type: Plain text
11036 #: build/C/man2/wait.2:280
11037 msgid "The following flags may additionally be ORed in I<options>:"
11038 msgstr ""
11039
11040 #. type: Plain text
11041 #: build/C/man2/wait.2:284
11042 msgid "As for B<waitpid>()."
11043 msgstr ""
11044
11045 #. type: TP
11046 #: build/C/man2/wait.2:284
11047 #, no-wrap
11048 msgid "B<WNOWAIT>"
11049 msgstr ""
11050
11051 #. type: Plain text
11052 #: build/C/man2/wait.2:288
11053 msgid ""
11054 "Leave the child in a waitable state; a later wait call can be used to again "
11055 "retrieve the child status information."
11056 msgstr ""
11057
11058 #. type: Plain text
11059 #: build/C/man2/wait.2:295
11060 msgid ""
11061 "Upon successful return, B<waitid>()  fills in the following fields of the "
11062 "I<siginfo_t> structure pointed to by I<infop>:"
11063 msgstr ""
11064
11065 #. type: Plain text
11066 #: build/C/man2/wait.2:298
11067 msgid "The process ID of the child."
11068 msgstr ""
11069
11070 #. type: Plain text
11071 #: build/C/man2/wait.2:302
11072 msgid ""
11073 "The real user ID of the child.  (This field is not set on most other "
11074 "implementations.)"
11075 msgstr ""
11076
11077 #. type: Plain text
11078 #: build/C/man2/wait.2:306
11079 msgid "Always set to B<SIGCHLD>."
11080 msgstr ""
11081
11082 #. type: TP
11083 #: build/C/man2/wait.2:306
11084 #, no-wrap
11085 msgid "I<si_status>"
11086 msgstr ""
11087
11088 #. type: Plain text
11089 #: build/C/man2/wait.2:316
11090 msgid ""
11091 "Either the exit status of the child, as given to B<_exit>(2)  (or "
11092 "B<exit>(3)), or the signal that caused the child to terminate, stop, or "
11093 "continue.  The I<si_code> field can be used to determine how to interpret "
11094 "this field."
11095 msgstr ""
11096
11097 #. type: Plain text
11098 #: build/C/man2/wait.2:333
11099 msgid ""
11100 "Set to one of: B<CLD_EXITED> (child called B<_exit>(2)); B<CLD_KILLED> "
11101 "(child killed by signal); B<CLD_DUMPED> (child killed by signal, and dumped "
11102 "core); B<CLD_STOPPED> (child stopped by signal); B<CLD_TRAPPED> (traced "
11103 "child has trapped); or B<CLD_CONTINUED> (child continued by B<SIGCONT>)."
11104 msgstr ""
11105
11106 #.  POSIX.1-2001 leaves this possibility unspecified; most
11107 #.  implementations (including Linux) zero out the structure
11108 #.  in this case, but at least one implementation (AIX 5.1)
11109 #.  does not -- MTK Nov 04
11110 #. type: Plain text
11111 #: build/C/man2/wait.2:355
11112 msgid ""
11113 "If B<WNOHANG> was specified in I<options> and there were no children in a "
11114 "waitable state, then B<waitid>()  returns 0 immediately and the state of the "
11115 "I<siginfo_t> structure pointed to by I<infop> is unspecified.  To "
11116 "distinguish this case from that where a child was in a waitable state, zero "
11117 "out the I<si_pid> field before the call and check for a nonzero value in "
11118 "this field after the call returns."
11119 msgstr ""
11120
11121 #. type: Plain text
11122 #: build/C/man2/wait.2:359
11123 msgid ""
11124 "B<wait>(): on success, returns the process ID of the terminated child; on "
11125 "error, -1 is returned."
11126 msgstr ""
11127
11128 #. type: Plain text
11129 #: build/C/man2/wait.2:368
11130 msgid ""
11131 "B<waitpid>(): on success, returns the process ID of the child whose state "
11132 "has changed; if B<WNOHANG> was specified and one or more child(ren) "
11133 "specified by I<pid> exist, but have not yet changed state, then 0 is "
11134 "returned.  On error, -1 is returned."
11135 msgstr ""
11136
11137 #.  FIXME As reported by Vegard Nossum, if infop is NULL, then waitid()
11138 #.  returns the PID of the child.  Either this is a bug, or it is intended
11139 #.  behavior that needs to be documented.  See my Jan 2009 LKML mail
11140 #.  "waitid() return value strangeness when infop is NULL".
11141 #. type: Plain text
11142 #: build/C/man2/wait.2:381
11143 msgid ""
11144 "B<waitid>(): returns 0 on success or if B<WNOHANG> was specified and no "
11145 "child(ren) specified by I<id> has yet changed state; on error, -1 is "
11146 "returned."
11147 msgstr ""
11148
11149 #. type: Plain text
11150 #: build/C/man2/wait.2:385
11151 msgid ""
11152 "Each of these calls sets I<errno> to an appropriate value in the case of an "
11153 "error."
11154 msgstr ""
11155
11156 #. type: TP
11157 #: build/C/man2/wait.2:386 build/C/man2/wait.2:391
11158 #, no-wrap
11159 msgid "B<ECHILD>"
11160 msgstr ""
11161
11162 #. type: Plain text
11163 #: build/C/man2/wait.2:391
11164 msgid ""
11165 "(for B<wait>())  The calling process does not have any unwaited-for "
11166 "children."
11167 msgstr ""
11168
11169 #. type: Plain text
11170 #: build/C/man2/wait.2:411
11171 msgid ""
11172 "(for B<waitpid>()  or B<waitid>())  The process specified by I<pid> "
11173 "(B<waitpid>())  or I<idtype> and I<id> (B<waitid>())  does not exist or is "
11174 "not a child of the calling process.  (This can happen for one's own child if "
11175 "the action for B<SIGCHLD> is set to B<SIG_IGN>.  See also the I<Linux Notes> "
11176 "section about threads.)"
11177 msgstr ""
11178
11179 #. type: Plain text
11180 #: build/C/man2/wait.2:418
11181 msgid ""
11182 "B<WNOHANG> was not set and an unblocked signal or a B<SIGCHLD> was caught; "
11183 "see B<signal>(7)."
11184 msgstr ""
11185
11186 #. type: Plain text
11187 #: build/C/man2/wait.2:423
11188 msgid "The I<options> argument was invalid."
11189 msgstr ""
11190
11191 #. type: Plain text
11192 #: build/C/man2/wait.2:438
11193 msgid ""
11194 "A child that terminates, but has not been waited for becomes a \"zombie\".  "
11195 "The kernel maintains a minimal set of information about the zombie process "
11196 "(PID, termination status, resource usage information)  in order to allow the "
11197 "parent to later perform a wait to obtain information about the child.  As "
11198 "long as a zombie is not removed from the system via a wait, it will consume "
11199 "a slot in the kernel process table, and if this table fills, it will not be "
11200 "possible to create further processes.  If a parent process terminates, then "
11201 "its \"zombie\" children (if any)  are adopted by B<init>(1), which "
11202 "automatically performs a wait to remove the zombies."
11203 msgstr ""
11204
11205 #. type: Plain text
11206 #: build/C/man2/wait.2:467
11207 msgid ""
11208 "POSIX.1-2001 specifies that if the disposition of B<SIGCHLD> is set to "
11209 "B<SIG_IGN> or the B<SA_NOCLDWAIT> flag is set for B<SIGCHLD> (see "
11210 "B<sigaction>(2)), then children that terminate do not become zombies and a "
11211 "call to B<wait>()  or B<waitpid>()  will block until all children have "
11212 "terminated, and then fail with I<errno> set to B<ECHILD>.  (The original "
11213 "POSIX standard left the behavior of setting B<SIGCHLD> to B<SIG_IGN> "
11214 "unspecified.  Note that even though the default disposition of B<SIGCHLD> is "
11215 "\"ignore\", explicitly setting the disposition to B<SIG_IGN> results in "
11216 "different treatment of zombie process children.)"
11217 msgstr ""
11218
11219 #. type: Plain text
11220 #: build/C/man2/wait.2:480
11221 msgid ""
11222 "Linux 2.6 conforms to the POSIX requirements.  However, Linux 2.4 (and "
11223 "earlier) does not: if a B<wait>()  or B<waitpid>()  call is made while "
11224 "B<SIGCHLD> is being ignored, the call behaves just as though B<SIGCHLD> were "
11225 "not being ignored, that is, the call blocks until the next child terminates "
11226 "and then returns the process ID and status of that child."
11227 msgstr ""
11228
11229 #. type: Plain text
11230 #: build/C/man2/wait.2:496
11231 msgid ""
11232 "In the Linux kernel, a kernel-scheduled thread is not a distinct construct "
11233 "from a process.  Instead, a thread is simply a process that is created using "
11234 "the Linux-unique B<clone>(2)  system call; other routines such as the "
11235 "portable B<pthread_create>(3)  call are implemented using B<clone>(2).  "
11236 "Before Linux 2.4, a thread was just a special case of a process, and as a "
11237 "consequence one thread could not wait on the children of another thread, "
11238 "even when the latter belongs to the same thread group.  However, POSIX "
11239 "prescribes such functionality, and since Linux 2.4 a thread can, and by "
11240 "default will, wait on children of other threads in the same thread group."
11241 msgstr ""
11242
11243 #. type: Plain text
11244 #: build/C/man2/wait.2:503
11245 msgid ""
11246 "The following Linux-specific I<options> are for use with children created "
11247 "using B<clone>(2); they cannot be used with B<waitid>():"
11248 msgstr ""
11249
11250 #. type: TP
11251 #: build/C/man2/wait.2:503
11252 #, no-wrap
11253 msgid "B<__WCLONE>"
11254 msgstr ""
11255
11256 #.  since 0.99pl10
11257 #. type: Plain text
11258 #: build/C/man2/wait.2:514
11259 msgid ""
11260 "Wait for \"clone\" children only.  If omitted, then wait for \"non-clone\" "
11261 "children only.  (A \"clone\" child is one which delivers no signal, or a "
11262 "signal other than B<SIGCHLD> to its parent upon termination.)  This option "
11263 "is ignored if B<__WALL> is also specified."
11264 msgstr ""
11265
11266 #. type: TP
11267 #: build/C/man2/wait.2:514
11268 #, no-wrap
11269 msgid "B<__WALL> (since Linux 2.4)"
11270 msgstr ""
11271
11272 #.  since patch-2.3.48
11273 #. type: Plain text
11274 #: build/C/man2/wait.2:519
11275 msgid "Wait for all children, regardless of type (\"clone\" or \"non-clone\")."
11276 msgstr ""
11277
11278 #. type: TP
11279 #: build/C/man2/wait.2:519
11280 #, no-wrap
11281 msgid "B<__WNOTHREAD> (since Linux 2.4)"
11282 msgstr ""
11283
11284 #.  since patch-2.4.0-test8
11285 #. type: Plain text
11286 #: build/C/man2/wait.2:525
11287 msgid ""
11288 "Do not wait for children of other threads in the same thread group.  This "
11289 "was the default before Linux 2.4."
11290 msgstr ""
11291
11292 #. type: Plain text
11293 #: build/C/man2/wait.2:537
11294 msgid ""
11295 "The raw B<waitid>()  system call takes a fifth argument, of type I<struct "
11296 "rusage\\ *>.  If this argument is non-NULL, then it is used to return "
11297 "resource usage information about the child, in the same manner as "
11298 "B<wait4>(2).  See B<getrusage>(2)  for details."
11299 msgstr ""
11300
11301 #. type: Plain text
11302 #: build/C/man2/wait.2:552
11303 msgid ""
11304 "According to POSIX.1-2008, an application calling B<waitid>()  must ensure "
11305 "that I<infop> points to a I<siginfo_t> structure (i.e., that it is a "
11306 "non-null pointer).  On Linux, if I<infop> is NULL, B<waitid>()  succeeds, "
11307 "and returns the process ID of the waited-for child.  Applications should "
11308 "avoid relying on this inconsistent, nonstandard, and unnecessary feature."
11309 msgstr ""
11310
11311 #.  fork.2 refers to this example program.
11312 #. type: Plain text
11313 #: build/C/man2/wait.2:569
11314 msgid ""
11315 "The following program demonstrates the use of B<fork>(2)  and B<waitpid>().  "
11316 "The program creates a child process.  If no command-line argument is "
11317 "supplied to the program, then the child suspends its execution using "
11318 "B<pause>(2), to allow the user to send signals to the child.  Otherwise, if "
11319 "a command-line argument is supplied, then the child exits immediately, using "
11320 "the integer supplied on the command line as the exit status.  The parent "
11321 "process executes a loop that monitors the child using B<waitpid>(), and uses "
11322 "the W*() macros described above to analyze the wait status value."
11323 msgstr ""
11324
11325 #. type: Plain text
11326 #: build/C/man2/wait.2:585
11327 #, no-wrap
11328 msgid ""
11329 "$B< ./a.out &>\n"
11330 "Child PID is 32360\n"
11331 "[1] 32359\n"
11332 "$B< kill -STOP 32360>\n"
11333 "stopped by signal 19\n"
11334 "$B< kill -CONT 32360>\n"
11335 "continued\n"
11336 "$B< kill -TERM 32360>\n"
11337 "killed by signal 15\n"
11338 "[1]+  Done                    ./a.out\n"
11339 "$\n"
11340 msgstr ""
11341
11342 #. type: Plain text
11343 #: build/C/man2/wait.2:594
11344 #, no-wrap
11345 msgid ""
11346 "#include E<lt>sys/wait.hE<gt>\n"
11347 "#include E<lt>stdlib.hE<gt>\n"
11348 "#include E<lt>unistd.hE<gt>\n"
11349 "#include E<lt>stdio.hE<gt>\n"
11350 msgstr ""
11351
11352 #. type: Plain text
11353 #: build/C/man2/wait.2:600
11354 #, no-wrap
11355 msgid ""
11356 "int\n"
11357 "main(int argc, char *argv[])\n"
11358 "{\n"
11359 "    pid_t cpid, w;\n"
11360 "    int status;\n"
11361 msgstr ""
11362
11363 #. type: Plain text
11364 #: build/C/man2/wait.2:606
11365 #, no-wrap
11366 msgid ""
11367 "    cpid = fork();\n"
11368 "    if (cpid == -1) {\n"
11369 "        perror(\"fork\");\n"
11370 "        exit(EXIT_FAILURE);\n"
11371 "    }\n"
11372 msgstr ""
11373
11374 #. type: Plain text
11375 #: build/C/man2/wait.2:612
11376 #, no-wrap
11377 msgid ""
11378 "    if (cpid == 0) {            /* Code executed by child */\n"
11379 "        printf(\"Child PID is %ld\\en\", (long) getpid());\n"
11380 "        if (argc == 1)\n"
11381 "            pause();                    /* Wait for signals */\n"
11382 "        _exit(atoi(argv[1]));\n"
11383 msgstr ""
11384
11385 #. type: Plain text
11386 #: build/C/man2/wait.2:620
11387 #, no-wrap
11388 msgid ""
11389 "    } else {                    /* Code executed by parent */\n"
11390 "        do {\n"
11391 "            w = waitpid(cpid, &status, WUNTRACED | WCONTINUED);\n"
11392 "            if (w == -1) {\n"
11393 "                perror(\"waitpid\");\n"
11394 "                exit(EXIT_FAILURE);\n"
11395 "            }\n"
11396 msgstr ""
11397
11398 #. type: Plain text
11399 #: build/C/man2/wait.2:634
11400 #, no-wrap
11401 msgid ""
11402 "            if (WIFEXITED(status)) {\n"
11403 "                printf(\"exited, status=%d\\en\", WEXITSTATUS(status));\n"
11404 "            } else if (WIFSIGNALED(status)) {\n"
11405 "                printf(\"killed by signal %d\\en\", WTERMSIG(status));\n"
11406 "            } else if (WIFSTOPPED(status)) {\n"
11407 "                printf(\"stopped by signal %d\\en\", WSTOPSIG(status));\n"
11408 "            } else if (WIFCONTINUED(status)) {\n"
11409 "                printf(\"continued\\en\");\n"
11410 "            }\n"
11411 "        } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n"
11412 "        exit(EXIT_SUCCESS);\n"
11413 "    }\n"
11414 "}\n"
11415 msgstr ""
11416
11417 #. type: Plain text
11418 #: build/C/man2/wait.2:647
11419 msgid ""
11420 "B<_exit>(2), B<clone>(2), B<fork>(2), B<kill>(2), B<ptrace>(2), "
11421 "B<sigaction>(2), B<signal>(2), B<wait4>(2), B<pthread_create>(3), "
11422 "B<credentials>(7), B<signal>(7)"
11423 msgstr ""
11424
11425 #. type: TH
11426 #: build/C/man2/wait4.2:33
11427 #, no-wrap
11428 msgid "WAIT4"
11429 msgstr ""
11430
11431 #. type: TH
11432 #: build/C/man2/wait4.2:33
11433 #, no-wrap
11434 msgid "2012-09-23"
11435 msgstr ""
11436
11437 #. type: Plain text
11438 #: build/C/man2/wait4.2:36
11439 msgid "wait3, wait4 - wait for process to change state, BSD style"
11440 msgstr ""
11441
11442 #. type: Plain text
11443 #: build/C/man2/wait4.2:42
11444 #, no-wrap
11445 msgid ""
11446 "B<#include E<lt>sys/types.hE<gt>>\n"
11447 "B<#include E<lt>sys/time.hE<gt>>\n"
11448 "B<#include E<lt>sys/resource.hE<gt>>\n"
11449 "B<#include E<lt>sys/wait.hE<gt>>\n"
11450 msgstr ""
11451
11452 #. type: Plain text
11453 #: build/C/man2/wait4.2:45
11454 #, no-wrap
11455 msgid ""
11456 "B<pid_t wait3(int *>I<status>B<, int >I<options>B<,>\n"
11457 "B<            struct rusage *>I<rusage>B<);>\n"
11458 msgstr ""
11459
11460 #. type: Plain text
11461 #: build/C/man2/wait4.2:48
11462 #, no-wrap
11463 msgid ""
11464 "B<pid_t wait4(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<,>\n"
11465 "B<            struct rusage *>I<rusage>B<);>\n"
11466 msgstr ""
11467
11468 #. type: Plain text
11469 #: build/C/man2/wait4.2:57
11470 msgid "B<wait3>():"
11471 msgstr ""
11472
11473 #. type: Plain text
11474 #: build/C/man2/wait4.2:63
11475 msgid "B<wait4>():"
11476 msgstr ""
11477
11478 #. type: Plain text
11479 #: build/C/man2/wait4.2:65
11480 msgid "_BSD_SOURCE"
11481 msgstr ""
11482
11483 #. type: Plain text
11484 #: build/C/man2/wait4.2:73
11485 msgid ""
11486 "These functions are obsolete; use B<waitpid>(2)  or B<waitid>(2)  in new "
11487 "programs."
11488 msgstr ""
11489
11490 #. type: Plain text
11491 #: build/C/man2/wait4.2:83
11492 msgid ""
11493 "The B<wait3>()  and B<wait4>()  system calls are similar to B<waitpid>(2), "
11494 "but additionally return resource usage information about the child in the "
11495 "structure pointed to by I<rusage>."
11496 msgstr ""
11497
11498 #. type: Plain text
11499 #: build/C/man2/wait4.2:89
11500 msgid ""
11501 "Other than the use of the I<rusage> argument, the following B<wait3>()  "
11502 "call:"
11503 msgstr ""
11504
11505 #. type: Plain text
11506 #: build/C/man2/wait4.2:92
11507 #, no-wrap
11508 msgid "    wait3(status, options, rusage);\n"
11509 msgstr ""
11510
11511 #. type: Plain text
11512 #: build/C/man2/wait4.2:95 build/C/man2/wait4.2:109
11513 msgid "is equivalent to:"
11514 msgstr ""
11515
11516 #. type: Plain text
11517 #: build/C/man2/wait4.2:98
11518 #, no-wrap
11519 msgid "    waitpid(-1, status, options);\n"
11520 msgstr ""
11521
11522 #. type: Plain text
11523 #: build/C/man2/wait4.2:103
11524 msgid "Similarly, the following B<wait4>()  call:"
11525 msgstr ""
11526
11527 #. type: Plain text
11528 #: build/C/man2/wait4.2:106
11529 #, no-wrap
11530 msgid "    wait4(pid, status, options, rusage);\n"
11531 msgstr ""
11532
11533 #. type: Plain text
11534 #: build/C/man2/wait4.2:112
11535 #, no-wrap
11536 msgid "    waitpid(pid, status, options);\n"
11537 msgstr ""
11538
11539 #. type: Plain text
11540 #: build/C/man2/wait4.2:122
11541 msgid ""
11542 "In other words, B<wait3>()  waits of any child, while B<wait4>()  can be "
11543 "used to select a specific child, or children, on which to wait.  See "
11544 "B<wait>(2)  for further details."
11545 msgstr ""
11546
11547 #. type: Plain text
11548 #: build/C/man2/wait4.2:132
11549 msgid ""
11550 "If I<rusage> is not NULL, the I<struct rusage> to which it points will be "
11551 "filled with accounting information about the child.  See B<getrusage>(2)  "
11552 "for details."
11553 msgstr ""
11554
11555 #. type: Plain text
11556 #: build/C/man2/wait4.2:135 build/C/man2/wait4.2:138
11557 msgid "As for B<waitpid>(2)."
11558 msgstr ""
11559
11560 #. type: Plain text
11561 #: build/C/man2/wait4.2:140
11562 msgid "4.3BSD."
11563 msgstr ""
11564
11565 #. type: Plain text
11566 #: build/C/man2/wait4.2:147
11567 msgid ""
11568 "SUSv1 included a specification of B<wait3>(); SUSv2 included B<wait3>(), but "
11569 "marked it LEGACY; SUSv3 removed it."
11570 msgstr ""
11571
11572 #. type: Plain text
11573 #: build/C/man2/wait4.2:159
11574 msgid ""
11575 "Including I<E<lt>sys/time.hE<gt>> is not required these days, but increases "
11576 "portability.  (Indeed, I<E<lt>sys/resource.hE<gt>> defines the I<rusage> "
11577 "structure with fields of type I<struct timeval> defined in "
11578 "I<E<lt>sys/time.hE<gt>>.)"
11579 msgstr ""
11580
11581 #. type: Plain text
11582 #: build/C/man2/wait4.2:165
11583 msgid ""
11584 "On Linux, B<wait3>()  is a library function implemented on top of the "
11585 "B<wait4>()  system call."
11586 msgstr ""
11587
11588 #. type: Plain text
11589 #: build/C/man2/wait4.2:172
11590 msgid ""
11591 "B<fork>(2), B<getrusage>(2), B<sigaction>(2), B<signal>(2), B<wait>(2), "
11592 "B<signal>(7)"
11593 msgstr ""