OSDN Git Service

LDP: Update POT and ja.po to LDP v3.68
[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: 2014-06-08 01:30+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:29 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:31 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:21 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:30 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:32 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:22 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:32 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:34 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:25 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:34 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:52 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:37 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:122 build/C/man2/kill.2:100 build/C/man2/killpg.2:89 build/C/man2/pause.2:42 build/C/man2/prctl.2:802 build/C/man3/profil.3:68 build/C/man3/psignal.3:89 build/C/man3/raise.3:61 build/C/man2/restart_syscall.2:84 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:660 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:53 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:167 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:287 build/C/man2/tkill.2:95 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:127 build/C/man2/kill.2:105 build/C/man2/killpg.2:94 build/C/man2/pause.2:53 build/C/man2/prctl.2:822 build/C/man2/restart_syscall.2:88 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:665 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:126 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:175 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:302 build/C/man2/tkill.2:99 build/C/man2/wait.2:384 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/sigpause.3:56 build/C/man3/sigqueue.3:114 build/C/man3/sigsetops.3:131 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/sigpause.3:57 build/C/man3/sigqueue.3:115 build/C/man3/sigsetops.3:132 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:148 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:1068 build/C/man3/profil.3:70 build/C/man3/psignal.3:99 build/C/man3/raise.3:69 build/C/man2/restart_syscall.2:96 build/C/man2/rt_sigqueueinfo.2:176 build/C/man2/s390_runtime_instr.2:81 build/C/man2/sgetmask.2:66 build/C/man2/sigaction.2:677 build/C/man2/sigaltstack.2:158 build/C/man7/sigevent.7:130 build/C/man3/siginterrupt.3:87 build/C/man2/signal.2:110 build/C/man7/signal.7:838 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:60 build/C/man3/sigset.3:173 build/C/man3/sigsetops.3:144 build/C/man2/sigsuspend.2:84 build/C/man3/sigvec.3:234 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:193 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:371 build/C/man2/tkill.2:116 build/C/man2/wait.2:422 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:158 build/C/man2/kill.2:123 build/C/man2/killpg.2:115 build/C/man3/raise.3:71 build/C/man2/restart_syscall.2:98 build/C/man2/rt_sigqueueinfo.2:178 build/C/man2/s390_runtime_instr.2:84 build/C/man2/sgetmask.2:68 build/C/man2/sigaction.2:680 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:64 build/C/man3/sigset.3:190 build/C/man3/sigsetops.3:146 build/C/man2/sigsuspend.2:86 build/C/man3/sigvec.3:240 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:195 build/C/man2/timer_getoverrun.2:99 build/C/man2/tkill.2:122 build/C/man2/wait.2:424 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:239 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:1082 build/C/man3/profil.3:81 build/C/man3/psignal.3:113 build/C/man3/raise.3:82 build/C/man2/restart_syscall.2:123 build/C/man2/rt_sigqueueinfo.2:188 build/C/man2/s390_runtime_instr.2:88 build/C/man2/sgetmask.2:82 build/C/man2/sigaction.2:793 build/C/man2/sigaltstack.2:234 build/C/man7/sigevent.7:132 build/C/man3/siginterrupt.3:96 build/C/man2/signal.2:278 build/C/man7/signal.7:850 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:74 build/C/man3/sigset.3:266 build/C/man3/sigsetops.3:185 build/C/man2/sigsuspend.2:108 build/C/man3/sigvec.3:265 build/C/man3/sigwait.3:94 build/C/man2/sigwaitinfo.2:187 build/C/man3/sysv_signal.3:92 build/C/man2/timer_create.2:407 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:541 build/C/man2/tkill.2:131 build/C/man2/wait.2:634 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:246 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:1085 build/C/man3/profil.3:86 build/C/man3/psignal.3:118 build/C/man3/raise.3:89 build/C/man2/restart_syscall.2:131 build/C/man2/rt_sigqueueinfo.2:196 build/C/man2/s390_runtime_instr.2:91 build/C/man2/sgetmask.2:85 build/C/man2/sigaction.2:813 build/C/man2/sigaltstack.2:241 build/C/man7/sigevent.7:142 build/C/man3/siginterrupt.3:98 build/C/man2/signal.2:297 build/C/man7/signal.7:884 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:80 build/C/man3/sigset.3:276 build/C/man3/sigsetops.3:190 build/C/man2/sigsuspend.2:118 build/C/man3/sigvec.3:275 build/C/man3/sigwait.3:102 build/C/man2/sigwaitinfo.2:199 build/C/man3/sysv_signal.3:97 build/C/man2/timer_create.2:422 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:553 build/C/man2/tkill.2:136 build/C/man2/wait.2:646 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:254 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:1093 build/C/man3/profil.3:94 build/C/man3/psignal.3:126 build/C/man3/raise.3:97 build/C/man2/restart_syscall.2:139 build/C/man2/rt_sigqueueinfo.2:204 build/C/man2/s390_runtime_instr.2:99 build/C/man2/sgetmask.2:93 build/C/man2/sigaction.2:821 build/C/man2/sigaltstack.2:249 build/C/man7/sigevent.7:150 build/C/man3/siginterrupt.3:106 build/C/man2/signal.2:305 build/C/man7/signal.7:892 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:88 build/C/man3/sigset.3:284 build/C/man3/sigsetops.3:198 build/C/man2/sigsuspend.2:126 build/C/man3/sigvec.3:283 build/C/man3/sigwait.3:110 build/C/man2/sigwaitinfo.2:207 build/C/man3/sysv_signal.3:105 build/C/man2/timer_create.2:430 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:561 build/C/man2/tkill.2:144 build/C/man2/wait.2:654 build/C/man2/wait4.2:180
198 msgid ""
199 "This page is part of release 3.68 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
213 #, no-wrap
214 msgid "2010-08-30"
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:29 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:31 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:21 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 behaviour "
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:103
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:93
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:211
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:865 build/C/man2/prctl.2:870 build/C/man2/prctl.2:875 build/C/man2/prctl.2:885 build/C/man3/psignal.3:105 build/C/man3/psignal.3:109 build/C/man2/sigaction.2:298 build/C/man2/sigaction.2:313 build/C/man2/sigaction.2:329 build/C/man2/sigaction.2:344 build/C/man2/sigaction.2:391 build/C/man2/sigaction.2:427 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:267 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:653 build/C/man7/signal.7:657 build/C/man7/signal.7:664 build/C/man7/signal.7:680 build/C/man7/signal.7:686 build/C/man7/signal.7:693 build/C/man7/signal.7:698 build/C/man7/signal.7:717 build/C/man7/signal.7:736 build/C/man7/signal.7:743 build/C/man7/signal.7:752 build/C/man7/signal.7:760 build/C/man7/signal.7:766 build/C/man7/signal.7:771 build/C/man7/signal.7:791 build/C/man7/signal.7:810 build/C/man7/signal.7:813 build/C/man7/signal.7:816 build/C/man7/signal.7:819 build/C/man7/signal.7:824 build/C/man7/signal.7:830 build/C/man7/signal.7:834 build/C/man3/sigwait.3:62 build/C/man3/sigwait.3:67 build/C/man2/timer_create.2:216 build/C/man2/timer_create.2:219 build/C/man2/timer_create.2:222 build/C/man2/timer_create.2:226 build/C/man2/timer_create.2:229 build/C/man2/timer_create.2:235 build/C/man2/timer_create.2:239
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:244
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:262
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:135 build/C/man2/kill.2:106 build/C/man2/killpg.2:95 build/C/man2/prctl.2:827 build/C/man2/prctl.2:832 build/C/man2/prctl.2:844 build/C/man2/prctl.2:849 build/C/man2/prctl.2:858 build/C/man2/prctl.2:898 build/C/man2/prctl.2:908 build/C/man2/prctl.2:916 build/C/man2/prctl.2:927 build/C/man2/prctl.2:936 build/C/man2/prctl.2:950 build/C/man2/prctl.2:962 build/C/man2/prctl.2:973 build/C/man2/rt_sigqueueinfo.2:141 build/C/man2/s390_runtime_instr.2:66 build/C/man2/sigaction.2:670 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:127 build/C/man3/sigwait.3:75 build/C/man2/sigwaitinfo.2:129 build/C/man2/timer_create.2:179 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:305 build/C/man2/timerfd_create.2:313 build/C/man2/timerfd_create.2:349 build/C/man2/timerfd_create.2:356 build/C/man2/timerfd_create.2:362 build/C/man2/tkill.2:100 build/C/man2/wait.2:417
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:320
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:323
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:327
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:327
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:330
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:187 build/C/man2/timerfd_create.2:330
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:1063 build/C/man3/psignal.3:95 build/C/man2/restart_syscall.2:92 build/C/man2/rt_sigqueueinfo.2:169 build/C/man2/s390_runtime_instr.2:79 build/C/man2/signalfd.2:299 build/C/man3/sigqueue.3:112 build/C/man2/timer_create.2:191 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:368 build/C/man2/tkill.2:111
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:336
587 #, no-wrap
588 msgid "Underlying Linux system calls"
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:790 build/C/man2/sigaltstack.2:217 build/C/man2/signalfd.2:360 build/C/man3/sigwait.3:91 build/C/man2/timer_create.2:261 build/C/man2/timer_getoverrun.2:128 build/C/man2/timer_settime.2:209 build/C/man2/timerfd_create.2:379 build/C/man2/wait.2:551
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:292 build/C/man2/timerfd_create.2:407 build/C/man2/wait.2:586
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: TH
798 #: build/C/man2/getitimer.2:12
799 #, no-wrap
800 msgid "2012-10-01"
801 msgstr ""
802
803 #. type: Plain text
804 #: build/C/man2/getitimer.2:15
805 msgid "getitimer, setitimer - get or set value of an interval timer"
806 msgstr ""
807
808 #. type: Plain text
809 #: build/C/man2/getitimer.2:18
810 #, no-wrap
811 msgid "B<#include E<lt>sys/time.hE<gt>>\n"
812 msgstr ""
813
814 #. type: Plain text
815 #: build/C/man2/getitimer.2:20
816 #, no-wrap
817 msgid "B<int getitimer(int >I<which>B<, struct itimerval *>I<curr_value>B<);>\n"
818 msgstr ""
819
820 #. type: Plain text
821 #: build/C/man2/getitimer.2:23
822 #, no-wrap
823 msgid ""
824 "B<int setitimer(int >I<which>B<, const struct itimerval *>I<new_value>B<,>\n"
825 "B<              struct itimerval *>I<old_value>B<);>\n"
826 msgstr ""
827
828 #. type: Plain text
829 #: build/C/man2/getitimer.2:29
830 msgid ""
831 "The system provides each process with three interval timers, each "
832 "decrementing in a distinct time domain.  When any timer expires, a signal is "
833 "sent to the process, and the timer (potentially) restarts."
834 msgstr ""
835
836 #. type: TP
837 #: build/C/man2/getitimer.2:29
838 #, no-wrap
839 msgid "B<ITIMER_REAL>"
840 msgstr ""
841
842 #. type: Plain text
843 #: build/C/man2/getitimer.2:34
844 msgid "decrements in real time, and delivers B<SIGALRM> upon expiration."
845 msgstr ""
846
847 #. type: TP
848 #: build/C/man2/getitimer.2:34
849 #, no-wrap
850 msgid "B<ITIMER_VIRTUAL>"
851 msgstr ""
852
853 #. type: Plain text
854 #: build/C/man2/getitimer.2:39
855 msgid ""
856 "decrements only when the process is executing, and delivers B<SIGVTALRM> "
857 "upon expiration."
858 msgstr ""
859
860 #. type: TP
861 #: build/C/man2/getitimer.2:39
862 #, no-wrap
863 msgid "B<ITIMER_PROF>"
864 msgstr ""
865
866 #. type: Plain text
867 #: build/C/man2/getitimer.2:49
868 msgid ""
869 "decrements both when the process executes and when the system is executing "
870 "on behalf of the process.  Coupled with B<ITIMER_VIRTUAL>, this timer is "
871 "usually used to profile the time spent by the application in user and kernel "
872 "space.  B<SIGPROF> is delivered upon expiration."
873 msgstr ""
874
875 #. type: Plain text
876 #: build/C/man2/getitimer.2:51
877 msgid "Timer values are defined by the following structures:"
878 msgstr ""
879
880 #. type: Plain text
881 #: build/C/man2/getitimer.2:59
882 #, no-wrap
883 msgid ""
884 "struct itimerval {\n"
885 "    struct timeval it_interval; /* next value */\n"
886 "    struct timeval it_value;    /* current value */\n"
887 "};\n"
888 msgstr ""
889
890 #. type: Plain text
891 #: build/C/man2/getitimer.2:64
892 #, no-wrap
893 msgid ""
894 "struct timeval {\n"
895 "    time_t      tv_sec;         /* seconds */\n"
896 "    suseconds_t tv_usec;        /* microseconds */\n"
897 "};\n"
898 msgstr ""
899
900 #. type: Plain text
901 #: build/C/man2/getitimer.2:86
902 msgid ""
903 "The function B<getitimer>()  fills the structure pointed to by I<curr_value> "
904 "with the current setting for the timer specified by I<which> (one of "
905 "B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, or B<ITIMER_PROF>).  The element "
906 "I<it_value> is set to the amount of time remaining on the timer, or zero if "
907 "the timer is disabled.  Similarly, I<it_interval> is set to the reset value."
908 msgstr ""
909
910 #. type: Plain text
911 #: build/C/man2/getitimer.2:94
912 msgid ""
913 "The function B<setitimer>()  sets the specified timer to the value in "
914 "I<new_value>.  If I<old_value> is non-NULL, the old value of the timer is "
915 "stored there."
916 msgstr ""
917
918 #. type: Plain text
919 #: build/C/man2/getitimer.2:104
920 msgid ""
921 "Timers decrement from I<it_value> to zero, generate a signal, and reset to "
922 "I<it_interval>.  A timer which is set to zero (I<it_value> is zero or the "
923 "timer expires and I<it_interval> is zero) stops."
924 msgstr ""
925
926 #. type: Plain text
927 #: build/C/man2/getitimer.2:110
928 msgid ""
929 "Both I<tv_sec> and I<tv_usec> are significant in determining the duration of "
930 "a timer."
931 msgstr ""
932
933 #. type: Plain text
934 #: build/C/man2/getitimer.2:122
935 msgid ""
936 "Timers will never expire before the requested time, but may expire some "
937 "(short) time afterward, which depends on the system timer resolution and on "
938 "the system load; see B<time>(7).  (But see BUGS below.)  Upon expiration, a "
939 "signal will be generated and the timer reset.  If the timer expires while "
940 "the process is active (always true for B<ITIMER_VIRTUAL>), the signal will "
941 "be delivered immediately when generated.  Otherwise, the delivery will be "
942 "offset by a small time dependent on the system loading."
943 msgstr ""
944
945 #. type: Plain text
946 #: build/C/man2/getitimer.2:127 build/C/man2/killpg.2:94 build/C/man2/tkill.2:99
947 msgid ""
948 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
949 "appropriately."
950 msgstr ""
951
952 #. type: TP
953 #: build/C/man2/getitimer.2:128 build/C/man2/prctl.2:823 build/C/man2/sigaction.2:666 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:342
954 #, no-wrap
955 msgid "B<EFAULT>"
956 msgstr ""
957
958 #. type: Plain text
959 #: build/C/man2/getitimer.2:135 build/C/man2/timerfd_create.2:349
960 msgid "I<new_value>, I<old_value>, or I<curr_value> is not valid a pointer."
961 msgstr ""
962
963 #. type: Plain text
964 #: build/C/man2/getitimer.2:148
965 msgid ""
966 "I<which> is not one of B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, or B<ITIMER_PROF>; "
967 "or (since Linux 2.6.22) one of the I<tv_usec> fields in the structure "
968 "pointed to by I<new_value> contains a value outside the range 0 to 999999."
969 msgstr ""
970
971 #. type: Plain text
972 #: build/C/man2/getitimer.2:158
973 msgid ""
974 "POSIX.1-2001, SVr4, 4.4BSD (this call first appeared in 4.2BSD).  "
975 "POSIX.1-2008 marks B<getitimer>()  and B<setitimer>()  obsolete, "
976 "recommending the use of the POSIX timers API (B<timer_gettime>(2), "
977 "B<timer_settime>(2), etc.) instead."
978 msgstr ""
979
980 #. type: Plain text
981 #: build/C/man2/getitimer.2:164
982 msgid ""
983 "A child created via B<fork>(2)  does not inherit its parent's interval "
984 "timers.  Interval timers are preserved across an B<execve>(2)."
985 msgstr ""
986
987 #. type: Plain text
988 #: build/C/man2/getitimer.2:174
989 msgid ""
990 "POSIX.1 leaves the interaction between B<setitimer>()  and the three "
991 "interfaces B<alarm>(2), B<sleep>(3), and B<usleep>(3)  unspecified."
992 msgstr ""
993
994 #. type: Plain text
995 #: build/C/man2/getitimer.2:176
996 msgid "The standards are silent on the meaning of the call:"
997 msgstr ""
998
999 #. type: Plain text
1000 #: build/C/man2/getitimer.2:178
1001 #, no-wrap
1002 msgid "    setitimer(which, NULL, &old_value);\n"
1003 msgstr ""
1004
1005 #. type: Plain text
1006 #: build/C/man2/getitimer.2:181
1007 msgid ""
1008 "Many systems (Solaris, the BSDs, and perhaps others)  treat this as "
1009 "equivalent to:"
1010 msgstr ""
1011
1012 #. type: Plain text
1013 #: build/C/man2/getitimer.2:183
1014 #, no-wrap
1015 msgid "    getitimer(which, &old_value);\n"
1016 msgstr ""
1017
1018 #. type: Plain text
1019 #: build/C/man2/getitimer.2:189
1020 msgid ""
1021 "In Linux, this is treated as being equivalent to a call in which the "
1022 "I<new_value> fields are zero; that is, the timer is disabled.  I<Don't use "
1023 "this Linux misfeature>: it is nonportable and unnecessary."
1024 msgstr ""
1025
1026 #. type: SH
1027 #: build/C/man2/getitimer.2:189 build/C/man2/kill.2:161 build/C/man3/profil.3:72 build/C/man3/psignal.3:101 build/C/man2/sigaction.2:781 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:373 build/C/man2/wait.2:536
1028 #, no-wrap
1029 msgid "BUGS"
1030 msgstr ""
1031
1032 #. type: Plain text
1033 #: build/C/man2/getitimer.2:198
1034 msgid ""
1035 "The generation and delivery of a signal are distinct, and only one instance "
1036 "of each of the signals listed above may be pending for a process.  Under "
1037 "very heavy loading, an B<ITIMER_REAL> timer may expire before the signal "
1038 "from a previous expiration has been delivered.  The second signal in such an "
1039 "event will be lost."
1040 msgstr ""
1041
1042 #. type: Plain text
1043 #: build/C/man2/getitimer.2:213
1044 msgid ""
1045 "On Linux kernels before 2.6.16, timer values are represented in jiffies.  If "
1046 "a request is made set a timer with a value whose jiffies representation "
1047 "exceeds B<MAX_SEC_IN_JIFFIES> (defined in I<include/linux/jiffies.h>), then "
1048 "the timer is silently truncated to this ceiling value.  On Linux/i386 "
1049 "(where, since Linux 2.6.13, the default jiffy is 0.004 seconds), this means "
1050 "that the ceiling value for a timer is approximately 99.42 days.  Since Linux "
1051 "2.6.16, the kernel uses a different internal representation for times, and "
1052 "this ceiling is removed."
1053 msgstr ""
1054
1055 #.  4 Jul 2005: It looks like this bug may remain in 2.4.x.
1056 #.      http://lkml.org/lkml/2005/7/1/165
1057 #. type: Plain text
1058 #: build/C/man2/getitimer.2:220
1059 msgid ""
1060 "On certain systems (including i386), Linux kernels before version 2.6.12 "
1061 "have a bug which will produce premature timer expirations of up to one jiffy "
1062 "under some circumstances.  This bug is fixed in kernel 2.6.12."
1063 msgstr ""
1064
1065 #.  Bugzilla report 25 Apr 2006:
1066 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6443
1067 #.  "setitimer() should reject noncanonical arguments"
1068 #. type: Plain text
1069 #: build/C/man2/getitimer.2:239
1070 msgid ""
1071 "POSIX.1-2001 says that B<setitimer>()  should fail if a I<tv_usec> value is "
1072 "specified that is outside of the range 0 to 999999.  However, in kernels up "
1073 "to and including 2.6.21, Linux does not give an error, but instead silently "
1074 "adjusts the corresponding seconds value for the timer.  From kernel 2.6.22 "
1075 "onward, this nonconformance has been repaired: an improper I<tv_usec> value "
1076 "results in an B<EINVAL> error."
1077 msgstr ""
1078
1079 #. type: Plain text
1080 #: build/C/man2/getitimer.2:246
1081 msgid ""
1082 "B<gettimeofday>(2), B<sigaction>(2), B<signal>(2), B<timer_create>(2), "
1083 "B<timerfd_create>(2), B<time>(7)"
1084 msgstr ""
1085
1086 #. type: TH
1087 #: build/C/man3/gsignal.3:27
1088 #, no-wrap
1089 msgid "GSIGNAL"
1090 msgstr ""
1091
1092 #. type: TH
1093 #: build/C/man3/gsignal.3:27 build/C/man3/profil.3:28
1094 #, no-wrap
1095 msgid "2007-07-26"
1096 msgstr ""
1097
1098 #. type: Plain text
1099 #: build/C/man3/gsignal.3:30
1100 msgid "gsignal, ssignal - software signal facility"
1101 msgstr ""
1102
1103 #. type: Plain text
1104 #: 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
1105 #, no-wrap
1106 msgid "B<#include E<lt>signal.hE<gt>>\n"
1107 msgstr ""
1108
1109 #. type: Plain text
1110 #: build/C/man3/gsignal.3:35
1111 #, no-wrap
1112 msgid "B<typedef void (*sighandler_t)(int);>\n"
1113 msgstr ""
1114
1115 #. type: Plain text
1116 #: build/C/man3/gsignal.3:37
1117 #, no-wrap
1118 msgid "B<int gsignal(int >I<signum>B<);>\n"
1119 msgstr ""
1120
1121 #. type: Plain text
1122 #: build/C/man3/gsignal.3:39
1123 #, no-wrap
1124 msgid "B<sighandler_t ssignal(int >I<signum>B<, sighandler_t >I<action>B<);>\n"
1125 msgstr ""
1126
1127 #. type: Plain text
1128 #: 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:48 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
1129 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1130 msgstr ""
1131
1132 #. type: Plain text
1133 #: build/C/man3/gsignal.3:49
1134 msgid "B<gsignal>(), B<ssignal>(): _SVID_SOURCE"
1135 msgstr ""
1136
1137 #. type: Plain text
1138 #: build/C/man3/gsignal.3:57
1139 msgid ""
1140 "Don't use these functions under Linux.  Due to a historical mistake, under "
1141 "Linux these functions are aliases for B<raise>(3)  and B<signal>(2), "
1142 "respectively."
1143 msgstr ""
1144
1145 #. type: Plain text
1146 #: build/C/man3/gsignal.3:95
1147 msgid ""
1148 "Elsewhere, on System V-like systems, these functions implement software "
1149 "signaling, entirely independent of the classical B<signal>(2)  and "
1150 "B<kill>(2)  functions.  The function B<ssignal>()  defines the action to "
1151 "take when the software signal with number I<signum> is raised using the "
1152 "function B<gsignal>(), and returns the previous such action or B<SIG_DFL>.  "
1153 "The function B<gsignal>()  does the following: if no action (or the action "
1154 "B<SIG_DFL>)  was specified for I<signum>, then it does nothing and returns "
1155 "0.  If the action B<SIG_IGN> was specified for I<signum>, then it does "
1156 "nothing and returns 1.  Otherwise, it resets the action to B<SIG_DFL> and "
1157 "calls the action function with argument I<signum>, and returns the value "
1158 "returned by that function.  The range of possible values I<signum> varies "
1159 "(often 1-15 or 1-17)."
1160 msgstr ""
1161
1162 #. type: Plain text
1163 #: build/C/man3/gsignal.3:103
1164 msgid ""
1165 "These functions are available under AIX, DG/UX, HP-UX, SCO, Solaris, Tru64.  "
1166 "They are called obsolete under most of these systems, and are broken under "
1167 "Linux libc and glibc.  Some systems also have B<gsignal_r>()  and "
1168 "B<ssignal_r>()."
1169 msgstr ""
1170
1171 #. type: Plain text
1172 #: build/C/man3/gsignal.3:107
1173 msgid "B<kill>(2), B<signal>(2), B<raise>(3)"
1174 msgstr ""
1175
1176 #. type: TH
1177 #: build/C/man2/kill.2:44
1178 #, no-wrap
1179 msgid "KILL"
1180 msgstr ""
1181
1182 #. type: TH
1183 #: build/C/man2/kill.2:44
1184 #, no-wrap
1185 msgid "2013-09-17"
1186 msgstr ""
1187
1188 #. type: Plain text
1189 #: build/C/man2/kill.2:47
1190 msgid "kill - send signal to a process"
1191 msgstr ""
1192
1193 #. type: Plain text
1194 #: build/C/man2/kill.2:50
1195 #, no-wrap
1196 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
1197 msgstr ""
1198
1199 #. type: Plain text
1200 #: build/C/man2/kill.2:54
1201 #, no-wrap
1202 msgid "B<int kill(pid_t >I<pid>B<, int >I<sig>B<);>\n"
1203 msgstr ""
1204
1205 #. type: Plain text
1206 #: build/C/man2/kill.2:64
1207 msgid "B<kill>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
1208 msgstr ""
1209
1210 #. type: Plain text
1211 #: build/C/man2/kill.2:70
1212 msgid ""
1213 "The B<kill>()  system call can be used to send any signal to any process "
1214 "group or process."
1215 msgstr ""
1216
1217 #. type: Plain text
1218 #: build/C/man2/kill.2:73
1219 msgid ""
1220 "If I<pid> is positive, then signal I<sig> is sent to the process with the ID "
1221 "specified by I<pid>."
1222 msgstr ""
1223
1224 #. type: Plain text
1225 #: build/C/man2/kill.2:76
1226 msgid ""
1227 "If I<pid> equals 0, then I<sig> is sent to every process in the process "
1228 "group of the calling process."
1229 msgstr ""
1230
1231 #. type: Plain text
1232 #: build/C/man2/kill.2:80
1233 msgid ""
1234 "If I<pid> equals -1, then I<sig> is sent to every process for which the "
1235 "calling process has permission to send signals, except for process 1 "
1236 "(I<init>), but see below."
1237 msgstr ""
1238
1239 #. type: Plain text
1240 #: build/C/man2/kill.2:83
1241 msgid ""
1242 "If I<pid> is less than -1, then I<sig> is sent to every process in the "
1243 "process group whose ID is I<-pid>."
1244 msgstr ""
1245
1246 #. type: Plain text
1247 #: build/C/man2/kill.2:88
1248 msgid ""
1249 "If I<sig> is 0, then no signal is sent, but error checking is still "
1250 "performed; this can be used to check for the existence of a process ID or "
1251 "process group ID."
1252 msgstr ""
1253
1254 #. type: Plain text
1255 #: build/C/man2/kill.2:100
1256 msgid ""
1257 "For a process to have permission to send a signal it must either be "
1258 "privileged (under Linux: have the B<CAP_KILL> capability), or the real or "
1259 "effective user ID of the sending process must equal the real or saved "
1260 "set-user-ID of the target process.  In the case of B<SIGCONT> it suffices "
1261 "when the sending and receiving processes belong to the same session.  "
1262 "(Historically, the rules were different; see NOTES.)"
1263 msgstr ""
1264
1265 #. type: Plain text
1266 #: build/C/man2/kill.2:105
1267 msgid ""
1268 "On success (at least one signal was sent), zero is returned.  On error, -1 "
1269 "is returned, and I<errno> is set appropriately."
1270 msgstr ""
1271
1272 #. type: Plain text
1273 #: build/C/man2/kill.2:109
1274 msgid "An invalid signal was specified."
1275 msgstr ""
1276
1277 #. type: TP
1278 #: build/C/man2/kill.2:109 build/C/man2/killpg.2:99 build/C/man2/prctl.2:985 build/C/man2/prctl.2:997 build/C/man2/prctl.2:1007 build/C/man2/prctl.2:1015 build/C/man2/rt_sigqueueinfo.2:148 build/C/man2/sigaltstack.2:153 build/C/man3/sigqueue.3:102 build/C/man2/tkill.2:103
1279 #, no-wrap
1280 msgid "B<EPERM>"
1281 msgstr ""
1282
1283 #. type: Plain text
1284 #: build/C/man2/kill.2:113 build/C/man2/killpg.2:103
1285 msgid ""
1286 "The process does not have permission to send the signal to any of the target "
1287 "processes."
1288 msgstr ""
1289
1290 #. type: TP
1291 #: 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:108
1292 #, no-wrap
1293 msgid "B<ESRCH>"
1294 msgstr ""
1295
1296 #. type: Plain text
1297 #: build/C/man2/kill.2:121
1298 msgid ""
1299 "The pid or process group does not exist.  Note that an existing process "
1300 "might be a zombie, a process which already committed termination, but has "
1301 "not yet been B<wait>(2)ed for."
1302 msgstr ""
1303
1304 #. type: Plain text
1305 #: build/C/man2/kill.2:123 build/C/man2/pause.2:59 build/C/man2/wait.2:424
1306 msgid "SVr4, 4.3BSD, POSIX.1-2001."
1307 msgstr ""
1308
1309 #. type: Plain text
1310 #: build/C/man2/kill.2:131
1311 msgid ""
1312 "The only signals that can be sent to process ID 1, the I<init> process, are "
1313 "those for which I<init> has explicitly installed signal handlers.  This is "
1314 "done to assure the system is not brought down accidentally."
1315 msgstr ""
1316
1317 #. type: Plain text
1318 #: build/C/man2/kill.2:137
1319 msgid ""
1320 "POSIX.1-2001 requires that I<kill(-1,sig)> send I<sig> to all processes that "
1321 "the calling process may send signals to, except possibly for some "
1322 "implementation-defined system processes.  Linux allows a process to signal "
1323 "itself, but on Linux the call I<kill(-1,sig)> does not signal the calling "
1324 "process."
1325 msgstr ""
1326
1327 #. type: Plain text
1328 #: build/C/man2/kill.2:147
1329 msgid ""
1330 "POSIX.1-2001 requires that if a process sends a signal to itself, and the "
1331 "sending thread does not have the signal blocked, and no other thread has it "
1332 "unblocked or is waiting for it in B<sigwait>(3), at least one unblocked "
1333 "signal must be delivered to the sending thread before the B<kill>()  "
1334 "returns."
1335 msgstr ""
1336
1337 #. type: SS
1338 #: build/C/man2/kill.2:147 build/C/man3/sigpause.3:82 build/C/man2/wait.2:479
1339 #, no-wrap
1340 msgid "Linux notes"
1341 msgstr ""
1342
1343 #.  In the 0.* kernels things chopped and changed quite
1344 #.  a bit - MTK, 24 Jul 02
1345 #. type: Plain text
1346 #: build/C/man2/kill.2:161
1347 msgid ""
1348 "Across different kernel versions, Linux has enforced different rules for the "
1349 "permissions required for an unprivileged process to send a signal to another "
1350 "process.  In kernels 1.0 to 1.2.2, a signal could be sent if the effective "
1351 "user ID of the sender matched effective user ID of the target, or the real "
1352 "user ID of the sender matched the real user ID of the target.  From kernel "
1353 "1.2.3 until 1.3.77, a signal could be sent if the effective user ID of the "
1354 "sender matched either the real or effective user ID of the target.  The "
1355 "current rules, which conform to POSIX.1-2001, were adopted in kernel 1.3.78."
1356 msgstr ""
1357
1358 #. type: Plain text
1359 #: build/C/man2/kill.2:171
1360 msgid ""
1361 "In 2.6 kernels up to and including 2.6.7, there was a bug that meant that "
1362 "when sending signals to a process group, B<kill>()  failed with the error "
1363 "B<EPERM> if the caller did not have permission to send the signal to I<any> "
1364 "(rather than I<all>) of the members of the process group.  Notwithstanding "
1365 "this error return, the signal was still delivered to all of the processes "
1366 "for which the caller had permission to signal."
1367 msgstr ""
1368
1369 #. type: Plain text
1370 #: build/C/man2/kill.2:181
1371 msgid ""
1372 "B<_exit>(2), B<killpg>(2), B<signal>(2), B<tkill>(2), B<exit>(3), "
1373 "B<sigqueue>(3), B<capabilities>(7), B<credentials>(7), B<signal>(7)"
1374 msgstr ""
1375
1376 #. type: TH
1377 #: build/C/man2/killpg.2:42
1378 #, no-wrap
1379 msgid "KILLPG"
1380 msgstr ""
1381
1382 #. type: TH
1383 #: build/C/man2/killpg.2:42 build/C/man3/sigset.3:26
1384 #, no-wrap
1385 msgid "2010-09-20"
1386 msgstr ""
1387
1388 #. type: Plain text
1389 #: build/C/man2/killpg.2:45
1390 msgid "killpg - send signal to a process group"
1391 msgstr ""
1392
1393 #. type: Plain text
1394 #: build/C/man2/killpg.2:49
1395 msgid "B<int killpg(int >I<pgrp>B<, int >I<sig>B<);>"
1396 msgstr ""
1397
1398 #. type: TP
1399 #: build/C/man2/killpg.2:55
1400 #, no-wrap
1401 msgid "B<killpg>():"
1402 msgstr ""
1403
1404 #. type: Plain text
1405 #: build/C/man2/killpg.2:59 build/C/man2/sigaltstack.2:46 build/C/man3/siginterrupt.3:51 build/C/man2/wait4.2:60
1406 msgid ""
1407 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
1408 "_XOPEN_SOURCE_EXTENDED"
1409 msgstr ""
1410
1411 #. type: Plain text
1412 #: build/C/man2/killpg.2:69
1413 msgid ""
1414 "B<killpg>()  sends the signal I<sig> to the process group I<pgrp>.  See "
1415 "B<signal>(7)  for a list of signals."
1416 msgstr ""
1417
1418 #. type: Plain text
1419 #: build/C/man2/killpg.2:78
1420 msgid ""
1421 "If I<pgrp> is 0, B<killpg>()  sends the signal to the calling process's "
1422 "process group.  (POSIX says: If I<pgrp> is less than or equal to 1, the "
1423 "behavior is undefined.)"
1424 msgstr ""
1425
1426 #. type: Plain text
1427 #: build/C/man2/killpg.2:89
1428 msgid ""
1429 "For a process to have permission to send a signal it must either be "
1430 "privileged (under Linux: have the B<CAP_KILL> capability), or the real or "
1431 "effective user ID of the sending process must equal the real or saved "
1432 "set-user-ID of the target process.  In the case of B<SIGCONT> it suffices "
1433 "when the sending and receiving processes belong to the same session."
1434 msgstr ""
1435
1436 #. type: Plain text
1437 #: build/C/man2/killpg.2:99
1438 msgid "I<sig> is not a valid signal number."
1439 msgstr ""
1440
1441 #. type: Plain text
1442 #: build/C/man2/killpg.2:107
1443 msgid "No process can be found in the process group specified by I<pgrp>."
1444 msgstr ""
1445
1446 #. type: Plain text
1447 #: build/C/man2/killpg.2:111
1448 msgid ""
1449 "The process group was given as 0 but the sending process does not have a "
1450 "process group."
1451 msgstr ""
1452
1453 #. type: Plain text
1454 #: build/C/man2/killpg.2:115
1455 msgid ""
1456 "SVr4, 4.4BSD (the B<killpg>()  function call first appeared in 4BSD), "
1457 "POSIX.1-2001."
1458 msgstr ""
1459
1460 #. type: Plain text
1461 #: build/C/man2/killpg.2:129
1462 msgid ""
1463 "There are various differences between the permission checking in BSD-type "
1464 "systems and System\\ V-type systems.  See the POSIX rationale for "
1465 "B<kill>().  A difference not mentioned by POSIX concerns the return value "
1466 "B<EPERM>: BSD documents that no signal is sent and B<EPERM> returned when "
1467 "the permission check failed for at least one target process, while POSIX "
1468 "documents B<EPERM> only when the permission check failed for all target "
1469 "processes."
1470 msgstr ""
1471
1472 #. type: Plain text
1473 #: build/C/man2/killpg.2:134
1474 msgid ""
1475 "On Linux, B<killpg>()  is implemented as a library function that makes the "
1476 "call I<kill(-pgrp,\\ sig)>."
1477 msgstr ""
1478
1479 #. type: Plain text
1480 #: build/C/man2/killpg.2:140
1481 msgid ""
1482 "B<getpgrp>(2), B<kill>(2), B<signal>(2), B<capabilities>(7), "
1483 "B<credentials>(7)"
1484 msgstr ""
1485
1486 #. type: TH
1487 #: build/C/man2/pause.2:30
1488 #, no-wrap
1489 msgid "PAUSE"
1490 msgstr ""
1491
1492 #. type: TH
1493 #: build/C/man2/pause.2:30
1494 #, no-wrap
1495 msgid "2008-10-06"
1496 msgstr ""
1497
1498 #. type: Plain text
1499 #: build/C/man2/pause.2:33
1500 msgid "pause - wait for signal"
1501 msgstr ""
1502
1503 #. type: Plain text
1504 #: build/C/man2/pause.2:35
1505 msgid "B<#include E<lt>unistd.hE<gt>>"
1506 msgstr ""
1507
1508 #. type: Plain text
1509 #: build/C/man2/pause.2:37
1510 msgid "B<int pause(void);>"
1511 msgstr ""
1512
1513 #. type: Plain text
1514 #: build/C/man2/pause.2:42
1515 msgid ""
1516 "B<pause>()  causes the calling process (or thread) to sleep until a signal "
1517 "is delivered that either terminates the process or causes the invocation of "
1518 "a signal-catching function."
1519 msgstr ""
1520
1521 #.  .BR ERESTARTNOHAND .
1522 #. type: Plain text
1523 #: build/C/man2/pause.2:53
1524 msgid ""
1525 "B<pause>()  returns only when a signal was caught and the signal-catching "
1526 "function returned.  In this case, B<pause>()  returns -1, and I<errno> is "
1527 "set to B<EINTR>."
1528 msgstr ""
1529
1530 #. type: TP
1531 #: build/C/man2/pause.2:54 build/C/man2/sigsuspend.2:81 build/C/man2/sigwaitinfo.2:123 build/C/man2/wait.2:410
1532 #, no-wrap
1533 msgid "B<EINTR>"
1534 msgstr ""
1535
1536 #. type: Plain text
1537 #: build/C/man2/pause.2:57
1538 msgid "a signal was caught and the signal-catching function returned."
1539 msgstr ""
1540
1541 #. type: Plain text
1542 #: build/C/man2/pause.2:64
1543 msgid "B<kill>(2), B<select>(2), B<signal>(2), B<sigsuspend>(2)"
1544 msgstr ""
1545
1546 #. type: TH
1547 #: build/C/man2/prctl.2:52
1548 #, no-wrap
1549 msgid "PRCTL"
1550 msgstr ""
1551
1552 #. type: TH
1553 #: build/C/man2/prctl.2:52 build/C/man3/sigsetops.3:31
1554 #, no-wrap
1555 msgid "2014-04-14"
1556 msgstr ""
1557
1558 #. type: Plain text
1559 #: build/C/man2/prctl.2:55
1560 msgid "prctl - operations on a process"
1561 msgstr ""
1562
1563 #. type: Plain text
1564 #: build/C/man2/prctl.2:58
1565 #, no-wrap
1566 msgid "B<#include E<lt>sys/prctl.hE<gt>>\n"
1567 msgstr ""
1568
1569 #. type: Plain text
1570 #: build/C/man2/prctl.2:61
1571 #, no-wrap
1572 msgid ""
1573 "B<int prctl(int >I<option>B<, unsigned long >I<arg2>B<, unsigned long "
1574 ">I<arg3>B<,>\n"
1575 "B<          unsigned long >I<arg4>B<, unsigned long >I<arg5>B<);>\n"
1576 msgstr ""
1577
1578 #. type: Plain text
1579 #: build/C/man2/prctl.2:68
1580 msgid ""
1581 "B<prctl>()  is called with a first argument describing what to do (with "
1582 "values defined in I<E<lt>linux/prctl.hE<gt>>), and further arguments with a "
1583 "significance depending on the first one.  The first argument can be:"
1584 msgstr ""
1585
1586 #. type: TP
1587 #: build/C/man2/prctl.2:68
1588 #, no-wrap
1589 msgid "B<PR_CAPBSET_READ> (since Linux 2.6.25)"
1590 msgstr ""
1591
1592 #. type: Plain text
1593 #: build/C/man2/prctl.2:80
1594 msgid ""
1595 "Return (as the function result) 1 if the capability specified in I<arg2> is "
1596 "in the calling thread's capability bounding set, or 0 if it is not.  (The "
1597 "capability constants are defined in I<E<lt>linux/capability.hE<gt>>.)  The "
1598 "capability bounding set dictates whether the process can receive the "
1599 "capability through a file's permitted capability set on a subsequent call to "
1600 "B<execve>(2)."
1601 msgstr ""
1602
1603 #. type: Plain text
1604 #: build/C/man2/prctl.2:85
1605 msgid ""
1606 "If the capability specified in I<arg2> is not valid, then the call fails "
1607 "with the error B<EINVAL>."
1608 msgstr ""
1609
1610 #. type: TP
1611 #: build/C/man2/prctl.2:85
1612 #, no-wrap
1613 msgid "B<PR_CAPBSET_DROP> (since Linux 2.6.25)"
1614 msgstr ""
1615
1616 #. type: Plain text
1617 #: build/C/man2/prctl.2:94
1618 msgid ""
1619 "If the calling thread has the B<CAP_SETPCAP> capability, then drop the "
1620 "capability specified by I<arg2> from the calling thread's capability "
1621 "bounding set.  Any children of the calling thread will inherit the newly "
1622 "reduced bounding set."
1623 msgstr ""
1624
1625 #. type: Plain text
1626 #: build/C/man2/prctl.2:106
1627 msgid ""
1628 "The call fails with the error: B<EPERM> if the calling thread does not have "
1629 "the B<CAP_SETPCAP>; B<EINVAL> if I<arg2> does not represent a valid "
1630 "capability; or B<EINVAL> if file capabilities are not enabled in the kernel, "
1631 "in which case bounding sets are not supported."
1632 msgstr ""
1633
1634 #. type: TP
1635 #: build/C/man2/prctl.2:106
1636 #, no-wrap
1637 msgid "B<PR_SET_CHILD_SUBREAPER> (since Linux 3.4)"
1638 msgstr ""
1639
1640 #.  commit ebec18a6d3aa1e7d84aab16225e87fd25170ec2b
1641 #. type: Plain text
1642 #: build/C/man2/prctl.2:131
1643 msgid ""
1644 "If I<arg2> is nonzero, set the \"child subreaper\" attribute of the calling "
1645 "process; if I<arg2> is zero, unset the attribute.  When a process is marked "
1646 "as a child subreaper, all of the children that it creates, and their "
1647 "descendants, will be marked as having a subreaper.  In effect, a subreaper "
1648 "fulfills the role of B<init>(1)  for its descendant processes.  Upon "
1649 "termination of a process that is orphaned (i.e., its immediate parent has "
1650 "already terminated)  and marked as having a subreaper, the nearest still "
1651 "living ancestor subreaper will receive a B<SIGCHLD> signal and be able to "
1652 "B<wait>(2)  on the process to discover its termination status."
1653 msgstr ""
1654
1655 #. type: TP
1656 #: build/C/man2/prctl.2:131
1657 #, no-wrap
1658 msgid "B<PR_GET_CHILD_SUBREAPER> (since Linux 3.4)"
1659 msgstr ""
1660
1661 #. type: Plain text
1662 #: build/C/man2/prctl.2:136
1663 msgid ""
1664 "Return the \"child subreaper\" setting of the caller, in the location "
1665 "pointed to by I<(int\\ *) arg2>."
1666 msgstr ""
1667
1668 #. type: TP
1669 #: build/C/man2/prctl.2:136
1670 #, no-wrap
1671 msgid "B<PR_SET_DUMPABLE> (since Linux 2.3.20)"
1672 msgstr ""
1673
1674 #.  See http://marc.theaimsgroup.com/?l=linux-kernel&m=115270289030630&w=2
1675 #.  Subject:    Fix prctl privilege escalation (CVE-2006-2451)
1676 #.  From:       Marcel Holtmann <marcel () holtmann ! org>
1677 #.  Date:       2006-07-12 11:12:00
1678 #. type: Plain text
1679 #: build/C/man2/prctl.2:162
1680 msgid ""
1681 "Set the state of the flag determining whether core dumps are produced for "
1682 "the calling process upon delivery of a signal whose default behavior is to "
1683 "produce a core dump.  (Normally, this flag is set for a process by default, "
1684 "but it is cleared when a set-user-ID or set-group-ID program is executed and "
1685 "also by various system calls that manipulate process UIDs and GIDs).  In "
1686 "kernels up to and including 2.6.12, I<arg2> must be either 0 (process is not "
1687 "dumpable) or 1 (process is dumpable).  Between kernels 2.6.13 and 2.6.17, "
1688 "the value 2 was also permitted, which caused any binary which normally would "
1689 "not be dumped to be dumped readable by root only; for security reasons, this "
1690 "feature has been removed.  (See also the description of "
1691 "I</proc/sys/fs/suid_dumpable> in B<proc>(5).)  Processes that are not "
1692 "dumpable can not be attached via B<ptrace>(2)  B<PTRACE_ATTACH>."
1693 msgstr ""
1694
1695 #. type: TP
1696 #: build/C/man2/prctl.2:162
1697 #, no-wrap
1698 msgid "B<PR_GET_DUMPABLE> (since Linux 2.3.20)"
1699 msgstr ""
1700
1701 #.  Since Linux 2.6.13, the dumpable flag can have the value 2,
1702 #.  but in 2.6.13 PR_GET_DUMPABLE simply returns 1 if the dumpable
1703 #.  flags has a nonzero value.  This was fixed in 2.6.14.
1704 #. type: Plain text
1705 #: build/C/man2/prctl.2:169
1706 msgid ""
1707 "Return (as the function result) the current state of the calling process's "
1708 "dumpable flag."
1709 msgstr ""
1710
1711 #. type: TP
1712 #: build/C/man2/prctl.2:169
1713 #, no-wrap
1714 msgid "B<PR_SET_ENDIAN> (since Linux 2.6.18, PowerPC only)"
1715 msgstr ""
1716
1717 #.  Respectively 0, 1, 2
1718 #. type: Plain text
1719 #: build/C/man2/prctl.2:179
1720 msgid ""
1721 "Set the endian-ness of the calling process to the value given in I<arg2>, "
1722 "which should be one of the following: B<PR_ENDIAN_BIG>, B<PR_ENDIAN_LITTLE>, "
1723 "or B<PR_ENDIAN_PPC_LITTLE> (PowerPC pseudo little endian)."
1724 msgstr ""
1725
1726 #. type: TP
1727 #: build/C/man2/prctl.2:179
1728 #, no-wrap
1729 msgid "B<PR_GET_ENDIAN> (since Linux 2.6.18, PowerPC only)"
1730 msgstr ""
1731
1732 #. type: Plain text
1733 #: build/C/man2/prctl.2:184
1734 msgid ""
1735 "Return the endian-ness of the calling process, in the location pointed to by "
1736 "I<(int\\ *) arg2>."
1737 msgstr ""
1738
1739 #. type: TP
1740 #: build/C/man2/prctl.2:184
1741 #, no-wrap
1742 msgid "B<PR_SET_FPEMU> (since Linux 2.4.18, 2.5.9, only on ia64)"
1743 msgstr ""
1744
1745 #. type: Plain text
1746 #: build/C/man2/prctl.2:191
1747 msgid ""
1748 "Set floating-point emulation control bits to I<arg2>.  Pass "
1749 "B<PR_FPEMU_NOPRINT> to silently emulate fp operations accesses, or "
1750 "B<PR_FPEMU_SIGFPE> to not emulate fp operations and send B<SIGFPE> instead."
1751 msgstr ""
1752
1753 #. type: TP
1754 #: build/C/man2/prctl.2:191
1755 #, no-wrap
1756 msgid "B<PR_GET_FPEMU> (since Linux 2.4.18, 2.5.9, only on ia64)"
1757 msgstr ""
1758
1759 #. type: Plain text
1760 #: build/C/man2/prctl.2:196
1761 msgid ""
1762 "Return floating-point emulation control bits, in the location pointed to by "
1763 "I<(int\\ *) arg2>."
1764 msgstr ""
1765
1766 #. type: TP
1767 #: build/C/man2/prctl.2:196
1768 #, no-wrap
1769 msgid "B<PR_SET_FPEXC> (since Linux 2.4.21, 2.5.32, only on PowerPC)"
1770 msgstr ""
1771
1772 #. type: Plain text
1773 #: build/C/man2/prctl.2:209
1774 msgid ""
1775 "Set floating-point exception mode to I<arg2>.  Pass B<PR_FP_EXC_SW_ENABLE> "
1776 "to use FPEXC for FP exception enables, B<PR_FP_EXC_DIV> for floating-point "
1777 "divide by zero, B<PR_FP_EXC_OVF> for floating-point overflow, "
1778 "B<PR_FP_EXC_UND> for floating-point underflow, B<PR_FP_EXC_RES> for "
1779 "floating-point inexact result, B<PR_FP_EXC_INV> for floating-point invalid "
1780 "operation, B<PR_FP_EXC_DISABLED> for FP exceptions disabled, "
1781 "B<PR_FP_EXC_NONRECOV> for async nonrecoverable exception mode, "
1782 "B<PR_FP_EXC_ASYNC> for async recoverable exception mode, "
1783 "B<PR_FP_EXC_PRECISE> for precise exception mode."
1784 msgstr ""
1785
1786 #. type: TP
1787 #: build/C/man2/prctl.2:209
1788 #, no-wrap
1789 msgid "B<PR_GET_FPEXC> (since Linux 2.4.21, 2.5.32, only on PowerPC)"
1790 msgstr ""
1791
1792 #. type: Plain text
1793 #: build/C/man2/prctl.2:214
1794 msgid ""
1795 "Return floating-point exception mode, in the location pointed to by I<(int\\ "
1796 "*) arg2>."
1797 msgstr ""
1798
1799 #. type: TP
1800 #: build/C/man2/prctl.2:214
1801 #, no-wrap
1802 msgid "B<PR_SET_KEEPCAPS> (since Linux 2.2.18)"
1803 msgstr ""
1804
1805 #. type: Plain text
1806 #: build/C/man2/prctl.2:232
1807 msgid ""
1808 "Set the state of the thread's \"keep capabilities\" flag, which determines "
1809 "whether the threads's permitted capability set is cleared when a change is "
1810 "made to the threads's user IDs such that the threads's real UID, effective "
1811 "UID, and saved set-user-ID all become nonzero when at least one of them "
1812 "previously had the value 0.  By default, the permitted capability set is "
1813 "cleared when such a change is made; setting the \"keep capabilities\" flag "
1814 "prevents it from being cleared.  I<arg2> must be either 0 (permitted "
1815 "capabilities are cleared)  or 1 (permitted capabilities are kept).  (A "
1816 "thread's I<effective> capability set is always cleared when such a "
1817 "credential change is made, regardless of the setting of the \"keep "
1818 "capabilities\" flag.)  The \"keep capabilities\" value will be reset to 0 on "
1819 "subsequent calls to B<execve>(2)."
1820 msgstr ""
1821
1822 #. type: TP
1823 #: build/C/man2/prctl.2:232
1824 #, no-wrap
1825 msgid "B<PR_GET_KEEPCAPS> (since Linux 2.2.18)"
1826 msgstr ""
1827
1828 #. type: Plain text
1829 #: build/C/man2/prctl.2:236
1830 msgid ""
1831 "Return (as the function result) the current state of the calling threads's "
1832 "\"keep capabilities\" flag."
1833 msgstr ""
1834
1835 #. type: TP
1836 #: build/C/man2/prctl.2:236
1837 #, no-wrap
1838 msgid "B<PR_SET_NAME> (since Linux 2.6.9)"
1839 msgstr ""
1840
1841 #.  TASK_COMM_LEN in include/linux/sched.h
1842 #. type: Plain text
1843 #: build/C/man2/prctl.2:253
1844 msgid ""
1845 "Set the name of the calling thread, using the value in the location pointed "
1846 "to by I<(char\\ *) arg2>.  The name can be up to 16 bytes long, and should "
1847 "be null-terminated if it contains fewer bytes.  This is the same attribute "
1848 "that can be set via B<pthread_setname_np>(3)  and retrieved using "
1849 "B<pthread_getname_np>(3).  The attribute is likewise accessible via "
1850 "I</proc/self/task/[tid]/comm>, where I<tid> is the name of the calling "
1851 "thread."
1852 msgstr ""
1853
1854 #. type: TP
1855 #: build/C/man2/prctl.2:253
1856 #, no-wrap
1857 msgid "B<PR_GET_NAME> (since Linux 2.6.11)"
1858 msgstr ""
1859
1860 #. type: Plain text
1861 #: build/C/man2/prctl.2:260
1862 msgid ""
1863 "Return the name of the calling thread, in the buffer pointed to by I<(char\\ "
1864 "*) arg2>.  The buffer should allow space for up to 16 bytes; the returned "
1865 "string will be null-terminated if it is shorter than that."
1866 msgstr ""
1867
1868 #. type: TP
1869 #: build/C/man2/prctl.2:260
1870 #, no-wrap
1871 msgid "B<PR_SET_NO_NEW_PRIVS> (since Linux 3.5)"
1872 msgstr ""
1873
1874 #. type: Plain text
1875 #: build/C/man2/prctl.2:283
1876 msgid ""
1877 "Set the calling process's I<no_new_privs> bit to the value in I<arg2>.  With "
1878 "I<no_new_privs> set to 1, B<execve>(2)  promises not to grant privileges to "
1879 "do anything that could not have been done without the B<execve>(2)  call "
1880 "(for example, rendering the set-user-ID and set-group-ID permission bits, "
1881 "and file capabilities non-functional).  Once set, this bit cannot be unset.  "
1882 "The setting of this bit is inherited by children created by B<fork>(2)  and "
1883 "B<clone>(2), and preserved across B<execve>(2)."
1884 msgstr ""
1885
1886 #. type: Plain text
1887 #: build/C/man2/prctl.2:286
1888 msgid ""
1889 "For more information, see the kernel source file "
1890 "I<Documentation/prctl/no_new_privs.txt>."
1891 msgstr ""
1892
1893 #. type: TP
1894 #: build/C/man2/prctl.2:286
1895 #, no-wrap
1896 msgid "B<PR_GET_NO_NEW_PRIVS> (since Linux 3.5)"
1897 msgstr ""
1898
1899 #. type: Plain text
1900 #: build/C/man2/prctl.2:297
1901 msgid ""
1902 "Return (as the function result) the value of the I<no_new_privs> bit for the "
1903 "current process.  A value of 0 indicates the regular B<execve>(2)  "
1904 "behavior.  A value of 1 indicates B<execve>(2)  will operate in the "
1905 "privilege-restricting mode described above."
1906 msgstr ""
1907
1908 #. type: TP
1909 #: build/C/man2/prctl.2:297
1910 #, no-wrap
1911 msgid "B<PR_SET_PDEATHSIG> (since Linux 2.1.57)"
1912 msgstr ""
1913
1914 #. type: Plain text
1915 #: build/C/man2/prctl.2:310
1916 msgid ""
1917 "Set the parent process death signal of the calling process to I<arg2> "
1918 "(either a signal value in the range 1..maxsig, or 0 to clear).  This is the "
1919 "signal that the calling process will get when its parent dies.  This value "
1920 "is cleared for the child of a B<fork>(2)  and (since Linux 2.4.36 / 2.6.23)  "
1921 "when executing a set-user-ID or set-group-ID binary.  This value is "
1922 "preserved across B<execve>(2)."
1923 msgstr ""
1924
1925 #. type: TP
1926 #: build/C/man2/prctl.2:310
1927 #, no-wrap
1928 msgid "B<PR_GET_PDEATHSIG> (since Linux 2.3.15)"
1929 msgstr ""
1930
1931 #. type: Plain text
1932 #: build/C/man2/prctl.2:315
1933 msgid ""
1934 "Return the current value of the parent process death signal, in the location "
1935 "pointed to by I<(int\\ *) arg2>."
1936 msgstr ""
1937
1938 #. type: TP
1939 #: build/C/man2/prctl.2:315
1940 #, no-wrap
1941 msgid "B<PR_SET_PTRACER> (since Linux 3.4)"
1942 msgstr ""
1943
1944 #.  commit 2d514487faf188938a4ee4fb3464eeecfbdcf8eb
1945 #.  commit bf06189e4d14641c0148bea16e9dd24943862215
1946 #. type: Plain text
1947 #: build/C/man2/prctl.2:340
1948 msgid ""
1949 "This is meaningful only when the Yama LSM is enabled and in mode 1 "
1950 "(\"restricted ptrace\", visible via I</proc/sys/kernel/yama/ptrace_scope>).  "
1951 "When a \"ptracer process ID\" is passed in I<arg2>, the caller is declaring "
1952 "that the ptracer process can B<ptrace>(2)  the calling process as if it were "
1953 "a direct process ancestor.  Each B<PR_SET_PTRACER> operation replaces the "
1954 "previous \"ptracer process ID\".  Employing B<PR_SET_PTRACER> with I<arg2> "
1955 "set to 0 clears the caller's \"ptracer process ID\".  If I<arg2> is "
1956 "B<PR_SET_PTRACER_ANY>, the ptrace restrictions introduced by Yama are "
1957 "effectively disabled for the calling process."
1958 msgstr ""
1959
1960 #. type: Plain text
1961 #: build/C/man2/prctl.2:343
1962 msgid ""
1963 "For further information, see the kernel source file "
1964 "I<Documentation/security/Yama.txt>."
1965 msgstr ""
1966
1967 #. type: TP
1968 #: build/C/man2/prctl.2:343
1969 #, no-wrap
1970 msgid "B<PR_SET_SECCOMP> (since Linux 2.6.23)"
1971 msgstr ""
1972
1973 #.  See http://thread.gmane.org/gmane.linux.kernel/542632
1974 #.  [PATCH 0 of 2] seccomp updates
1975 #.  andrea@cpushare.com
1976 #. type: Plain text
1977 #: build/C/man2/prctl.2:354
1978 msgid ""
1979 "Set the secure computing (seccomp) mode for the calling thread, to limit the "
1980 "available system calls.  The seccomp mode is selected via I<arg2>.  (The "
1981 "seccomp constants are defined in I<E<lt>linux/seccomp.hE<gt>>.)"
1982 msgstr ""
1983
1984 #. type: Plain text
1985 #: build/C/man2/prctl.2:375
1986 msgid ""
1987 "With I<arg2> set to B<SECCOMP_MODE_STRICT> the only system calls that the "
1988 "thread is permitted to make are B<read>(2), B<write>(2), B<_exit>(2), and "
1989 "B<sigreturn>(2).  Other system calls result in the delivery of a B<SIGKILL> "
1990 "signal.  Strict secure computing mode is useful for number-crunching "
1991 "applications that may need to execute untrusted byte code, perhaps obtained "
1992 "by reading from a pipe or socket.  This operation is available only if the "
1993 "kernel is configured with B<CONFIG_SECCOMP> enabled."
1994 msgstr ""
1995
1996 #. type: Plain text
1997 #: build/C/man2/prctl.2:390
1998 msgid ""
1999 "With I<arg2> set to B<SECCOMP_MODE_FILTER> (since Linux 3.5)  the system "
2000 "calls allowed are defined by a pointer to a Berkeley Packet Filter passed in "
2001 "I<arg3>.  This argument is a pointer to I<struct sock_fprog>; it can be "
2002 "designed to filter arbitrary system calls and system call arguments.  This "
2003 "mode is available only if the kernel is configured with "
2004 "B<CONFIG_SECCOMP_FILTER> enabled."
2005 msgstr ""
2006
2007 #. type: Plain text
2008 #: build/C/man2/prctl.2:405
2009 msgid ""
2010 "If B<SECCOMP_MODE_FILTER> filters permit B<fork>(2), then the seccomp mode "
2011 "is inherited by children created by B<fork>(2); if B<execve>(2)  is "
2012 "permitted, then the seccomp mode is preserved across B<execve>(2).  If the "
2013 "filters permit B<prctl>()  calls, then additional filters can be added; they "
2014 "are run in order until the first non-allow result is seen."
2015 msgstr ""
2016
2017 #. type: Plain text
2018 #: build/C/man2/prctl.2:408
2019 msgid ""
2020 "For further information, see the kernel source file "
2021 "I<Documentation/prctl/seccomp_filter.txt>."
2022 msgstr ""
2023
2024 #. type: TP
2025 #: build/C/man2/prctl.2:408
2026 #, no-wrap
2027 msgid "B<PR_GET_SECCOMP> (since Linux 2.6.23)"
2028 msgstr ""
2029
2030 #. type: Plain text
2031 #: build/C/man2/prctl.2:424
2032 msgid ""
2033 "Return (as the function result)  the secure computing mode of the calling "
2034 "thread.  If the caller is not in secure computing mode, this operation "
2035 "returns 0; if the caller is in strict secure computing mode, then the "
2036 "B<prctl>()  call will cause a B<SIGKILL> signal to be sent to the process.  "
2037 "If the caller is in filter mode, and this system call is allowed by the "
2038 "seccomp filters, it returns 2.  This operation is available only if the "
2039 "kernel is configured with B<CONFIG_SECCOMP> enabled."
2040 msgstr ""
2041
2042 #. type: TP
2043 #: build/C/man2/prctl.2:424
2044 #, no-wrap
2045 msgid "B<PR_SET_SECUREBITS> (since Linux 2.6.26)"
2046 msgstr ""
2047
2048 #. type: Plain text
2049 #: build/C/man2/prctl.2:430
2050 msgid ""
2051 "Set the \"securebits\" flags of the calling thread to the value supplied in "
2052 "I<arg2>.  See B<capabilities>(7)."
2053 msgstr ""
2054
2055 #. type: TP
2056 #: build/C/man2/prctl.2:430
2057 #, no-wrap
2058 msgid "B<PR_GET_SECUREBITS> (since Linux 2.6.26)"
2059 msgstr ""
2060
2061 #. type: Plain text
2062 #: build/C/man2/prctl.2:436
2063 msgid ""
2064 "Return (as the function result)  the \"securebits\" flags of the calling "
2065 "thread.  See B<capabilities>(7)."
2066 msgstr ""
2067
2068 #. type: TP
2069 #: build/C/man2/prctl.2:436
2070 #, no-wrap
2071 msgid "B<PR_SET_THP_DISABLE> (since Linux 3.15)"
2072 msgstr ""
2073
2074 #.  commit a0715cc22601e8830ace98366c0c2bd8da52af52
2075 #. type: Plain text
2076 #: build/C/man2/prctl.2:452
2077 msgid ""
2078 "Set the state of the \"THP disable\" flag for the calling thread.  If "
2079 "I<arg2> has a nonzero value, the flag is set, otherwise it is cleared.  "
2080 "Setting this flag provides a method for disabling transparent huge pages for "
2081 "jobs where the code cannot be modified, and using a malloc hook with "
2082 "B<madvise>(2)  is not an option (i.e., statically allocated data).  The "
2083 "setting of the \"THP disable\" flag is inherited by a child created via "
2084 "B<fork>(2)  and is preserved across B<execve>(2)."
2085 msgstr ""
2086
2087 #. type: TP
2088 #: build/C/man2/prctl.2:452
2089 #, no-wrap
2090 msgid "B<PR_GET_THP_DISABLE> (since Linux 3.15)"
2091 msgstr ""
2092
2093 #. type: Plain text
2094 #: build/C/man2/prctl.2:457
2095 msgid ""
2096 "Return (via the function result) the current setting of the \"THP disable\" "
2097 "flag for the calling thread: either 1, if the flag is set, or 0, if it is "
2098 "not."
2099 msgstr ""
2100
2101 #. type: TP
2102 #: build/C/man2/prctl.2:457
2103 #, no-wrap
2104 msgid "B<PR_GET_TID_ADDRESS> (since Linux 3.5)"
2105 msgstr ""
2106
2107 #.  commit 300f786b2683f8bb1ec0afb6e1851183a479c86d
2108 #. type: Plain text
2109 #: build/C/man2/prctl.2:472
2110 msgid ""
2111 "Retrieve the I<clear_child_tid> address set by B<set_tid_address>(2)  and "
2112 "the B<clone>(2)  B<CLONE_CHILD_CLEARTID> flag, in the location pointed to by "
2113 "I<(int\\ **)\\ arg2>.  This feature is available only if the kernel is built "
2114 "with the B<CONFIG_CHECKPOINT_RESTORE> option enabled."
2115 msgstr ""
2116
2117 #. type: TP
2118 #: build/C/man2/prctl.2:472
2119 #, no-wrap
2120 msgid "B<PR_SET_TIMERSLACK> (since Linux 2.6.28)"
2121 msgstr ""
2122
2123 #.  See https://lwn.net/Articles/369549/
2124 #.  commit 6976675d94042fbd446231d1bd8b7de71a980ada
2125 #.  It seems that it's not possible to set the timer slack to zero;
2126 #.  The minimum value is 1? Seems a little strange.
2127 #. type: Plain text
2128 #: build/C/man2/prctl.2:491
2129 msgid ""
2130 "Set the current timer slack for the calling thread to the nanosecond value "
2131 "supplied in I<arg2>.  If I<arg2> is less than or equal to zero, reset the "
2132 "current timer slack to the thread's default timer slack value.  The timer "
2133 "slack is used by the kernel to group timer expirations for the calling "
2134 "thread that are close to one another; as a consequence, timer expirations "
2135 "for the thread may be up to the specified number of nanoseconds late (but "
2136 "will never expire early).  Grouping timer expirations can help reduce system "
2137 "power consumption by minimizing CPU wake-ups."
2138 msgstr ""
2139
2140 #.  List obtained by grepping for futex usage in glibc source
2141 #. type: Plain text
2142 #: build/C/man2/prctl.2:511
2143 msgid ""
2144 "The timer expirations affected by timer slack are those set by B<select>(2), "
2145 "B<pselect>(2), B<poll>(2), B<ppoll>(2), B<epoll_wait>(2), B<epoll_pwait>(2), "
2146 "B<clock_nanosleep>(2), B<nanosleep>(2), and B<futex>(2)  (and thus the "
2147 "library functions implemented via futexes, including "
2148 "B<pthread_cond_timedwait>(3), B<pthread_mutex_timedlock>(3), "
2149 "B<pthread_rwlock_timedrdlock>(3), B<pthread_rwlock_timedwrlock>(3), and "
2150 "B<sem_timedwait>(3))."
2151 msgstr ""
2152
2153 #. type: Plain text
2154 #: build/C/man2/prctl.2:515
2155 msgid ""
2156 "Timer slack is not applied to threads that are scheduled under a real-time "
2157 "scheduling policy (see B<sched_setscheduler>(2))."
2158 msgstr ""
2159
2160 #. type: Plain text
2161 #: build/C/man2/prctl.2:532
2162 msgid ""
2163 "Each thread has two associated timer slack values: a \"default\" value, and "
2164 "a \"current\" value.  The current value is the one that governs grouping of "
2165 "timer expirations.  When a new thread is created, the two timer slack values "
2166 "are made the same as the current value of the creating thread.  Thereafter, "
2167 "a thread can adjust its current timer slack value via B<PR_SET_TIMERSLACK> "
2168 "(the default value can't be changed).  The timer slack values of I<init> "
2169 "(PID 1), the ancestor of all processes, are 50,000 nanoseconds (50 "
2170 "microseconds).  The timer slack values are preserved across B<execve>(2)."
2171 msgstr ""
2172
2173 #. type: TP
2174 #: build/C/man2/prctl.2:532
2175 #, no-wrap
2176 msgid "B<PR_GET_TIMERSLACK> (since Linux 2.6.28)"
2177 msgstr ""
2178
2179 #. type: Plain text
2180 #: build/C/man2/prctl.2:536
2181 msgid ""
2182 "Return (as the function result)  the current timer slack value of the "
2183 "calling thread."
2184 msgstr ""
2185
2186 #. type: TP
2187 #: build/C/man2/prctl.2:536
2188 #, no-wrap
2189 msgid "B<PR_SET_TIMING> (since Linux 2.6.0-test4)"
2190 msgstr ""
2191
2192 #.  0
2193 #.  1
2194 #.  PR_TIMING_TIMESTAMP doesn't do anything in 2.6.26-rc8,
2195 #.  and looking at the patch history, it appears
2196 #.  that it never did anything.
2197 #. type: Plain text
2198 #: build/C/man2/prctl.2:553
2199 msgid ""
2200 "Set whether to use (normal, traditional) statistical process timing or "
2201 "accurate timestamp-based process timing, by passing B<PR_TIMING_STATISTICAL> "
2202 "or B<PR_TIMING_TIMESTAMP> to I<arg2>.  B<PR_TIMING_TIMESTAMP> is not "
2203 "currently implemented (attempting to set this mode will yield the error "
2204 "B<EINVAL>)."
2205 msgstr ""
2206
2207 #. type: TP
2208 #: build/C/man2/prctl.2:553
2209 #, no-wrap
2210 msgid "B<PR_GET_TIMING> (since Linux 2.6.0-test4)"
2211 msgstr ""
2212
2213 #. type: Plain text
2214 #: build/C/man2/prctl.2:557
2215 msgid ""
2216 "Return (as the function result) which process timing method is currently in "
2217 "use."
2218 msgstr ""
2219
2220 #. type: TP
2221 #: build/C/man2/prctl.2:557
2222 #, no-wrap
2223 msgid "B<PR_TASK_PERF_EVENTS_DISABLE> (since Linux 2.6.31)"
2224 msgstr ""
2225
2226 #. type: Plain text
2227 #: build/C/man2/prctl.2:566
2228 msgid ""
2229 "Disable all performance counters attached to the calling process, regardless "
2230 "of whether the counters were created by this process or another process.  "
2231 "Performance counters created by the calling process for other processes are "
2232 "unaffected.  For more information on performance counters, see the Linux "
2233 "kernel source file I<tools/perf/design.txt>."
2234 msgstr ""
2235
2236 #.  commit 1d1c7ddbfab358445a542715551301b7fc363e28
2237 #. type: Plain text
2238 #: build/C/man2/prctl.2:572
2239 msgid ""
2240 "Originally called B<PR_TASK_PERF_COUNTERS_DISABLE>; renamed (with same "
2241 "numerical value)  in Linux 2.6.32."
2242 msgstr ""
2243
2244 #. type: TP
2245 #: build/C/man2/prctl.2:572
2246 #, no-wrap
2247 msgid "B<PR_TASK_PERF_EVENTS_ENABLE> (since Linux 2.6.31)"
2248 msgstr ""
2249
2250 #. type: Plain text
2251 #: build/C/man2/prctl.2:577
2252 msgid ""
2253 "The converse of B<PR_TASK_PERF_EVENTS_DISABLE>; enable performance counters "
2254 "attached to the calling process."
2255 msgstr ""
2256
2257 #.  commit 1d1c7ddbfab358445a542715551301b7fc363e28
2258 #.  commit cdd6c482c9ff9c55475ee7392ec8f672eddb7be6
2259 #. type: Plain text
2260 #: build/C/man2/prctl.2:584
2261 msgid "Originally called B<PR_TASK_PERF_COUNTERS_ENABLE>; renamed in Linux 2.6.32."
2262 msgstr ""
2263
2264 #. type: TP
2265 #: build/C/man2/prctl.2:584
2266 #, no-wrap
2267 msgid "B<PR_SET_TSC> (since Linux 2.6.26, x86 only)"
2268 msgstr ""
2269
2270 #. type: Plain text
2271 #: build/C/man2/prctl.2:597
2272 msgid ""
2273 "Set the state of the flag determining whether the timestamp counter can be "
2274 "read by the process.  Pass B<PR_TSC_ENABLE> to I<arg2> to allow it to be "
2275 "read, or B<PR_TSC_SIGSEGV> to generate a B<SIGSEGV> when the process tries "
2276 "to read the timestamp counter."
2277 msgstr ""
2278
2279 #. type: TP
2280 #: build/C/man2/prctl.2:597
2281 #, no-wrap
2282 msgid "B<PR_GET_TSC> (since Linux 2.6.26, x86 only)"
2283 msgstr ""
2284
2285 #. type: Plain text
2286 #: build/C/man2/prctl.2:603
2287 msgid ""
2288 "Return the state of the flag determining whether the timestamp counter can "
2289 "be read, in the location pointed to by I<(int\\ *) arg2>."
2290 msgstr ""
2291
2292 #. type: TP
2293 #: build/C/man2/prctl.2:603
2294 #, no-wrap
2295 msgid "B<PR_SET_UNALIGN>"
2296 msgstr ""
2297
2298 #. type: Plain text
2299 #: build/C/man2/prctl.2:613
2300 msgid ""
2301 "(Only on: ia64, since Linux 2.3.48; parisc, since Linux 2.6.15; PowerPC, "
2302 "since Linux 2.6.18; Alpha, since Linux 2.6.22)  Set unaligned access control "
2303 "bits to I<arg2>.  Pass B<PR_UNALIGN_NOPRINT> to silently fix up unaligned "
2304 "user accesses, or B<PR_UNALIGN_SIGBUS> to generate B<SIGBUS> on unaligned "
2305 "user access."
2306 msgstr ""
2307
2308 #. type: TP
2309 #: build/C/man2/prctl.2:613
2310 #, no-wrap
2311 msgid "B<PR_GET_UNALIGN>"
2312 msgstr ""
2313
2314 #. type: Plain text
2315 #: build/C/man2/prctl.2:620
2316 msgid ""
2317 "(see B<PR_SET_UNALIGN> for information on versions and architectures)  "
2318 "Return unaligned access control bits, in the location pointed to by I<(int\\ "
2319 "*) arg2>."
2320 msgstr ""
2321
2322 #. type: TP
2323 #: build/C/man2/prctl.2:620
2324 #, no-wrap
2325 msgid "B<PR_MCE_KILL> (since Linux 2.6.32)"
2326 msgstr ""
2327
2328 #. type: Plain text
2329 #: build/C/man2/prctl.2:660
2330 msgid ""
2331 "Set the machine check memory corruption kill policy for the current thread.  "
2332 "If I<arg2> is B<PR_MCE_KILL_CLEAR>, clear the thread memory corruption kill "
2333 "policy and use the system-wide default.  (The system-wide default is defined "
2334 "by I</proc/sys/vm/memory_failure_early_kill>; see B<proc>(5).)  If I<arg2> "
2335 "is B<PR_MCE_KILL_SET>, use a thread-specific memory corruption kill policy.  "
2336 "In this case, I<arg3> defines whether the policy is I<early kill> "
2337 "(B<PR_MCE_KILL_EARLY>), I<late kill> (B<PR_MCE_KILL_LATE>), or the "
2338 "system-wide default (B<PR_MCE_KILL_DEFAULT>).  Early kill means that the "
2339 "thread receives a B<SIGBUS> signal as soon as hardware memory corruption is "
2340 "detected inside its address space.  In late kill mode, the process is killed "
2341 "only when it accesses a corrupted page.  See B<sigaction>(2)  for more "
2342 "information on the B<SIGBUS> signal.  The policy is inherited by children.  "
2343 "The remaining unused B<prctl>()  arguments must be zero for future "
2344 "compatibility."
2345 msgstr ""
2346
2347 #. type: TP
2348 #: build/C/man2/prctl.2:660
2349 #, no-wrap
2350 msgid "B<PR_MCE_KILL_GET> (since Linux 2.6.32)"
2351 msgstr ""
2352
2353 #. type: Plain text
2354 #: build/C/man2/prctl.2:666
2355 msgid ""
2356 "Return the current per-process machine check kill policy.  All unused "
2357 "B<prctl>()  arguments must be zero."
2358 msgstr ""
2359
2360 #. type: TP
2361 #: build/C/man2/prctl.2:666
2362 #, no-wrap
2363 msgid "B<PR_SET_MM> (since Linux 3.3)"
2364 msgstr ""
2365
2366 #.  commit 028ee4be34a09a6d48bdf30ab991ae933a7bc036
2367 #. type: Plain text
2368 #: build/C/man2/prctl.2:687
2369 msgid ""
2370 "Modify certain kernel memory map descriptor fields of the calling process.  "
2371 "Usually these fields are set by the kernel and dynamic loader (see "
2372 "B<ld.so>(8)  for more information) and a regular application should not use "
2373 "this feature.  However, there are cases, such as self-modifying programs, "
2374 "where a program might find it useful to change its own memory map.  This "
2375 "feature is available only if the kernel is built with the "
2376 "B<CONFIG_CHECKPOINT_RESTORE> option enabled.  The calling process must have "
2377 "the B<CAP_SYS_RESOURCE> capability.  The value in I<arg2> is one of the "
2378 "options below, while I<arg3> provides a new value for the option."
2379 msgstr ""
2380
2381 #. type: TP
2382 #: build/C/man2/prctl.2:688
2383 #, no-wrap
2384 msgid "B<PR_SET_MM_START_CODE>"
2385 msgstr ""
2386
2387 #. type: Plain text
2388 #: build/C/man2/prctl.2:697
2389 msgid ""
2390 "Set the address above which the program text can run.  The corresponding "
2391 "memory area must be readable and executable, but not writable or sharable "
2392 "(see B<mprotect>(2)  and B<mmap>(2)  for more information)."
2393 msgstr ""
2394
2395 #. type: TP
2396 #: build/C/man2/prctl.2:697
2397 #, no-wrap
2398 msgid "B<PR_SET_MM_END_CODE>"
2399 msgstr ""
2400
2401 #. type: Plain text
2402 #: build/C/man2/prctl.2:702
2403 msgid ""
2404 "Set the address below which the program text can run.  The corresponding "
2405 "memory area must be readable and executable, but not writable or sharable."
2406 msgstr ""
2407
2408 #. type: TP
2409 #: build/C/man2/prctl.2:702
2410 #, no-wrap
2411 msgid "B<PR_SET_MM_START_DATA>"
2412 msgstr ""
2413
2414 #. type: Plain text
2415 #: build/C/man2/prctl.2:708
2416 msgid ""
2417 "Set the address above which initialized and uninitialized (bss) data are "
2418 "placed.  The corresponding memory area must be readable and writable, but "
2419 "not executable or sharable."
2420 msgstr ""
2421
2422 #. type: TP
2423 #: build/C/man2/prctl.2:708
2424 #, no-wrap
2425 msgid "B<PR_SET_MM_END_DATA>"
2426 msgstr ""
2427
2428 #. type: Plain text
2429 #: build/C/man2/prctl.2:714
2430 msgid ""
2431 "Set the address below which initialized and uninitialized (bss) data are "
2432 "placed.  The corresponding memory area must be readable and writable, but "
2433 "not executable or sharable."
2434 msgstr ""
2435
2436 #. type: TP
2437 #: build/C/man2/prctl.2:714
2438 #, no-wrap
2439 msgid "B<PR_SET_MM_START_STACK>"
2440 msgstr ""
2441
2442 #. type: Plain text
2443 #: build/C/man2/prctl.2:718
2444 msgid ""
2445 "Set the start address of the stack.  The corresponding memory area must be "
2446 "readable and writable."
2447 msgstr ""
2448
2449 #. type: TP
2450 #: build/C/man2/prctl.2:718
2451 #, no-wrap
2452 msgid "B<PR_SET_MM_START_BRK>"
2453 msgstr ""
2454
2455 #. type: Plain text
2456 #: build/C/man2/prctl.2:730
2457 msgid ""
2458 "Set the address above which the program heap can be expanded with B<brk>(2)  "
2459 "call.  The address must be greater than the ending address of the current "
2460 "program data segment.  In addition, the combined size of the resulting heap "
2461 "and the size of the data segment can't exceed the B<RLIMIT_DATA> resource "
2462 "limit (see B<setrlimit>(2))."
2463 msgstr ""
2464
2465 #. type: TP
2466 #: build/C/man2/prctl.2:730
2467 #, no-wrap
2468 msgid "B<PR_SET_MM_BRK>"
2469 msgstr ""
2470
2471 #. type: Plain text
2472 #: build/C/man2/prctl.2:738
2473 msgid ""
2474 "Set the current B<brk>(2)  value.  The requirements for the address are the "
2475 "same as for the B<PR_SET_MM_START_BRK> option."
2476 msgstr ""
2477
2478 #.  commit fe8c7f5cbf91124987106faa3bdf0c8b955c4cf7
2479 #. type: Plain text
2480 #: build/C/man2/prctl.2:741
2481 msgid "The following options are available since Linux 3.5."
2482 msgstr ""
2483
2484 #. type: TP
2485 #: build/C/man2/prctl.2:741
2486 #, no-wrap
2487 msgid "B<PR_SET_MM_ARG_START>"
2488 msgstr ""
2489
2490 #. type: Plain text
2491 #: build/C/man2/prctl.2:744
2492 msgid "Set the address above which the program command line is placed."
2493 msgstr ""
2494
2495 #. type: TP
2496 #: build/C/man2/prctl.2:744
2497 #, no-wrap
2498 msgid "B<PR_SET_MM_ARG_END>"
2499 msgstr ""
2500
2501 #. type: Plain text
2502 #: build/C/man2/prctl.2:747
2503 msgid "Set the address below which the program command line is placed."
2504 msgstr ""
2505
2506 #. type: TP
2507 #: build/C/man2/prctl.2:747
2508 #, no-wrap
2509 msgid "B<PR_SET_MM_ENV_START>"
2510 msgstr ""
2511
2512 #. type: Plain text
2513 #: build/C/man2/prctl.2:750
2514 msgid "Set the address above which the program environment is placed."
2515 msgstr ""
2516
2517 #. type: TP
2518 #: build/C/man2/prctl.2:750
2519 #, no-wrap
2520 msgid "B<PR_SET_MM_ENV_END>"
2521 msgstr ""
2522
2523 #. type: Plain text
2524 #: build/C/man2/prctl.2:753
2525 msgid "Set the address below which the program environment is placed."
2526 msgstr ""
2527
2528 #. type: Plain text
2529 #: build/C/man2/prctl.2:766
2530 msgid ""
2531 "The address passed with B<PR_SET_MM_ARG_START>, B<PR_SET_MM_ARG_END>, "
2532 "B<PR_SET_MM_ENV_START>, and B<PR_SET_MM_ENV_END> should belong to a process "
2533 "stack area.  Thus, the corresponding memory area must be readable, writable, "
2534 "and (depending on the kernel configuration) have the B<MAP_GROWSDOWN> "
2535 "attribute set (see B<mmap>(2))."
2536 msgstr ""
2537
2538 #. type: TP
2539 #: build/C/man2/prctl.2:766
2540 #, no-wrap
2541 msgid "B<PR_SET_MM_AUXV>"
2542 msgstr ""
2543
2544 #. type: Plain text
2545 #: build/C/man2/prctl.2:775
2546 msgid ""
2547 "Set a new auxiliary vector.  The I<arg3> argument should provide the address "
2548 "of the vector.  The I<arg4> is the size of the vector."
2549 msgstr ""
2550
2551 #. type: TP
2552 #: build/C/man2/prctl.2:775
2553 #, no-wrap
2554 msgid "B<PR_SET_MM_EXE_FILE>"
2555 msgstr ""
2556
2557 #.  commit b32dfe377102ce668775f8b6b1461f7ad428f8b6
2558 #. type: Plain text
2559 #: build/C/man2/prctl.2:787
2560 msgid ""
2561 "Supersede the I</proc/pid/exe> symbolic link with a new one pointing to a "
2562 "new executable file identified by the file descriptor provided in I<arg3> "
2563 "argument.  The file descriptor should be obtained with a regular B<open>(2)  "
2564 "call."
2565 msgstr ""
2566
2567 #. type: Plain text
2568 #: build/C/man2/prctl.2:794
2569 msgid ""
2570 "To change the symbolic link, one needs to unmap all existing executable "
2571 "memory areas, including those created by the kernel itself (for example the "
2572 "kernel usually creates at least one executable memory area for the ELF "
2573 "I<.text> section)."
2574 msgstr ""
2575
2576 #. type: Plain text
2577 #: build/C/man2/prctl.2:800
2578 msgid ""
2579 "The second limitation is that such transitions can be done only once in a "
2580 "process life time.  Any further attempts will be rejected.  This should help "
2581 "system administrators monitor unusual symbolic-link transitions over all "
2582 "processes running on a system."
2583 msgstr ""
2584
2585 #. type: Plain text
2586 #: build/C/man2/prctl.2:822
2587 msgid ""
2588 "On success, B<PR_GET_DUMPABLE>, B<PR_GET_KEEPCAPS>, B<PR_GET_NO_NEW_PRIVS>, "
2589 "B<PR_GET_THP_DISABLE>, B<PR_CAPBSET_READ>, B<PR_GET_TIMING>, "
2590 "B<PR_GET_TIMERSLACK>, B<PR_GET_SECUREBITS>, B<PR_MCE_KILL_GET>, and (if it "
2591 "returns)  B<PR_GET_SECCOMP> return the nonnegative values described above.  "
2592 "All other I<option> values return 0 on success.  On error, -1 is returned, "
2593 "and I<errno> is set appropriately."
2594 msgstr ""
2595
2596 #. type: Plain text
2597 #: build/C/man2/prctl.2:827
2598 msgid "I<arg2> is an invalid address."
2599 msgstr ""
2600
2601 #. type: Plain text
2602 #: build/C/man2/prctl.2:832
2603 msgid "The value of I<option> is not recognized."
2604 msgstr ""
2605
2606 #. type: Plain text
2607 #: build/C/man2/prctl.2:844
2608 msgid ""
2609 "I<option> is B<PR_MCE_KILL> or B<PR_MCE_KILL_GET> or B<PR_SET_MM>, and "
2610 "unused B<prctl>()  arguments were not specified as zero."
2611 msgstr ""
2612
2613 #. type: Plain text
2614 #: build/C/man2/prctl.2:849
2615 msgid "I<arg2> is not valid value for this I<option>."
2616 msgstr ""
2617
2618 #. type: Plain text
2619 #: build/C/man2/prctl.2:858
2620 msgid ""
2621 "I<option> is B<PR_SET_SECCOMP> or B<PR_GET_SECCOMP>, and the kernel was not "
2622 "configured with B<CONFIG_SECCOMP>."
2623 msgstr ""
2624
2625 #. type: Plain text
2626 #: build/C/man2/prctl.2:864
2627 msgid "I<option> is B<PR_SET_MM>, and one of the following is true"
2628 msgstr ""
2629
2630 #. type: Plain text
2631 #: build/C/man2/prctl.2:870
2632 msgid "I<arg4> or I<arg5> is nonzero;"
2633 msgstr ""
2634
2635 #. type: Plain text
2636 #: build/C/man2/prctl.2:875
2637 msgid ""
2638 "I<arg3> is greater than B<TASK_SIZE> (the limit on the size of the user "
2639 "address space for this architecture);"
2640 msgstr ""
2641
2642 #. type: Plain text
2643 #: build/C/man2/prctl.2:885
2644 msgid ""
2645 "I<arg2> is B<PR_SET_MM_START_CODE>, B<PR_SET_MM_END_CODE>, "
2646 "B<PR_SET_MM_START_DATA>, B<PR_SET_MM_END_DATA>, or B<PR_SET_MM_START_STACK>, "
2647 "and the permissions of the corresponding memory area are not as required;"
2648 msgstr ""
2649
2650 #. type: Plain text
2651 #: build/C/man2/prctl.2:897
2652 msgid ""
2653 "I<arg2> is B<PR_SET_MM_START_BRK> or B<PR_SET_MM_BRK>, and I<arg3> is less "
2654 "than or equal to the end of the data segment or specifies a value that would "
2655 "cause the B<RLIMIT_DATA> resource limit to be exceeded."
2656 msgstr ""
2657
2658 #. type: Plain text
2659 #: build/C/man2/prctl.2:908
2660 msgid ""
2661 "I<option> is B<PR_SET_PTRACER> and I<arg2> is not 0, B<PR_SET_PTRACER_ANY>, "
2662 "or the PID of an existing process."
2663 msgstr ""
2664
2665 #. type: Plain text
2666 #: build/C/man2/prctl.2:916
2667 msgid "I<option> is B<PR_SET_PDEATHSIG> and I<arg2> is not a valid signal number."
2668 msgstr ""
2669
2670 #. type: Plain text
2671 #: build/C/man2/prctl.2:927
2672 msgid ""
2673 "I<option> is B<PR_SET_DUMPABLE> and I<arg2> is neither B<SUID_DUMP_DISABLE> "
2674 "nor B<SUID_DUMP_USER>."
2675 msgstr ""
2676
2677 #. type: Plain text
2678 #: build/C/man2/prctl.2:936
2679 msgid "I<option> is B<PR_SET_TIMING> and I<arg2> is not B<PR_TIMING_STATISTICAL>."
2680 msgstr ""
2681
2682 #. type: Plain text
2683 #: build/C/man2/prctl.2:950
2684 msgid ""
2685 "I<option> is B<PR_SET_NO_NEW_PRIVS> and I<arg2> is not equal to 1 or "
2686 "I<arg3>, I<arg4>, or I<arg5> is nonzero."
2687 msgstr ""
2688
2689 #. type: Plain text
2690 #: build/C/man2/prctl.2:962
2691 msgid ""
2692 "I<option> is B<PR_GET_NO_NEW_PRIVS> and I<arg2>, I<arg3>, I<arg4>, or "
2693 "I<arg5> is nonzero."
2694 msgstr ""
2695
2696 #. type: Plain text
2697 #: build/C/man2/prctl.2:973
2698 msgid ""
2699 "I<option> is B<PR_SET_THP_DISABLE> and I<arg3>, I<arg4>, or I<arg5> is "
2700 "nonzero."
2701 msgstr ""
2702
2703 #. type: Plain text
2704 #: build/C/man2/prctl.2:985
2705 msgid ""
2706 "I<option> is B<PR_GET_THP_DISABLE> and I<arg2>, I<arg3>, I<arg4>, or I<arg5> "
2707 "is nonzero."
2708 msgstr ""
2709
2710 #. type: Plain text
2711 #: build/C/man2/prctl.2:997
2712 msgid ""
2713 "I<option> is B<PR_SET_SECUREBITS>, and the caller does not have the "
2714 "B<CAP_SETPCAP> capability, or tried to unset a \"locked\" flag, or tried to "
2715 "set a flag whose corresponding locked flag was set (see B<capabilities>(7))."
2716 msgstr ""
2717
2718 #. type: Plain text
2719 #: build/C/man2/prctl.2:1007
2720 msgid ""
2721 "I<option> is B<PR_SET_KEEPCAPS>, and the callers's "
2722 "B<SECURE_KEEP_CAPS_LOCKED> flag is set (see B<capabilities>(7))."
2723 msgstr ""
2724
2725 #. type: Plain text
2726 #: build/C/man2/prctl.2:1015
2727 msgid ""
2728 "I<option> is B<PR_CAPBSET_DROP>, and the caller does not have the "
2729 "B<CAP_SETPCAP> capability."
2730 msgstr ""
2731
2732 #. type: Plain text
2733 #: build/C/man2/prctl.2:1023
2734 msgid ""
2735 "I<option> is B<PR_SET_MM>, and the caller does not have the "
2736 "B<CAP_SYS_RESOURCE> capability."
2737 msgstr ""
2738
2739 #. type: TP
2740 #: build/C/man2/prctl.2:1023
2741 #, no-wrap
2742 msgid "B<EACCES>"
2743 msgstr ""
2744
2745 #. type: Plain text
2746 #: build/C/man2/prctl.2:1033
2747 msgid ""
2748 "I<option> is B<PR_SET_MM>, and I<arg3> is B<PR_SET_MM_EXE_FILE>, the file is "
2749 "not executable."
2750 msgstr ""
2751
2752 #. type: TP
2753 #: build/C/man2/prctl.2:1033
2754 #, no-wrap
2755 msgid "B<EBUSY>"
2756 msgstr ""
2757
2758 #. type: Plain text
2759 #: build/C/man2/prctl.2:1044
2760 msgid ""
2761 "I<option> is B<PR_SET_MM>, I<arg3> is B<PR_SET_MM_EXE_FILE>, and this the "
2762 "second attempt to change the I</proc/pid/exe> symbolic link, which is "
2763 "prohibited."
2764 msgstr ""
2765
2766 #. type: TP
2767 #: build/C/man2/prctl.2:1044 build/C/man2/signalfd.2:266 build/C/man2/timerfd_create.2:338
2768 #, no-wrap
2769 msgid "B<EBADF>"
2770 msgstr ""
2771
2772 #.  The following can't actually happen, because prctl() in
2773 #.  seccomp mode will cause SIGKILL.
2774 #.  .TP
2775 #.  .B EPERM
2776 #.  .I option
2777 #.  is
2778 #.  .BR PR_SET_SECCOMP ,
2779 #.  and secure computing mode is already 1.
2780 #. type: Plain text
2781 #: build/C/man2/prctl.2:1063
2782 msgid ""
2783 "I<option> is B<PR_SET_MM>, I<arg3> is B<PR_SET_MM_EXE_FILE>, and the file "
2784 "descriptor passed in I<arg4> is not valid."
2785 msgstr ""
2786
2787 #.  The library interface was added in glibc 2.0.6
2788 #. type: Plain text
2789 #: build/C/man2/prctl.2:1068
2790 msgid "The B<prctl>()  system call was introduced in Linux 2.1.57."
2791 msgstr ""
2792
2793 #. type: Plain text
2794 #: build/C/man2/prctl.2:1075
2795 msgid ""
2796 "This call is Linux-specific.  IRIX has a B<prctl>()  system call (also "
2797 "introduced in Linux 2.1.44 as irix_prctl on the MIPS architecture), with "
2798 "prototype"
2799 msgstr ""
2800
2801 #. type: Plain text
2802 #: build/C/man2/prctl.2:1077
2803 msgid "B<ptrdiff_t prctl(int >I<option>B<, int >I<arg2>B<, int >I<arg3>B<);>"
2804 msgstr ""
2805
2806 #. type: Plain text
2807 #: build/C/man2/prctl.2:1082
2808 msgid ""
2809 "and options to get the maximum number of processes per user, get the maximum "
2810 "number of processors the calling process can use, find out whether a "
2811 "specified process is currently blocked, get or set the maximum stack size, "
2812 "and so on."
2813 msgstr ""
2814
2815 #. type: Plain text
2816 #: build/C/man2/prctl.2:1085
2817 msgid "B<signal>(2), B<core>(5)"
2818 msgstr ""
2819
2820 #. type: TH
2821 #: build/C/man3/profil.3:28
2822 #, no-wrap
2823 msgid "PROFIL"
2824 msgstr ""
2825
2826 #. type: Plain text
2827 #: build/C/man3/profil.3:31
2828 msgid "profil - execution time profile"
2829 msgstr ""
2830
2831 #. type: Plain text
2832 #: build/C/man3/profil.3:34
2833 #, no-wrap
2834 msgid "B<#include E<lt>unistd.hE<gt>>\n"
2835 msgstr ""
2836
2837 #. type: Plain text
2838 #: build/C/man3/profil.3:37
2839 #, no-wrap
2840 msgid ""
2841 "B<int profil(unsigned short *>I<buf>B<, size_t >I<bufsiz>B<,>\n"
2842 "B<           size_t >I<offset>B<, unsigned int >I<scale>B<);>\n"
2843 msgstr ""
2844
2845 #. type: Plain text
2846 #: build/C/man3/profil.3:46
2847 msgid "B<profil>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
2848 msgstr ""
2849
2850 #. type: Plain text
2851 #: build/C/man3/profil.3:68
2852 msgid ""
2853 "This routine provides a means to find out in what areas your program spends "
2854 "most of its time.  The argument I<buf> points to I<bufsiz> bytes of core.  "
2855 "Every virtual 10 milliseconds, the user's program counter (PC)  is examined: "
2856 "I<offset> is subtracted and the result is multiplied by I<scale> and divided "
2857 "by 65536.  If the resulting value is less than I<bufsiz>, then the "
2858 "corresponding entry in I<buf> is incremented.  If I<buf> is NULL, profiling "
2859 "is disabled."
2860 msgstr ""
2861
2862 #. type: Plain text
2863 #: build/C/man3/profil.3:70
2864 msgid "Zero is always returned."
2865 msgstr ""
2866
2867 #. type: Plain text
2868 #: build/C/man3/profil.3:72
2869 msgid "Similar to a call in SVr4 (but not POSIX.1-2001)."
2870 msgstr ""
2871
2872 #. type: Plain text
2873 #: build/C/man3/profil.3:78
2874 msgid ""
2875 "B<profil>()  cannot be used on a program that also uses B<ITIMER_PROF> "
2876 "interval timers (see B<setitimer>(2))."
2877 msgstr ""
2878
2879 #. type: Plain text
2880 #: build/C/man3/profil.3:81
2881 msgid ""
2882 "True kernel profiling provides more accurate results.  Libc 4.4 contained a "
2883 "kernel patch providing a system call profil."
2884 msgstr ""
2885
2886 #. type: Plain text
2887 #: build/C/man3/profil.3:86
2888 msgid "B<gprof>(1), B<setitimer>(2), B<sigaction>(2), B<signal>(2)"
2889 msgstr ""
2890
2891 #. type: TH
2892 #: build/C/man3/psignal.3:30
2893 #, no-wrap
2894 msgid "PSIGNAL"
2895 msgstr ""
2896
2897 #. type: TH
2898 #: build/C/man3/psignal.3:30
2899 #, no-wrap
2900 msgid "2010-10-06"
2901 msgstr ""
2902
2903 #. type: TH
2904 #: build/C/man3/psignal.3:30 build/C/man3/raise.3:29 build/C/man7/sigevent.7:26
2905 #, no-wrap
2906 msgid "GNU"
2907 msgstr ""
2908
2909 #. type: Plain text
2910 #: build/C/man3/psignal.3:33
2911 msgid "psignal, psiginfo - print signal message"
2912 msgstr ""
2913
2914 #. type: Plain text
2915 #: build/C/man3/psignal.3:39
2916 #, no-wrap
2917 msgid ""
2918 "B<void psignal(int >I<sig>B<, const char *>I<s>B<);>\n"
2919 "B<void psiginfo(const siginfo_t *>I<pinfo>B<, const char *>I<s>B<);>\n"
2920 msgstr ""
2921
2922 #. type: Plain text
2923 #: build/C/man3/psignal.3:41
2924 #, no-wrap
2925 msgid "B<extern const char *const >I<sys_siglist>B<[];>\n"
2926 msgstr ""
2927
2928 #. type: Plain text
2929 #: build/C/man3/psignal.3:50
2930 msgid "B<psignal>(): _SVID_SOURCE || _BSD_SOURCE"
2931 msgstr ""
2932
2933 #. type: Plain text
2934 #: build/C/man3/psignal.3:53
2935 msgid ""
2936 "B<psiginfo>(): _XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ "
2937 "200809L"
2938 msgstr ""
2939
2940 #. type: Plain text
2941 #: build/C/man3/psignal.3:56
2942 msgid "I<sys_siglist>: _BSD_SOURCE"
2943 msgstr ""
2944
2945 #. type: Plain text
2946 #: build/C/man3/psignal.3:65
2947 msgid ""
2948 "The B<psignal>()  function displays a message on I<stderr> consisting of the "
2949 "string I<s>, a colon, a space, a string describing the signal number I<sig>, "
2950 "and a trailing newline.  If the string I<s> is NULL or empty, the colon and "
2951 "space are omitted.  If I<sig> is invalid, the message displayed will "
2952 "indicate an unknown signal."
2953 msgstr ""
2954
2955 #. type: Plain text
2956 #: build/C/man3/psignal.3:86
2957 msgid ""
2958 "The B<psiginfo>()  function is like B<psignal>(), except that it displays "
2959 "information about the signal described by I<pinfo>, which should point to a "
2960 "valid I<siginfo_t> structure.  As well as the signal description, "
2961 "B<psiginfo>()  displays information about the origin of the signal, and "
2962 "other information relevant to the signal (e.g., the relevant memory address "
2963 "for hardware-generated signals, the child process ID for B<SIGCHLD>, and the "
2964 "user ID and process ID of the sender, for signals set using B<kill>(2)  or "
2965 "B<sigqueue>(3))."
2966 msgstr ""
2967
2968 #. type: Plain text
2969 #: build/C/man3/psignal.3:89
2970 msgid ""
2971 "The array I<sys_siglist> holds the signal description strings indexed by "
2972 "signal number."
2973 msgstr ""
2974
2975 #. type: Plain text
2976 #: build/C/man3/psignal.3:95
2977 msgid "The B<psignal>()  and B<psiginfo>()  functions return no value."
2978 msgstr ""
2979
2980 #. type: Plain text
2981 #: build/C/man3/psignal.3:99
2982 msgid "The B<psiginfo>()  function was added to glibc in version 2.10."
2983 msgstr ""
2984
2985 #. type: Plain text
2986 #: build/C/man3/psignal.3:101
2987 msgid "POSIX.1-2008, 4.3BSD."
2988 msgstr ""
2989
2990 #. type: Plain text
2991 #: build/C/man3/psignal.3:105
2992 msgid "In glibc versions up to 2.12, B<psiginfo>()  had the following bugs:"
2993 msgstr ""
2994
2995 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12107
2996 #.  Reportedly now fixed; check glibc 2.13
2997 #. type: Plain text
2998 #: build/C/man3/psignal.3:109
2999 msgid "In some circumstances, a trailing newline is not printed."
3000 msgstr ""
3001
3002 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12108
3003 #.  Reportedly now fixed; check glibc 2.13
3004 #. type: Plain text
3005 #: build/C/man3/psignal.3:113
3006 msgid "Additional details are not displayed for real-time signals."
3007 msgstr ""
3008
3009 #. type: Plain text
3010 #: build/C/man3/psignal.3:118
3011 msgid "B<sigaction>(2), B<perror>(3), B<strsignal>(3), B<signal>(7)"
3012 msgstr ""
3013
3014 #. type: TH
3015 #: build/C/man3/raise.3:29
3016 #, no-wrap
3017 msgid "RAISE"
3018 msgstr ""
3019
3020 #. type: TH
3021 #: build/C/man3/raise.3:29
3022 #, no-wrap
3023 msgid "2014-03-10"
3024 msgstr ""
3025
3026 #. type: Plain text
3027 #: build/C/man3/raise.3:32
3028 msgid "raise - send a signal to the caller"
3029 msgstr ""
3030
3031 #. type: Plain text
3032 #: build/C/man3/raise.3:37
3033 #, no-wrap
3034 msgid "B<int raise(int >I<sig>B<);>\n"
3035 msgstr ""
3036
3037 #. type: Plain text
3038 #: build/C/man3/raise.3:43
3039 msgid ""
3040 "The B<raise>()  function sends a signal to the calling process or thread.  "
3041 "In a single-threaded program it is equivalent to"
3042 msgstr ""
3043
3044 #. type: Plain text
3045 #: build/C/man3/raise.3:47
3046 #, no-wrap
3047 msgid "kill(getpid(), sig);\n"
3048 msgstr ""
3049
3050 #. type: Plain text
3051 #: build/C/man3/raise.3:51
3052 msgid "In a multithreaded program it is equivalent to"
3053 msgstr ""
3054
3055 #. type: Plain text
3056 #: build/C/man3/raise.3:55
3057 #, no-wrap
3058 msgid "pthread_kill(pthread_self(), sig);\n"
3059 msgstr ""
3060
3061 #. type: Plain text
3062 #: build/C/man3/raise.3:61
3063 msgid ""
3064 "If the signal causes a handler to be called, B<raise>()  will return only "
3065 "after the signal handler has returned."
3066 msgstr ""
3067
3068 #. type: Plain text
3069 #: build/C/man3/raise.3:64
3070 msgid "B<raise>()  returns 0 on success, and nonzero for failure."
3071 msgstr ""
3072
3073 #. type: Plain text
3074 #: build/C/man3/raise.3:69
3075 msgid "The B<raise>()  function is thread-safe."
3076 msgstr ""
3077
3078 #. type: Plain text
3079 #: build/C/man3/raise.3:71 build/C/man2/signal.2:112
3080 msgid "C89, C99, POSIX.1-2001."
3081 msgstr ""
3082
3083 #.  2.3.2 used the obsolete tkill(), if available.
3084 #. type: Plain text
3085 #: build/C/man3/raise.3:82
3086 msgid ""
3087 "Since version 2.3.3, glibc implements B<raise>()  by calling B<tgkill>(2), "
3088 "if the kernel supports that system call.  Older glibc versions implemented "
3089 "B<raise>()  using B<kill>(2)."
3090 msgstr ""
3091
3092 #. type: Plain text
3093 #: build/C/man3/raise.3:89
3094 msgid ""
3095 "B<getpid>(2), B<kill>(2), B<sigaction>(2), B<signal>(2), B<pthread_kill>(3), "
3096 "B<signal>(7)"
3097 msgstr ""
3098
3099 #. type: TH
3100 #: build/C/man2/restart_syscall.2:33
3101 #, no-wrap
3102 msgid "RESTART_SYSCALL"
3103 msgstr ""
3104
3105 #. type: TH
3106 #: build/C/man2/restart_syscall.2:33
3107 #, no-wrap
3108 msgid "2014-02-11"
3109 msgstr ""
3110
3111 #. type: Plain text
3112 #: build/C/man2/restart_syscall.2:36
3113 msgid "restart_syscall - restart a system call after interruption by a stop signal"
3114 msgstr ""
3115
3116 #. type: Plain text
3117 #: build/C/man2/restart_syscall.2:38
3118 msgid "B<int restart_syscall(void);>"
3119 msgstr ""
3120
3121 #. type: Plain text
3122 #: build/C/man2/restart_syscall.2:41
3123 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
3124 msgstr ""
3125
3126 #. type: Plain text
3127 #: build/C/man2/restart_syscall.2:53
3128 msgid ""
3129 "The B<restart_syscall>()  system call is used to restart certain system "
3130 "calls after a process that was stopped by a signal (e.g., B<SIGSTOP> or "
3131 "B<SIGTSTP>)  is later resumed after receiving a B<SIGCONT> signal.  This "
3132 "system call is designed only for internal use by the kernel."
3133 msgstr ""
3134
3135 #.  These system calls correspond to the special internal errno value
3136 #.  ERESTART_RESTARTBLOCK. Each of the system calls has a "restart"
3137 #.  helper function that is invoked by restart_syscall().
3138 #. type: Plain text
3139 #: build/C/man2/restart_syscall.2:84
3140 msgid ""
3141 "B<restart_syscall>()  is used for restarting only those system calls that, "
3142 "when restarted, should adjust their time-related parameters\\(emnamely "
3143 "B<poll>(2)  (since Linux 2.6.24), B<nanosleep>(2)  (since Linux 2.6), "
3144 "B<clock_nanosleep>(2)  (since Linux 2.6), and B<futex>(2), when employed "
3145 "with the B<FUTEX_WAIT> (since Linux 2.6.22)  and B<FUTEX_WAIT_BITSET> (since "
3146 "Linux 2.6.31)  operations.  B<restart_syscall>()  restarts the interrupted "
3147 "system call with a time argument that is suitably adjusted to account for "
3148 "the time that has already elapsed (including the time where the process was "
3149 "stopped by a signal).  Without the B<restart_syscall>()  mechanism, "
3150 "restarting these system calls would not correctly deduce the already elapsed "
3151 "time when the process continued execution."
3152 msgstr ""
3153
3154 #. type: Plain text
3155 #: build/C/man2/restart_syscall.2:88
3156 msgid ""
3157 "The return value of B<restart_syscall>()  is the return value of whatever "
3158 "system call is being restarted."
3159 msgstr ""
3160
3161 #. type: Plain text
3162 #: build/C/man2/restart_syscall.2:92
3163 msgid ""
3164 "I<errno> is set as per the errors for whatever system call is being "
3165 "restarted by B<restart_syscall>()."
3166 msgstr ""
3167
3168 #. type: Plain text
3169 #: build/C/man2/restart_syscall.2:96
3170 msgid "The B<restart_syscall>()  system call is present since Linux 2.6."
3171 msgstr ""
3172
3173 #. type: Plain text
3174 #: build/C/man2/restart_syscall.2:98
3175 msgid "This system call is Linux-specific."
3176 msgstr ""
3177
3178 #. type: Plain text
3179 #: build/C/man2/restart_syscall.2:102
3180 msgid ""
3181 "There is no glibc wrapper for this system call, because it is intended for "
3182 "use only by the kernel and should never be called by applications."
3183 msgstr ""
3184
3185 #
3186 #.  FIXME
3187 #.  There is one oddness in the implementation though, with respect to
3188 #.  nanosleep() (and probably also clock_nanosleep()). The scenario
3189 #.  is as follows:
3190 #.     1. Start a nanosleep() for (say) 30 seconds,
3191 #.     2. Stop the process with (say) SIGTSTP (^Z).
3192 #.     3. Resume the process with SIGCONT,
3193 #.     4. Upon return, the 'rem' argument of nanosleep() will contain the
3194 #.        remaining unslept time **at the time when SIGTSTP was delivered**.
3195 #.  The behavior at point 4 is odd, but doesn't violate the standards, which
3196 #.  specify the treatment of 'rem' only when the system call returns with
3197 #.  the error EINTR (i.e., the call was interrupted by a signal handler).
3198 #. type: Plain text
3199 #: build/C/man2/restart_syscall.2:123
3200 msgid ""
3201 "From user space, the operation of B<restart_syscall>(2)  is largely "
3202 "invisible: to the process that made the system call that is restarted, it "
3203 "appears as though that system call executed and returned in the usual "
3204 "fashion."
3205 msgstr ""
3206
3207 #.  FIXME select(2) 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:131
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 build/C/man2/tkill.2:29
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:176
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:68 build/C/man2/timerfd_create.2:373
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: TH
3555 #: build/C/man2/sgetmask.2:26
3556 #, no-wrap
3557 msgid "2014-02-25"
3558 msgstr ""
3559
3560 #. type: Plain text
3561 #: build/C/man2/sgetmask.2:29
3562 msgid "sgetmask, ssetmask - manipulation of signal mask (obsolete)"
3563 msgstr ""
3564
3565 #. type: Plain text
3566 #: build/C/man2/sgetmask.2:31
3567 msgid "B<long sgetmask(void);>"
3568 msgstr ""
3569
3570 #. type: Plain text
3571 #: build/C/man2/sgetmask.2:33
3572 msgid "B<long ssetmask(long >I<newmask>B<);>"
3573 msgstr ""
3574
3575 #. type: Plain text
3576 #: build/C/man2/sgetmask.2:42
3577 msgid ""
3578 "These system calls are obsolete.  I<Do not use them>; use B<sigprocmask>(2)  "
3579 "instead."
3580 msgstr ""
3581
3582 #. type: Plain text
3583 #: build/C/man2/sgetmask.2:45
3584 msgid "B<sgetmask>()  returns the signal mask of the calling process."
3585 msgstr ""
3586
3587 #. type: Plain text
3588 #: build/C/man2/sgetmask.2:50
3589 msgid ""
3590 "B<ssetmask>()  sets the signal mask of the calling process to the value "
3591 "given in I<newmask>.  The previous signal mask is returned."
3592 msgstr ""
3593
3594 #. type: Plain text
3595 #: build/C/man2/sgetmask.2:59
3596 msgid ""
3597 "The signal masks dealt with by these two system calls are plain bit masks "
3598 "(unlike the I<sigset_t> used by B<sigprocmask>(2)); use B<sigmask>(3)  to "
3599 "create and inspect these masks."
3600 msgstr ""
3601
3602 #. type: Plain text
3603 #: build/C/man2/sgetmask.2:64
3604 msgid ""
3605 "B<sgetmask>()  always successfully returns the signal mask.  B<ssetmask>()  "
3606 "always succeeds, and returns the previous signal mask."
3607 msgstr ""
3608
3609 #. type: Plain text
3610 #: build/C/man2/sgetmask.2:66
3611 msgid "These system calls always succeed."
3612 msgstr ""
3613
3614 #. type: Plain text
3615 #: build/C/man2/sgetmask.2:72
3616 msgid ""
3617 "Glibc does not provide wrappers for these obsolete system calls; in the "
3618 "unlikely event that you want to call them, use B<syscall>(2)."
3619 msgstr ""
3620
3621 #. type: Plain text
3622 #: build/C/man2/sgetmask.2:75
3623 msgid ""
3624 "These system calls are unaware of signal numbers greater than 31 (i.e., "
3625 "real-time signals)."
3626 msgstr ""
3627
3628 #. type: Plain text
3629 #: build/C/man2/sgetmask.2:77
3630 msgid "These system calls do not exist on x86-64."
3631 msgstr ""
3632
3633 #. type: Plain text
3634 #: build/C/man2/sgetmask.2:82
3635 msgid "It is not possible to block B<SIGSTOP> or B<SIGKILL>."
3636 msgstr ""
3637
3638 #. type: Plain text
3639 #: build/C/man2/sgetmask.2:85
3640 msgid "B<sigprocmask>(2), B<signal>(7)"
3641 msgstr ""
3642
3643 #. type: TH
3644 #: build/C/man2/sigaction.2:47
3645 #, no-wrap
3646 msgid "SIGACTION"
3647 msgstr ""
3648
3649 #. type: TH
3650 #: build/C/man2/sigaction.2:47
3651 #, no-wrap
3652 msgid "2014-04-27"
3653 msgstr ""
3654
3655 #. type: Plain text
3656 #: build/C/man2/sigaction.2:50
3657 msgid "sigaction - examine and change a signal action"
3658 msgstr ""
3659
3660 #. type: Plain text
3661 #: build/C/man2/sigaction.2:56
3662 #, no-wrap
3663 msgid ""
3664 "B<int sigaction(int >I<signum>B<, const struct sigaction *>I<act>B<,>\n"
3665 "B<              struct sigaction *>I<oldact>B<);>\n"
3666 msgstr ""
3667
3668 #. type: Plain text
3669 #: build/C/man2/sigaction.2:66
3670 msgid ""
3671 "B<sigaction>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
3672 "_POSIX_SOURCE"
3673 msgstr ""
3674
3675 #. type: Plain text
3676 #: build/C/man2/sigaction.2:69
3677 msgid "I<siginfo_t>: _POSIX_C_SOURCE E<gt>= 199309L"
3678 msgstr ""
3679
3680 #. type: Plain text
3681 #: build/C/man2/sigaction.2:78
3682 msgid ""
3683 "The B<sigaction>()  system call is used to change the action taken by a "
3684 "process on receipt of a specific signal.  (See B<signal>(7)  for an overview "
3685 "of signals.)"
3686 msgstr ""
3687
3688 #. type: Plain text
3689 #: build/C/man2/sigaction.2:84
3690 msgid ""
3691 "I<signum> specifies the signal and can be any valid signal except B<SIGKILL> "
3692 "and B<SIGSTOP>."
3693 msgstr ""
3694
3695 #. type: Plain text
3696 #: build/C/man2/sigaction.2:95
3697 msgid ""
3698 "If I<act> is non-NULL, the new action for signal I<signum> is installed from "
3699 "I<act>.  If I<oldact> is non-NULL, the previous action is saved in "
3700 "I<oldact>."
3701 msgstr ""
3702
3703 #. type: Plain text
3704 #: build/C/man2/sigaction.2:99
3705 msgid "The I<sigaction> structure is defined as something like:"
3706 msgstr ""
3707
3708 #. type: Plain text
3709 #: build/C/man2/sigaction.2:109
3710 #, no-wrap
3711 msgid ""
3712 "struct sigaction {\n"
3713 "    void     (*sa_handler)(int);\n"
3714 "    void     (*sa_sigaction)(int, siginfo_t *, void *);\n"
3715 "    sigset_t   sa_mask;\n"
3716 "    int        sa_flags;\n"
3717 "    void     (*sa_restorer)(void);\n"
3718 "};\n"
3719 msgstr ""
3720
3721 #. type: Plain text
3722 #: build/C/man2/sigaction.2:116
3723 msgid ""
3724 "On some architectures a union is involved: do not assign to both "
3725 "I<sa_handler> and I<sa_sigaction>."
3726 msgstr ""
3727
3728 #. type: Plain text
3729 #: build/C/man2/sigaction.2:123
3730 msgid ""
3731 "The I<sa_restorer> element is obsolete and should not be used.  POSIX does "
3732 "not specify a I<sa_restorer> element."
3733 msgstr ""
3734
3735 #. type: Plain text
3736 #: build/C/man2/sigaction.2:133
3737 msgid ""
3738 "I<sa_handler> specifies the action to be associated with I<signum> and may "
3739 "be B<SIG_DFL> for the default action, B<SIG_IGN> to ignore this signal, or a "
3740 "pointer to a signal handling function.  This function receives the signal "
3741 "number as its only argument."
3742 msgstr ""
3743
3744 #. type: Plain text
3745 #: build/C/man2/sigaction.2:155
3746 msgid ""
3747 "If B<SA_SIGINFO> is specified in I<sa_flags>, then I<sa_sigaction> (instead "
3748 "of I<sa_handler>)  specifies the signal-handling function for I<signum>.  "
3749 "This function receives the signal number as its first argument, a pointer to "
3750 "a I<siginfo_t> as its second argument and a pointer to a I<ucontext_t> (cast "
3751 "to I<void\\ *>) as its third argument.  (Commonly, the handler function "
3752 "doesn't make any use of the third argument.  See B<getcontext>(3)  for "
3753 "further information about I<ucontext_t>.)"
3754 msgstr ""
3755
3756 #. type: Plain text
3757 #: build/C/man2/sigaction.2:165
3758 msgid ""
3759 "I<sa_mask> specifies a mask of signals which should be blocked (i.e., added "
3760 "to the signal mask of the thread in which the signal handler is invoked)  "
3761 "during execution of the signal handler.  In addition, the signal which "
3762 "triggered the handler will be blocked, unless the B<SA_NODEFER> flag is "
3763 "used."
3764 msgstr ""
3765
3766 #. type: Plain text
3767 #: build/C/man2/sigaction.2:169
3768 msgid ""
3769 "I<sa_flags> specifies a set of flags which modify the behavior of the "
3770 "signal.  It is formed by the bitwise OR of zero or more of the following:"
3771 msgstr ""
3772
3773 #. type: TP
3774 #: build/C/man2/sigaction.2:170
3775 #, no-wrap
3776 msgid "B<SA_NOCLDSTOP>"
3777 msgstr ""
3778
3779 #. type: Plain text
3780 #: build/C/man2/sigaction.2:187
3781 msgid ""
3782 "If I<signum> is B<SIGCHLD>, do not receive notification when child processes "
3783 "stop (i.e., when they receive one of B<SIGSTOP>, B<SIGTSTP>, B<SIGTTIN>, or "
3784 "B<SIGTTOU>)  or resume (i.e., they receive B<SIGCONT>)  (see B<wait>(2)).  "
3785 "This flag is meaningful only when establishing a handler for B<SIGCHLD>."
3786 msgstr ""
3787
3788 #. type: TP
3789 #: build/C/man2/sigaction.2:187
3790 #, no-wrap
3791 msgid "B<SA_NOCLDWAIT> (since Linux 2.6)"
3792 msgstr ""
3793
3794 #.  To be precise: Linux 2.5.60 -- MTK
3795 #. type: Plain text
3796 #: build/C/man2/sigaction.2:201
3797 msgid ""
3798 "If I<signum> is B<SIGCHLD>, do not transform children into zombies when they "
3799 "terminate.  See also B<waitpid>(2).  This flag is meaningful only when "
3800 "establishing a handler for B<SIGCHLD>, or when setting that signal's "
3801 "disposition to B<SIG_DFL>."
3802 msgstr ""
3803
3804 #. type: Plain text
3805 #: build/C/man2/sigaction.2:213
3806 msgid ""
3807 "If the B<SA_NOCLDWAIT> flag is set when establishing a handler for "
3808 "B<SIGCHLD>, POSIX.1 leaves it unspecified whether a B<SIGCHLD> signal is "
3809 "generated when a child process terminates.  On Linux, a B<SIGCHLD> signal is "
3810 "generated in this case; on some other implementations, it is not."
3811 msgstr ""
3812
3813 #. type: TP
3814 #: build/C/man2/sigaction.2:213
3815 #, no-wrap
3816 msgid "B<SA_NODEFER>"
3817 msgstr ""
3818
3819 #. type: Plain text
3820 #: build/C/man2/sigaction.2:220
3821 msgid ""
3822 "Do not prevent the signal from being received from within its own signal "
3823 "handler.  This flag is meaningful only when establishing a signal handler.  "
3824 "B<SA_NOMASK> is an obsolete, nonstandard synonym for this flag."
3825 msgstr ""
3826
3827 #. type: TP
3828 #: build/C/man2/sigaction.2:220
3829 #, no-wrap
3830 msgid "B<SA_ONSTACK>"
3831 msgstr ""
3832
3833 #. type: Plain text
3834 #: build/C/man2/sigaction.2:226
3835 msgid ""
3836 "Call the signal handler on an alternate signal stack provided by "
3837 "B<sigaltstack>(2).  If an alternate stack is not available, the default "
3838 "stack will be used.  This flag is meaningful only when establishing a signal "
3839 "handler."
3840 msgstr ""
3841
3842 #. type: TP
3843 #: build/C/man2/sigaction.2:226
3844 #, no-wrap
3845 msgid "B<SA_RESETHAND>"
3846 msgstr ""
3847
3848 #. type: Plain text
3849 #: build/C/man2/sigaction.2:232
3850 msgid ""
3851 "Restore the signal action to the default upon entry to the signal handler.  "
3852 "This flag is meaningful only when establishing a signal handler.  "
3853 "B<SA_ONESHOT> is an obsolete, nonstandard synonym for this flag."
3854 msgstr ""
3855
3856 #. type: TP
3857 #: build/C/man2/sigaction.2:232
3858 #, no-wrap
3859 msgid "B<SA_RESTART>"
3860 msgstr ""
3861
3862 #. type: Plain text
3863 #: build/C/man2/sigaction.2:240
3864 msgid ""
3865 "Provide behavior compatible with BSD signal semantics by making certain "
3866 "system calls restartable across signals.  This flag is meaningful only when "
3867 "establishing a signal handler.  See B<signal>(7)  for a discussion of system "
3868 "call restarting."
3869 msgstr ""
3870
3871 #. type: TP
3872 #: build/C/man2/sigaction.2:240
3873 #, no-wrap
3874 msgid "B<SA_SIGINFO> (since Linux 2.2)"
3875 msgstr ""
3876
3877 #.  (The
3878 #.  .I sa_sigaction
3879 #.  field was added in Linux 2.1.86.)
3880 #. type: Plain text
3881 #: build/C/man2/sigaction.2:251
3882 msgid ""
3883 "The signal handler takes three arguments, not one.  In this case, "
3884 "I<sa_sigaction> should be set instead of I<sa_handler>.  This flag is "
3885 "meaningful only when establishing a signal handler."
3886 msgstr ""
3887
3888 #. type: Plain text
3889 #: build/C/man2/sigaction.2:258
3890 msgid ""
3891 "The I<siginfo_t> argument to I<sa_sigaction> is a struct with the following "
3892 "elements:"
3893 msgstr ""
3894
3895 #.  FIXME
3896 #.  si_trapno seems to be only used on SPARC and Alpha;
3897 #.  this page could use a little more detail on its purpose there.
3898 #.  In the kernel: si_tid
3899 #. type: Plain text
3900 #: build/C/man2/sigaction.2:289
3901 #, no-wrap
3902 msgid ""
3903 "siginfo_t {\n"
3904 "    int      si_signo;    /* Signal number */\n"
3905 "    int      si_errno;    /* An errno value */\n"
3906 "    int      si_code;     /* Signal code */\n"
3907 "    int      si_trapno;   /* Trap number that caused\n"
3908 "                             hardware-generated signal\n"
3909 "                             (unused on most architectures) */\n"
3910 "    pid_t    si_pid;      /* Sending process ID */\n"
3911 "    uid_t    si_uid;      /* Real user ID of sending process */\n"
3912 "    int      si_status;   /* Exit value or signal */\n"
3913 "    clock_t  si_utime;    /* User time consumed */\n"
3914 "    clock_t  si_stime;    /* System time consumed */\n"
3915 "    sigval_t si_value;    /* Signal value */\n"
3916 "    int      si_int;      /* POSIX.1b signal */\n"
3917 "    void    *si_ptr;      /* POSIX.1b signal */\n"
3918 "    int      si_overrun;  /* Timer overrun count; POSIX.1b timers */\n"
3919 "    int      si_timerid;  /* Timer ID; POSIX.1b timers */\n"
3920 "    void    *si_addr;     /* Memory location which caused fault */\n"
3921 "    long     si_band;     /* Band event (was I<int> in\n"
3922 "                             glibc 2.3.2 and earlier) */\n"
3923 "    int      si_fd;       /* File descriptor */\n"
3924 "    short    si_addr_lsb; /* Least significant bit of address\n"
3925 "                             (since Linux 2.6.32) */\n"
3926 "}\n"
3927 msgstr ""
3928
3929 #. type: Plain text
3930 #: build/C/man2/sigaction.2:298
3931 msgid ""
3932 "I<si_signo>, I<si_errno> and I<si_code> are defined for all signals.  "
3933 "(I<si_errno> is generally unused on Linux.)  The rest of the struct may be a "
3934 "union, so that one should read only the fields that are meaningful for the "
3935 "given signal:"
3936 msgstr ""
3937
3938 #. type: Plain text
3939 #: build/C/man2/sigaction.2:313
3940 msgid ""
3941 "Signals sent with B<kill>(2)  and B<sigqueue>(3)  fill in I<si_pid> and "
3942 "I<si_uid>.  In addition, signals sent with B<sigqueue>(3)  fill in I<si_int> "
3943 "and I<si_ptr> with the values specified by the sender of the signal; see "
3944 "B<sigqueue>(3)  for more details."
3945 msgstr ""
3946
3947 #. type: Plain text
3948 #: build/C/man2/sigaction.2:329
3949 msgid ""
3950 "Signals sent by POSIX.1b timers (since Linux 2.6) fill in I<si_overrun> and "
3951 "I<si_timerid>.  The I<si_timerid> field is an internal ID used by the kernel "
3952 "to identify the timer; it is not the same as the timer ID returned by "
3953 "B<timer_create>(2).  The I<si_overrun> field is the timer overrun count; "
3954 "this is the same information as is obtained by a call to "
3955 "B<timer_getoverrun>(2).  These fields are nonstandard Linux extensions."
3956 msgstr ""
3957
3958 #. type: Plain text
3959 #: build/C/man2/sigaction.2:344
3960 msgid ""
3961 "Signals sent for message queue notification (see the description of "
3962 "B<SIGEV_SIGNAL> in B<mq_notify>(3))  fill in I<si_int>/I<si_ptr>, with the "
3963 "I<sigev_value> supplied to B<mq_notify>(3); I<si_pid>, with the process ID "
3964 "of the message sender; and I<si_uid>, with the real user ID of the message "
3965 "sender."
3966 msgstr ""
3967
3968 #.  FIXME .
3969 #.  When si_utime and si_stime where originally implemented, the
3970 #.  measurement unit was HZ, which was the same as clock ticks
3971 #.  (sysconf(_SC_CLK_TCK)).  In 2.6, HZ became configurable, and
3972 #.  was *still* used as the unit to return the info these fields,
3973 #.  with the result that the field values depended on the the
3974 #.  configured HZ.  Of course, the should have been measured in
3975 #.  USER_HZ instead, so that sysconf(_SC_CLK_TCK) could be used to
3976 #.  convert to seconds.  I have a queued patch to fix this:
3977 #.  http://thread.gmane.org/gmane.linux.kernel/698061/ .
3978 #.  This patch made it into 2.6.27.
3979 #.  But note that these fields still don't return the times of
3980 #.  waited-for children (as is done by getrusage() and times()
3981 #.  and wait4()).  Solaris 8 does include child times.
3982 #. type: Plain text
3983 #: build/C/man2/sigaction.2:391
3984 msgid ""
3985 "B<SIGCHLD> fills in I<si_pid>, I<si_uid>, I<si_status>, I<si_utime>, and "
3986 "I<si_stime>, providing information about the child.  The I<si_pid> field is "
3987 "the process ID of the child; I<si_uid> is the child's real user ID.  The "
3988 "I<si_status> field contains the exit status of the child (if I<si_code> is "
3989 "B<CLD_EXITED>), or the signal number that caused the process to change "
3990 "state.  The I<si_utime> and I<si_stime> contain the user and system CPU time "
3991 "used by the child process; these fields do not include the times used by "
3992 "waited-for children (unlike B<getrusage>(2)  and B<times>(2)).  In kernels "
3993 "up to 2.6, and since 2.6.27, these fields report CPU time in units of "
3994 "I<sysconf(_SC_CLK_TCK)>.  In 2.6 kernels before 2.6.27, a bug meant that "
3995 "these fields reported time in units of the (configurable) system jiffy (see "
3996 "B<time>(7))."
3997 msgstr ""
3998
3999 #.  FIXME SIGTRAP also sets the following for ptrace_notify() ?
4000 #.      info.si_code = exit_code;
4001 #.      info.si_pid = task_pid_vnr(current);
4002 #.      info.si_uid = current_uid();  /* Real UID */
4003 #. type: Plain text
4004 #: build/C/man2/sigaction.2:427
4005 msgid ""
4006 "B<SIGILL>, B<SIGFPE>, B<SIGSEGV>, B<SIGBUS>, and B<SIGTRAP> fill in "
4007 "I<si_addr> with the address of the fault.  On some architectures, these "
4008 "signals also fill in the I<si_trapno> field.  Some suberrors of B<SIGBUS>, "
4009 "in particular B<BUS_MCEERR_AO> and B<BUS_MCEERR_AR>, also fill in "
4010 "I<si_addr_lsb>.  This field indicates the least significant bit of the "
4011 "reported address and therefore the extent of the corruption.  For example, "
4012 "if a full page was corrupted, I<si_addr_lsb> contains "
4013 "I<log2(sysconf(_SC_PAGESIZE))>.  B<BUS_MCERR_*> and I<si_addr_lsb> are "
4014 "Linux-specific extensions."
4015 msgstr ""
4016
4017 #. type: Plain text
4018 #: build/C/man2/sigaction.2:441
4019 msgid ""
4020 "B<SIGIO>/B<SIGPOLL> (the two names are synonyms on Linux)  fills in "
4021 "I<si_band> and I<si_fd>.  The I<si_band> event is a bit mask containing the "
4022 "same values as are filled in the I<revents> field by B<poll>(2).  The "
4023 "I<si_fd> field indicates the file descriptor for which the I/O event "
4024 "occurred."
4025 msgstr ""
4026
4027 #. type: Plain text
4028 #: build/C/man2/sigaction.2:448
4029 msgid ""
4030 "I<si_code> is a value (not a bit mask)  indicating why this signal was "
4031 "sent.  The following list shows the values which can be placed in I<si_code> "
4032 "for any signal, along with reason that the signal was generated."
4033 msgstr ""
4034
4035 #. type: TP
4036 #: build/C/man2/sigaction.2:449
4037 #, no-wrap
4038 msgid "B<SI_USER>"
4039 msgstr ""
4040
4041 #. type: TP
4042 #: build/C/man2/sigaction.2:452 build/C/man7/signal.7:111
4043 #, no-wrap
4044 msgid "B<kill>(2)"
4045 msgstr ""
4046
4047 #. type: TP
4048 #: build/C/man2/sigaction.2:452
4049 #, no-wrap
4050 msgid "B<SI_KERNEL>"
4051 msgstr ""
4052
4053 #. type: Plain text
4054 #: build/C/man2/sigaction.2:455
4055 msgid "Sent by the kernel."
4056 msgstr ""
4057
4058 #. type: TP
4059 #: build/C/man2/sigaction.2:455
4060 #, no-wrap
4061 msgid "B<SI_QUEUE>"
4062 msgstr ""
4063
4064 #. type: TP
4065 #: build/C/man2/sigaction.2:458 build/C/man7/signal.7:128
4066 #, no-wrap
4067 msgid "B<sigqueue>(3)"
4068 msgstr ""
4069
4070 #. type: TP
4071 #: build/C/man2/sigaction.2:458
4072 #, no-wrap
4073 msgid "B<SI_TIMER>"
4074 msgstr ""
4075
4076 #. type: Plain text
4077 #: build/C/man2/sigaction.2:461
4078 msgid "POSIX timer expired"
4079 msgstr ""
4080
4081 #. type: TP
4082 #: build/C/man2/sigaction.2:461
4083 #, no-wrap
4084 msgid "B<SI_MESGQ>"
4085 msgstr ""
4086
4087 #. type: Plain text
4088 #: build/C/man2/sigaction.2:465
4089 msgid "POSIX message queue state changed (since Linux 2.6.6); see B<mq_notify>(3)"
4090 msgstr ""
4091
4092 #. type: TP
4093 #: build/C/man2/sigaction.2:465
4094 #, no-wrap
4095 msgid "B<SI_ASYNCIO>"
4096 msgstr ""
4097
4098 #. type: Plain text
4099 #: build/C/man2/sigaction.2:468
4100 msgid "AIO completed"
4101 msgstr ""
4102
4103 #. type: TP
4104 #: build/C/man2/sigaction.2:468
4105 #, no-wrap
4106 msgid "B<SI_SIGIO>"
4107 msgstr ""
4108
4109 #. type: Plain text
4110 #: build/C/man2/sigaction.2:477
4111 msgid ""
4112 "Queued B<SIGIO> (only in kernels up to Linux 2.2; from Linux 2.4 onward "
4113 "B<SIGIO>/B<SIGPOLL> fills in I<si_code> as described below)."
4114 msgstr ""
4115
4116 #. type: TP
4117 #: build/C/man2/sigaction.2:477
4118 #, no-wrap
4119 msgid "B<SI_TKILL>"
4120 msgstr ""
4121
4122 #.  SI_DETHREAD is defined in 2.6.9 sources, but isn't implemented
4123 #.  It appears to have been an idea that was tried during 2.5.6
4124 #.  through to 2.5.24 and then was backed out.
4125 #. type: Plain text
4126 #: build/C/man2/sigaction.2:486
4127 msgid "B<tkill>(2)  or B<tgkill>(2)  (since Linux 2.4.19)"
4128 msgstr ""
4129
4130 #. type: Plain text
4131 #: build/C/man2/sigaction.2:493
4132 msgid "The following values can be placed in I<si_code> for a B<SIGILL> signal:"
4133 msgstr ""
4134
4135 #. type: TP
4136 #: build/C/man2/sigaction.2:494
4137 #, no-wrap
4138 msgid "B<ILL_ILLOPC>"
4139 msgstr ""
4140
4141 #. type: Plain text
4142 #: build/C/man2/sigaction.2:497
4143 msgid "illegal opcode"
4144 msgstr ""
4145
4146 #. type: TP
4147 #: build/C/man2/sigaction.2:497
4148 #, no-wrap
4149 msgid "B<ILL_ILLOPN>"
4150 msgstr ""
4151
4152 #. type: Plain text
4153 #: build/C/man2/sigaction.2:500
4154 msgid "illegal operand"
4155 msgstr ""
4156
4157 #. type: TP
4158 #: build/C/man2/sigaction.2:500
4159 #, no-wrap
4160 msgid "B<ILL_ILLADR>"
4161 msgstr ""
4162
4163 #. type: Plain text
4164 #: build/C/man2/sigaction.2:503
4165 msgid "illegal addressing mode"
4166 msgstr ""
4167
4168 #. type: TP
4169 #: build/C/man2/sigaction.2:503
4170 #, no-wrap
4171 msgid "B<ILL_ILLTRP>"
4172 msgstr ""
4173
4174 #. type: Plain text
4175 #: build/C/man2/sigaction.2:506
4176 msgid "illegal trap"
4177 msgstr ""
4178
4179 #. type: TP
4180 #: build/C/man2/sigaction.2:506
4181 #, no-wrap
4182 msgid "B<ILL_PRVOPC>"
4183 msgstr ""
4184
4185 #. type: Plain text
4186 #: build/C/man2/sigaction.2:509
4187 msgid "privileged opcode"
4188 msgstr ""
4189
4190 #. type: TP
4191 #: build/C/man2/sigaction.2:509
4192 #, no-wrap
4193 msgid "B<ILL_PRVREG>"
4194 msgstr ""
4195
4196 #. type: Plain text
4197 #: build/C/man2/sigaction.2:512
4198 msgid "privileged register"
4199 msgstr ""
4200
4201 #. type: TP
4202 #: build/C/man2/sigaction.2:512
4203 #, no-wrap
4204 msgid "B<ILL_COPROC>"
4205 msgstr ""
4206
4207 #. type: Plain text
4208 #: build/C/man2/sigaction.2:515
4209 msgid "coprocessor error"
4210 msgstr ""
4211
4212 #. type: TP
4213 #: build/C/man2/sigaction.2:515
4214 #, no-wrap
4215 msgid "B<ILL_BADSTK>"
4216 msgstr ""
4217
4218 #. type: Plain text
4219 #: build/C/man2/sigaction.2:518
4220 msgid "internal stack error"
4221 msgstr ""
4222
4223 #. type: Plain text
4224 #: build/C/man2/sigaction.2:525
4225 msgid "The following values can be placed in I<si_code> for a B<SIGFPE> signal:"
4226 msgstr ""
4227
4228 #. type: TP
4229 #: build/C/man2/sigaction.2:526
4230 #, no-wrap
4231 msgid "B<FPE_INTDIV>"
4232 msgstr ""
4233
4234 #. type: Plain text
4235 #: build/C/man2/sigaction.2:529
4236 msgid "integer divide by zero"
4237 msgstr ""
4238
4239 #. type: TP
4240 #: build/C/man2/sigaction.2:529
4241 #, no-wrap
4242 msgid "B<FPE_INTOVF>"
4243 msgstr ""
4244
4245 #. type: Plain text
4246 #: build/C/man2/sigaction.2:532
4247 msgid "integer overflow"
4248 msgstr ""
4249
4250 #. type: TP
4251 #: build/C/man2/sigaction.2:532
4252 #, no-wrap
4253 msgid "B<FPE_FLTDIV>"
4254 msgstr ""
4255
4256 #. type: Plain text
4257 #: build/C/man2/sigaction.2:535
4258 msgid "floating-point divide by zero"
4259 msgstr ""
4260
4261 #. type: TP
4262 #: build/C/man2/sigaction.2:535
4263 #, no-wrap
4264 msgid "B<FPE_FLTOVF>"
4265 msgstr ""
4266
4267 #. type: Plain text
4268 #: build/C/man2/sigaction.2:538
4269 msgid "floating-point overflow"
4270 msgstr ""
4271
4272 #. type: TP
4273 #: build/C/man2/sigaction.2:538
4274 #, no-wrap
4275 msgid "B<FPE_FLTUND>"
4276 msgstr ""
4277
4278 #. type: Plain text
4279 #: build/C/man2/sigaction.2:541
4280 msgid "floating-point underflow"
4281 msgstr ""
4282
4283 #. type: TP
4284 #: build/C/man2/sigaction.2:541
4285 #, no-wrap
4286 msgid "B<FPE_FLTRES>"
4287 msgstr ""
4288
4289 #. type: Plain text
4290 #: build/C/man2/sigaction.2:544
4291 msgid "floating-point inexact result"
4292 msgstr ""
4293
4294 #. type: TP
4295 #: build/C/man2/sigaction.2:544
4296 #, no-wrap
4297 msgid "B<FPE_FLTINV>"
4298 msgstr ""
4299
4300 #. type: Plain text
4301 #: build/C/man2/sigaction.2:547
4302 msgid "floating-point invalid operation"
4303 msgstr ""
4304
4305 #. type: TP
4306 #: build/C/man2/sigaction.2:547
4307 #, no-wrap
4308 msgid "B<FPE_FLTSUB>"
4309 msgstr ""
4310
4311 #. type: Plain text
4312 #: build/C/man2/sigaction.2:550
4313 msgid "subscript out of range"
4314 msgstr ""
4315
4316 #. type: Plain text
4317 #: build/C/man2/sigaction.2:557
4318 msgid "The following values can be placed in I<si_code> for a B<SIGSEGV> signal:"
4319 msgstr ""
4320
4321 #. type: TP
4322 #: build/C/man2/sigaction.2:558
4323 #, no-wrap
4324 msgid "B<SEGV_MAPERR>"
4325 msgstr ""
4326
4327 #. type: Plain text
4328 #: build/C/man2/sigaction.2:561
4329 msgid "address not mapped to object"
4330 msgstr ""
4331
4332 #. type: TP
4333 #: build/C/man2/sigaction.2:561
4334 #, no-wrap
4335 msgid "B<SEGV_ACCERR>"
4336 msgstr ""
4337
4338 #. type: Plain text
4339 #: build/C/man2/sigaction.2:564
4340 msgid "invalid permissions for mapped object"
4341 msgstr ""
4342
4343 #. type: Plain text
4344 #: build/C/man2/sigaction.2:571
4345 msgid "The following values can be placed in I<si_code> for a B<SIGBUS> signal:"
4346 msgstr ""
4347
4348 #. type: TP
4349 #: build/C/man2/sigaction.2:572
4350 #, no-wrap
4351 msgid "B<BUS_ADRALN>"
4352 msgstr ""
4353
4354 #. type: Plain text
4355 #: build/C/man2/sigaction.2:575
4356 msgid "invalid address alignment"
4357 msgstr ""
4358
4359 #. type: TP
4360 #: build/C/man2/sigaction.2:575
4361 #, no-wrap
4362 msgid "B<BUS_ADRERR>"
4363 msgstr ""
4364
4365 #. type: Plain text
4366 #: build/C/man2/sigaction.2:578
4367 msgid "nonexistent physical address"
4368 msgstr ""
4369
4370 #. type: TP
4371 #: build/C/man2/sigaction.2:578
4372 #, no-wrap
4373 msgid "B<BUS_OBJERR>"
4374 msgstr ""
4375
4376 #. type: Plain text
4377 #: build/C/man2/sigaction.2:581
4378 msgid "object-specific hardware error"
4379 msgstr ""
4380
4381 #. type: TP
4382 #: build/C/man2/sigaction.2:581
4383 #, no-wrap
4384 msgid "B<BUS_MCEERR_AR> (since Linux 2.6.32)"
4385 msgstr ""
4386
4387 #. type: Plain text
4388 #: build/C/man2/sigaction.2:584
4389 msgid "Hardware memory error consumed on a machine check; action required."
4390 msgstr ""
4391
4392 #. type: TP
4393 #: build/C/man2/sigaction.2:584
4394 #, no-wrap
4395 msgid "B<BUS_MCEERR_AO> (since Linux 2.6.32)"
4396 msgstr ""
4397
4398 #. type: Plain text
4399 #: build/C/man2/sigaction.2:587
4400 msgid "Hardware memory error detected in process but not consumed; action optional."
4401 msgstr ""
4402
4403 #. type: Plain text
4404 #: build/C/man2/sigaction.2:594
4405 msgid "The following values can be placed in I<si_code> for a B<SIGTRAP> signal:"
4406 msgstr ""
4407
4408 #. type: TP
4409 #: build/C/man2/sigaction.2:595
4410 #, no-wrap
4411 msgid "B<TRAP_BRKPT>"
4412 msgstr ""
4413
4414 #. type: Plain text
4415 #: build/C/man2/sigaction.2:598
4416 msgid "process breakpoint"
4417 msgstr ""
4418
4419 #. type: TP
4420 #: build/C/man2/sigaction.2:598
4421 #, no-wrap
4422 msgid "B<TRAP_TRACE>"
4423 msgstr ""
4424
4425 #. type: Plain text
4426 #: build/C/man2/sigaction.2:601
4427 msgid "process trace trap"
4428 msgstr ""
4429
4430 #. type: TP
4431 #: build/C/man2/sigaction.2:601
4432 #, no-wrap
4433 msgid "B<TRAP_BRANCH> (since Linux 2.4)"
4434 msgstr ""
4435
4436 #. type: Plain text
4437 #: build/C/man2/sigaction.2:604
4438 msgid "process taken branch trap"
4439 msgstr ""
4440
4441 #. type: TP
4442 #: build/C/man2/sigaction.2:604
4443 #, no-wrap
4444 msgid "B<TRAP_HWBKPT> (since Linux 2.4)"
4445 msgstr ""
4446
4447 #. type: Plain text
4448 #: build/C/man2/sigaction.2:607
4449 msgid "hardware breakpoint/watchpoint"
4450 msgstr ""
4451
4452 #. type: Plain text
4453 #: build/C/man2/sigaction.2:614
4454 msgid "The following values can be placed in I<si_code> for a B<SIGCHLD> signal:"
4455 msgstr ""
4456
4457 #. type: TP
4458 #: build/C/man2/sigaction.2:615
4459 #, no-wrap
4460 msgid "B<CLD_EXITED>"
4461 msgstr ""
4462
4463 #. type: Plain text
4464 #: build/C/man2/sigaction.2:618
4465 msgid "child has exited"
4466 msgstr ""
4467
4468 #. type: TP
4469 #: build/C/man2/sigaction.2:618
4470 #, no-wrap
4471 msgid "B<CLD_KILLED>"
4472 msgstr ""
4473
4474 #. type: Plain text
4475 #: build/C/man2/sigaction.2:621
4476 msgid "child was killed"
4477 msgstr ""
4478
4479 #. type: TP
4480 #: build/C/man2/sigaction.2:621
4481 #, no-wrap
4482 msgid "B<CLD_DUMPED>"
4483 msgstr ""
4484
4485 #. type: Plain text
4486 #: build/C/man2/sigaction.2:624
4487 msgid "child terminated abnormally"
4488 msgstr ""
4489
4490 #. type: TP
4491 #: build/C/man2/sigaction.2:624
4492 #, no-wrap
4493 msgid "B<CLD_TRAPPED>"
4494 msgstr ""
4495
4496 #. type: Plain text
4497 #: build/C/man2/sigaction.2:627
4498 msgid "traced child has trapped"
4499 msgstr ""
4500
4501 #. type: TP
4502 #: build/C/man2/sigaction.2:627
4503 #, no-wrap
4504 msgid "B<CLD_STOPPED>"
4505 msgstr ""
4506
4507 #. type: Plain text
4508 #: build/C/man2/sigaction.2:630
4509 msgid "child has stopped"
4510 msgstr ""
4511
4512 #. type: TP
4513 #: build/C/man2/sigaction.2:630
4514 #, no-wrap
4515 msgid "B<CLD_CONTINUED>"
4516 msgstr ""
4517
4518 #. type: Plain text
4519 #: build/C/man2/sigaction.2:633
4520 msgid "stopped child has continued (since Linux 2.6.9)"
4521 msgstr ""
4522
4523 #. type: Plain text
4524 #: build/C/man2/sigaction.2:640
4525 msgid ""
4526 "The following values can be placed in I<si_code> for a B<SIGIO>/B<SIGPOLL> "
4527 "signal:"
4528 msgstr ""
4529
4530 #. type: TP
4531 #: build/C/man2/sigaction.2:641
4532 #, no-wrap
4533 msgid "B<POLL_IN>"
4534 msgstr ""
4535
4536 #. type: Plain text
4537 #: build/C/man2/sigaction.2:644
4538 msgid "data input available"
4539 msgstr ""
4540
4541 #. type: TP
4542 #: build/C/man2/sigaction.2:644
4543 #, no-wrap
4544 msgid "B<POLL_OUT>"
4545 msgstr ""
4546
4547 #. type: Plain text
4548 #: build/C/man2/sigaction.2:647
4549 msgid "output buffers available"
4550 msgstr ""
4551
4552 #. type: TP
4553 #: build/C/man2/sigaction.2:647
4554 #, no-wrap
4555 msgid "B<POLL_MSG>"
4556 msgstr ""
4557
4558 #. type: Plain text
4559 #: build/C/man2/sigaction.2:650
4560 msgid "input message available"
4561 msgstr ""
4562
4563 #. type: TP
4564 #: build/C/man2/sigaction.2:650
4565 #, no-wrap
4566 msgid "B<POLL_ERR>"
4567 msgstr ""
4568
4569 #. type: Plain text
4570 #: build/C/man2/sigaction.2:653
4571 msgid "I/O error"
4572 msgstr ""
4573
4574 #. type: TP
4575 #: build/C/man2/sigaction.2:653
4576 #, no-wrap
4577 msgid "B<POLL_PRI>"
4578 msgstr ""
4579
4580 #. type: Plain text
4581 #: build/C/man2/sigaction.2:656
4582 msgid "high priority input available"
4583 msgstr ""
4584
4585 #. type: TP
4586 #: build/C/man2/sigaction.2:656
4587 #, no-wrap
4588 msgid "B<POLL_HUP>"
4589 msgstr ""
4590
4591 #. type: Plain text
4592 #: build/C/man2/sigaction.2:659
4593 msgid "device disconnected"
4594 msgstr ""
4595
4596 #. type: Plain text
4597 #: build/C/man2/sigaction.2:665
4598 msgid ""
4599 "B<sigaction>()  returns 0 on success; on error, -1 is returned, and I<errno> "
4600 "is set to indicate the error."
4601 msgstr ""
4602
4603 #. type: Plain text
4604 #: build/C/man2/sigaction.2:670
4605 msgid ""
4606 "I<act> or I<oldact> points to memory which is not a valid part of the "
4607 "process address space."
4608 msgstr ""
4609
4610 #. type: Plain text
4611 #: build/C/man2/sigaction.2:677
4612 msgid ""
4613 "An invalid signal was specified.  This will also be generated if an attempt "
4614 "is made to change the action for B<SIGKILL> or B<SIGSTOP>, which cannot be "
4615 "caught or ignored."
4616 msgstr ""
4617
4618 #.  SVr4 does not document the EINTR condition.
4619 #. type: Plain text
4620 #: build/C/man2/sigaction.2:680
4621 msgid "POSIX.1-2001, SVr4."
4622 msgstr ""
4623
4624 #. type: Plain text
4625 #: build/C/man2/sigaction.2:688 build/C/man7/signal.7:105
4626 msgid ""
4627 "A child created via B<fork>(2)  inherits a copy of its parent's signal "
4628 "dispositions.  During an B<execve>(2), the dispositions of handled signals "
4629 "are reset to the default; the dispositions of ignored signals are left "
4630 "unchanged."
4631 msgstr ""
4632
4633 #. type: Plain text
4634 #: build/C/man2/sigaction.2:706 build/C/man2/signal.2:134
4635 msgid ""
4636 "According to POSIX, the behavior of a process is undefined after it ignores "
4637 "a B<SIGFPE>, B<SIGILL>, or B<SIGSEGV> signal that was not generated by "
4638 "B<kill>(2)  or B<raise>(3).  Integer division by zero has undefined result.  "
4639 "On some architectures it will generate a B<SIGFPE> signal.  (Also dividing "
4640 "the most negative integer by -1 may generate B<SIGFPE>.)  Ignoring this "
4641 "signal might lead to an endless loop."
4642 msgstr ""
4643
4644 #. type: Plain text
4645 #: build/C/man2/sigaction.2:723
4646 msgid ""
4647 "POSIX.1-1990 disallowed setting the action for B<SIGCHLD> to B<SIG_IGN>.  "
4648 "POSIX.1-2001 allows this possibility, so that ignoring B<SIGCHLD> can be "
4649 "used to prevent the creation of zombies (see B<wait>(2)).  Nevertheless, the "
4650 "historical BSD and System\\ V behaviors for ignoring B<SIGCHLD> differ, so "
4651 "that the only completely portable method of ensuring that terminated "
4652 "children do not become zombies is to catch the B<SIGCHLD> signal and perform "
4653 "a B<wait>(2)  or similar."
4654 msgstr ""
4655
4656 #. type: Plain text
4657 #: build/C/man2/sigaction.2:736
4658 msgid ""
4659 "POSIX.1-1990 specified only B<SA_NOCLDSTOP>.  POSIX.1-2001 added "
4660 "B<SA_NOCLDWAIT>, B<SA_RESETHAND>, B<SA_NODEFER>, and B<SA_SIGINFO>.  Use of "
4661 "these latter values in I<sa_flags> may be less portable in applications "
4662 "intended for older UNIX implementations."
4663 msgstr ""
4664
4665 #. type: Plain text
4666 #: build/C/man2/sigaction.2:740
4667 msgid "The B<SA_RESETHAND> flag is compatible with the SVr4 flag of the same name."
4668 msgstr ""
4669
4670 #. type: Plain text
4671 #: build/C/man2/sigaction.2:750
4672 msgid ""
4673 "The B<SA_NODEFER> flag is compatible with the SVr4 flag of the same name "
4674 "under kernels 1.3.9 and newer.  On older kernels the Linux implementation "
4675 "allowed the receipt of any signal, not just the one we are installing "
4676 "(effectively overriding any I<sa_mask> settings)."
4677 msgstr ""
4678
4679 #. type: Plain text
4680 #: build/C/man2/sigaction.2:756
4681 msgid ""
4682 "B<sigaction>()  can be called with a NULL second argument to query the "
4683 "current signal handler.  It can also be used to check whether a given signal "
4684 "is valid for the current machine by calling it with NULL second and third "
4685 "arguments."
4686 msgstr ""
4687
4688 #. type: Plain text
4689 #: build/C/man2/sigaction.2:762
4690 msgid ""
4691 "It is not possible to block B<SIGKILL> or B<SIGSTOP> (by specifying them in "
4692 "I<sa_mask>).  Attempts to do so are silently ignored."
4693 msgstr ""
4694
4695 #. type: Plain text
4696 #: build/C/man2/sigaction.2:766 build/C/man2/sigpending.2:70 build/C/man2/sigprocmask.2:144 build/C/man2/sigsuspend.2:108
4697 msgid "See B<sigsetops>(3)  for details on manipulating signal sets."
4698 msgstr ""
4699
4700 #. type: Plain text
4701 #: build/C/man2/sigaction.2:771
4702 msgid ""
4703 "See B<signal>(7)  for a list of the async-signal-safe functions that can be "
4704 "safely called inside from inside a signal handler."
4705 msgstr ""
4706
4707 #. type: SS
4708 #: build/C/man2/sigaction.2:771
4709 #, no-wrap
4710 msgid "Undocumented"
4711 msgstr ""
4712
4713 #. type: Plain text
4714 #: build/C/man2/sigaction.2:781
4715 msgid ""
4716 "Before the introduction of B<SA_SIGINFO> it was also possible to get some "
4717 "additional information, namely by using a I<sa_handler> with second argument "
4718 "of type I<struct sigcontext>.  See the relevant Linux kernel sources for "
4719 "details.  This use is obsolete now."
4720 msgstr ""
4721
4722 #. type: Plain text
4723 #: build/C/man2/sigaction.2:790
4724 msgid ""
4725 "In kernels up to and including 2.6.13, specifying B<SA_NODEFER> in "
4726 "I<sa_flags> prevents not only the delivered signal from being masked during "
4727 "execution of the handler, but also the signals specified in I<sa_mask>.  "
4728 "This bug was fixed in kernel 2.6.14."
4729 msgstr ""
4730
4731 #. type: Plain text
4732 #: build/C/man2/sigaction.2:793
4733 msgid "See B<mprotect>(2)."
4734 msgstr ""
4735
4736 #. type: Plain text
4737 #: build/C/man2/sigaction.2:813
4738 msgid ""
4739 "B<kill>(1), B<kill>(2), B<killpg>(2), B<pause>(2), B<restart_syscall>(2), "
4740 "B<sigaltstack>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), "
4741 "B<sigprocmask>(2), B<sigsuspend>(2), B<wait>(2), B<raise>(3), "
4742 "B<siginterrupt>(3), B<sigqueue>(3), B<sigsetops>(3), B<sigvec>(3), "
4743 "B<core>(5), B<signal>(7)"
4744 msgstr ""
4745
4746 #. type: TH
4747 #: build/C/man2/sigaltstack.2:27
4748 #, no-wrap
4749 msgid "SIGALTSTACK"
4750 msgstr ""
4751
4752 #. type: TH
4753 #: build/C/man2/sigaltstack.2:27
4754 #, no-wrap
4755 msgid "2010-09-26"
4756 msgstr ""
4757
4758 #. type: Plain text
4759 #: build/C/man2/sigaltstack.2:30
4760 msgid "sigaltstack - set and/or get signal stack context"
4761 msgstr ""
4762
4763 #. type: Plain text
4764 #: build/C/man2/sigaltstack.2:34
4765 msgid "B<int sigaltstack(const stack_t *>I<ss>B<, stack_t *>I<oss>B<);>"
4766 msgstr ""
4767
4768 #. type: Plain text
4769 #: build/C/man2/sigaltstack.2:41
4770 msgid "B<sigaltstack>():"
4771 msgstr ""
4772
4773 #. type: Plain text
4774 #: build/C/man2/sigaltstack.2:48 build/C/man3/siginterrupt.3:53 build/C/man2/wait.2:80
4775 msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
4776 msgstr ""
4777
4778 #. type: Plain text
4779 #: build/C/man2/sigaltstack.2:60
4780 msgid ""
4781 "B<sigaltstack>()  allows a process to define a new alternate signal stack "
4782 "and/or retrieve the state of an existing alternate signal stack.  An "
4783 "alternate signal stack is used during the execution of a signal handler if "
4784 "the establishment of that handler (see B<sigaction>(2))  requested it."
4785 msgstr ""
4786
4787 #. type: Plain text
4788 #: build/C/man2/sigaltstack.2:63
4789 msgid ""
4790 "The normal sequence of events for using an alternate signal stack is the "
4791 "following:"
4792 msgstr ""
4793
4794 #. type: IP
4795 #: build/C/man2/sigaltstack.2:63 build/C/man7/signal.7:387
4796 #, no-wrap
4797 msgid "1."
4798 msgstr ""
4799
4800 #. type: Plain text
4801 #: build/C/man2/sigaltstack.2:67
4802 msgid "Allocate an area of memory to be used for the alternate signal stack."
4803 msgstr ""
4804
4805 #. type: IP
4806 #: build/C/man2/sigaltstack.2:67 build/C/man7/signal.7:391
4807 #, no-wrap
4808 msgid "2."
4809 msgstr ""
4810
4811 #. type: Plain text
4812 #: build/C/man2/sigaltstack.2:73
4813 msgid ""
4814 "Use B<sigaltstack>()  to inform the system of the existence and location of "
4815 "the alternate signal stack."
4816 msgstr ""
4817
4818 #. type: IP
4819 #: build/C/man2/sigaltstack.2:73 build/C/man7/signal.7:411
4820 #, no-wrap
4821 msgid "3."
4822 msgstr ""
4823
4824 #. type: Plain text
4825 #: build/C/man2/sigaltstack.2:80
4826 msgid ""
4827 "When establishing a signal handler using B<sigaction>(2), inform the system "
4828 "that the signal handler should be executed on the alternate signal stack by "
4829 "specifying the B<SA_ONSTACK> flag."
4830 msgstr ""
4831
4832 #. type: Plain text
4833 #: build/C/man2/sigaltstack.2:88
4834 msgid ""
4835 "The I<ss> argument is used to specify a new alternate signal stack, while "
4836 "the I<oss> argument is used to retrieve information about the currently "
4837 "established signal stack.  If we are interested in performing just one of "
4838 "these tasks, then the other argument can be specified as NULL.  Each of "
4839 "these arguments is a structure of the following type:"
4840 msgstr ""
4841
4842 #. type: Plain text
4843 #: build/C/man2/sigaltstack.2:96
4844 #, no-wrap
4845 msgid ""
4846 "typedef struct {\n"
4847 "    void  *ss_sp;     /* Base address of stack */\n"
4848 "    int    ss_flags;  /* Flags */\n"
4849 "    size_t ss_size;   /* Number of bytes in stack */\n"
4850 "} stack_t;\n"
4851 msgstr ""
4852
4853 #. type: Plain text
4854 #: build/C/man2/sigaltstack.2:107
4855 msgid ""
4856 "To establish a new alternate signal stack, I<ss.ss_flags> is set to zero, "
4857 "and I<ss.ss_sp> and I<ss.ss_size> specify the starting address and size of "
4858 "the stack.  The constant B<SIGSTKSZ> is defined to be large enough to cover "
4859 "the usual size requirements for an alternate signal stack, and the constant "
4860 "B<MINSIGSTKSZ> defines the minimum size required to execute a signal "
4861 "handler."
4862 msgstr ""
4863
4864 #. type: Plain text
4865 #: build/C/man2/sigaltstack.2:111
4866 msgid ""
4867 "When a signal handler is invoked on the alternate stack, the kernel "
4868 "automatically aligns the address given in I<ss.ss_sp> to a suitable address "
4869 "boundary for the underlying hardware architecture."
4870 msgstr ""
4871
4872 #. type: Plain text
4873 #: build/C/man2/sigaltstack.2:116
4874 msgid ""
4875 "To disable an existing stack, specify I<ss.ss_flags> as B<SS_DISABLE>.  In "
4876 "this case, the remaining fields in I<ss> are ignored."
4877 msgstr ""
4878
4879 #. type: Plain text
4880 #: build/C/man2/sigaltstack.2:124
4881 msgid ""
4882 "If I<oss> is not NULL, then it is used to return information about the "
4883 "alternate signal stack which was in effect prior to the call to "
4884 "B<sigaltstack>().  The I<oss.ss_sp> and I<oss.ss_size> fields return the "
4885 "starting address and size of that stack.  The I<oss.ss_flags> may return "
4886 "either of the following values:"
4887 msgstr ""
4888
4889 #. type: TP
4890 #: build/C/man2/sigaltstack.2:124
4891 #, no-wrap
4892 msgid "B<SS_ONSTACK>"
4893 msgstr ""
4894
4895 #. type: Plain text
4896 #: build/C/man2/sigaltstack.2:130
4897 msgid ""
4898 "The process is currently executing on the alternate signal stack.  (Note "
4899 "that it is not possible to change the alternate signal stack if the process "
4900 "is currently executing on it.)"
4901 msgstr ""
4902
4903 #. type: TP
4904 #: build/C/man2/sigaltstack.2:130
4905 #, no-wrap
4906 msgid "B<SS_DISABLE>"
4907 msgstr ""
4908
4909 #. type: Plain text
4910 #: build/C/man2/sigaltstack.2:133
4911 msgid "The alternate signal stack is currently disabled."
4912 msgstr ""
4913
4914 #. type: Plain text
4915 #: build/C/man2/sigaltstack.2:137
4916 msgid ""
4917 "B<sigaltstack>()  returns 0 on success, or -1 on failure with I<errno> set "
4918 "to indicate the error."
4919 msgstr ""
4920
4921 #. type: Plain text
4922 #: build/C/man2/sigaltstack.2:142
4923 msgid ""
4924 "Either I<ss> or I<oss> is not NULL and points to an area outside of the "
4925 "process's address space."
4926 msgstr ""
4927
4928 #. type: Plain text
4929 #: build/C/man2/sigaltstack.2:147
4930 msgid ""
4931 "I<ss> is not NULL and the I<ss_flags> field contains a nonzero value other "
4932 "than B<SS_DISABLE>."
4933 msgstr ""
4934
4935 #. type: Plain text
4936 #: build/C/man2/sigaltstack.2:153
4937 msgid ""
4938 "The specified size of the new alternate signal stack I<ss.ss_size> as less "
4939 "than B<MINSTKSZ>."
4940 msgstr ""
4941
4942 #. type: Plain text
4943 #: build/C/man2/sigaltstack.2:158
4944 msgid ""
4945 "An attempt was made to change the alternate signal stack while it was active "
4946 "(i.e., the process was already executing on the current alternate signal "
4947 "stack)."
4948 msgstr ""
4949
4950 #. type: Plain text
4951 #: build/C/man2/sigaltstack.2:160
4952 msgid "SUSv2, SVr4, POSIX.1-2001."
4953 msgstr ""
4954
4955 #. type: Plain text
4956 #: build/C/man2/sigaltstack.2:168
4957 msgid ""
4958 "The most common usage of an alternate signal stack is to handle the "
4959 "B<SIGSEGV> signal that is generated if the space available for the normal "
4960 "process stack is exhausted: in this case, a signal handler for B<SIGSEGV> "
4961 "cannot be invoked on the process stack; if we wish to handle it, we must use "
4962 "an alternate signal stack."
4963 msgstr ""
4964
4965 #. type: Plain text
4966 #: build/C/man2/sigaltstack.2:178
4967 msgid ""
4968 "Establishing an alternate signal stack is useful if a process expects that "
4969 "it may exhaust its standard stack.  This may occur, for example, because the "
4970 "stack grows so large that it encounters the upwardly growing heap, or it "
4971 "reaches a limit established by a call to B<setrlimit(RLIMIT_STACK, &rlim)>.  "
4972 "If the standard stack is exhausted, the kernel sends the process a "
4973 "B<SIGSEGV> signal.  In these circumstances the only way to catch this signal "
4974 "is on an alternate signal stack."
4975 msgstr ""
4976
4977 #. type: Plain text
4978 #: build/C/man2/sigaltstack.2:184
4979 msgid ""
4980 "On most hardware architectures supported by Linux, stacks grow downward.  "
4981 "B<sigaltstack>()  automatically takes account of the direction of stack "
4982 "growth."
4983 msgstr ""
4984
4985 #. type: Plain text
4986 #: build/C/man2/sigaltstack.2:193
4987 msgid ""
4988 "Functions called from a signal handler executing on an alternate signal "
4989 "stack will also use the alternate signal stack.  (This also applies to any "
4990 "handlers invoked for other signals while the process is executing on the "
4991 "alternate signal stack.)  Unlike the standard stack, the system does not "
4992 "automatically extend the alternate signal stack.  Exceeding the allocated "
4993 "size of the alternate signal stack will lead to unpredictable results."
4994 msgstr ""
4995
4996 #. type: Plain text
4997 #: build/C/man2/sigaltstack.2:201
4998 msgid ""
4999 "A successful call to B<execve>(2)  removes any existing alternate signal "
5000 "stack.  A child process created via B<fork>(2)  inherits a copy of its "
5001 "parent's alternate signal stack settings."
5002 msgstr ""
5003
5004 #. type: Plain text
5005 #: build/C/man2/sigaltstack.2:210
5006 msgid ""
5007 "B<sigaltstack>()  supersedes the older B<sigstack>()  call.  For backward "
5008 "compatibility, glibc also provides B<sigstack>().  All new applications "
5009 "should be written using B<sigaltstack>()."
5010 msgstr ""
5011
5012 #. type: SS
5013 #: build/C/man2/sigaltstack.2:210 build/C/man3/sigpause.3:66
5014 #, no-wrap
5015 msgid "History"
5016 msgstr ""
5017
5018 #. type: Plain text
5019 #: build/C/man2/sigaltstack.2:217
5020 msgid ""
5021 "4.2BSD had a B<sigstack>()  system call.  It used a slightly different "
5022 "struct, and had the major disadvantage that the caller had to know the "
5023 "direction of stack growth."
5024 msgstr ""
5025
5026 #. type: Plain text
5027 #: build/C/man2/sigaltstack.2:220
5028 msgid "The following code segment demonstrates the use of B<sigaltstack>():"
5029 msgstr ""
5030
5031 #. type: Plain text
5032 #: build/C/man2/sigaltstack.2:224
5033 #, no-wrap
5034 msgid "stack_t ss;\n"
5035 msgstr ""
5036
5037 #. type: Plain text
5038 #: build/C/man2/sigaltstack.2:232
5039 #, no-wrap
5040 msgid ""
5041 "ss.ss_sp = malloc(SIGSTKSZ);\n"
5042 "if (ss.ss_sp == NULL)\n"
5043 "    /* Handle error */;\n"
5044 "ss.ss_size = SIGSTKSZ;\n"
5045 "ss.ss_flags = 0;\n"
5046 "if (sigaltstack(&ss, NULL) == -1)\n"
5047 "    /* Handle error */;\n"
5048 msgstr ""
5049
5050 #. type: Plain text
5051 #: build/C/man2/sigaltstack.2:241
5052 msgid ""
5053 "B<execve>(2), B<setrlimit>(2), B<sigaction>(2), B<siglongjmp>(3), "
5054 "B<sigsetjmp>(3), B<signal>(7)"
5055 msgstr ""
5056
5057 #. type: TH
5058 #: build/C/man7/sigevent.7:26
5059 #, no-wrap
5060 msgid "SIGEVENT"
5061 msgstr ""
5062
5063 #. type: TH
5064 #: build/C/man7/sigevent.7:26
5065 #, no-wrap
5066 msgid "2011-09-09"
5067 msgstr ""
5068
5069 #. type: Plain text
5070 #: build/C/man7/sigevent.7:29
5071 msgid "sigevent - structure for notification from asynchronous routines"
5072 msgstr ""
5073
5074 #. type: Plain text
5075 #: build/C/man7/sigevent.7:36
5076 #, no-wrap
5077 msgid ""
5078 "union sigval {          /* Data passed with notification */\n"
5079 "    int     sival_int;         /* Integer value */\n"
5080 "    void   *sival_ptr;         /* Pointer value */\n"
5081 "};\n"
5082 msgstr ""
5083
5084 #. type: Plain text
5085 #: build/C/man7/sigevent.7:51
5086 #, no-wrap
5087 msgid ""
5088 "struct sigevent {\n"
5089 "    int          sigev_notify; /* Notification method */\n"
5090 "    int          sigev_signo;  /* Notification signal */\n"
5091 "    union sigval sigev_value;  /* Data passed with\n"
5092 "                                  notification */\n"
5093 "    void       (*sigev_notify_function) (union sigval);\n"
5094 "                     /* Function used for thread\n"
5095 "                        notification (SIGEV_THREAD) */\n"
5096 "    void        *sigev_notify_attributes;\n"
5097 "                     /* Attributes for notification thread\n"
5098 "                        (SIGEV_THREAD) */\n"
5099 "    pid_t        sigev_notify_thread_id;\n"
5100 "                     /* ID of thread to signal (SIGEV_THREAD_ID) */\n"
5101 "};\n"
5102 msgstr ""
5103
5104 #. type: Plain text
5105 #: build/C/man7/sigevent.7:60
5106 msgid ""
5107 "The I<sigevent> structure is used by various APIs to describe the way a "
5108 "process is to be notified about an event (e.g., completion of an "
5109 "asynchronous request, expiration of a timer, or the arrival of a message)."
5110 msgstr ""
5111
5112 #. type: Plain text
5113 #: build/C/man7/sigevent.7:68
5114 msgid ""
5115 "The definition shown in the SYNOPSIS is approximate: some of the fields in "
5116 "the I<sigevent> structure may be defined as part of a union.  Programs "
5117 "should employ only those fields relevant to the value specified in "
5118 "I<sigev_notify>."
5119 msgstr ""
5120
5121 #. type: Plain text
5122 #: build/C/man7/sigevent.7:73
5123 msgid ""
5124 "The I<sigev_notify> field specifies how notification is to be performed.  "
5125 "This field can have one of the following values:"
5126 msgstr ""
5127
5128 #. type: TP
5129 #: build/C/man7/sigevent.7:73 build/C/man2/timer_create.2:107
5130 #, no-wrap
5131 msgid "B<SIGEV_NONE>"
5132 msgstr ""
5133
5134 #. type: Plain text
5135 #: build/C/man7/sigevent.7:76
5136 msgid "A \"null\" notification: don't do anything when the event occurs."
5137 msgstr ""
5138
5139 #. type: TP
5140 #: build/C/man7/sigevent.7:76 build/C/man2/timer_create.2:112
5141 #, no-wrap
5142 msgid "B<SIGEV_SIGNAL>"
5143 msgstr ""
5144
5145 #. type: Plain text
5146 #: build/C/man7/sigevent.7:80
5147 msgid "Notify the process by sending the signal specified in I<sigev_signo>."
5148 msgstr ""
5149
5150 #. type: Plain text
5151 #: build/C/man7/sigevent.7:87
5152 msgid ""
5153 "If the signal is caught with a signal handler that was registered using the "
5154 "B<sigaction>(2)  B<SA_SIGINFO> flag, then the following fields are set in "
5155 "the I<siginfo_t> structure that is passed as the second argument of the "
5156 "handler:"
5157 msgstr ""
5158
5159 #. type: Plain text
5160 #: build/C/man7/sigevent.7:92
5161 msgid ""
5162 "This field is set to a value that depends on the API delivering the "
5163 "notification."
5164 msgstr ""
5165
5166 #. type: TP
5167 #: build/C/man7/sigevent.7:92 build/C/man2/wait.2:302
5168 #, no-wrap
5169 msgid "I<si_signo>"
5170 msgstr ""
5171
5172 #. type: Plain text
5173 #: build/C/man7/sigevent.7:96
5174 msgid ""
5175 "This field is set to the signal number (i.e., the same value as in "
5176 "I<sigev_signo>)."
5177 msgstr ""
5178
5179 #. type: Plain text
5180 #: build/C/man7/sigevent.7:100
5181 msgid "This field is set to the value specified in I<sigev_value>."
5182 msgstr ""
5183
5184 #. type: Plain text
5185 #: build/C/man7/sigevent.7:105
5186 msgid ""
5187 "Depending on the API, other fields may also be set in the I<siginfo_t> "
5188 "structure."
5189 msgstr ""
5190
5191 #. type: Plain text
5192 #: build/C/man7/sigevent.7:108
5193 msgid ""
5194 "The same information is also available if the signal is accepted using "
5195 "B<sigwaitinfo>(2)."
5196 msgstr ""
5197
5198 #. type: TP
5199 #: build/C/man7/sigevent.7:108 build/C/man2/timer_create.2:130
5200 #, no-wrap
5201 msgid "B<SIGEV_THREAD>"
5202 msgstr ""
5203
5204 #. type: Plain text
5205 #: build/C/man7/sigevent.7:125
5206 msgid ""
5207 "Notify the process by invoking I<sigev_notify_function> \"as if\" it were "
5208 "the start function of a new thread.  (Among the implementation possibilities "
5209 "here are that each timer notification could result in the creation of a new "
5210 "thread, or that a single thread is created to receive all notifications.)  "
5211 "The function is invoked with I<sigev_value> as its sole argument.  If "
5212 "I<sigev_notify_attributes> is not NULL, it should point to a "
5213 "I<pthread_attr_t> structure that defines attributes for the new thread (see "
5214 "B<pthread_attr_init>(3))."
5215 msgstr ""
5216
5217 #. type: TP
5218 #: build/C/man7/sigevent.7:125 build/C/man2/timer_create.2:138
5219 #, no-wrap
5220 msgid "B<SIGEV_THREAD_ID> (Linux-specific)"
5221 msgstr ""
5222
5223 #.  | SIGEV_SIGNAL vs not?
5224 #. type: Plain text
5225 #: build/C/man7/sigevent.7:130
5226 msgid "Currently used only by POSIX timers; see B<timer_create>(2)."
5227 msgstr ""
5228
5229 #. type: Plain text
5230 #: 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:146 build/C/man2/sigsuspend.2:86 build/C/man3/sigwait.3:87 build/C/man2/sigwaitinfo.2:135 build/C/man2/timer_create.2:195 build/C/man2/timer_delete.2:69 build/C/man2/timer_getoverrun.2:99 build/C/man2/timer_settime.2:209
5231 msgid "POSIX.1-2001."
5232 msgstr ""
5233
5234 #. type: Plain text
5235 #: build/C/man7/sigevent.7:142
5236 msgid ""
5237 "B<timer_create>(2), B<aio_fsync>(3), B<aio_read>(3), B<aio_write>(3), "
5238 "B<getaddrinfo_a>(3), B<lio_listio>(3), B<mq_notify>(3), B<aio>(7), "
5239 "B<pthreads>(7)"
5240 msgstr ""
5241
5242 #. type: TH
5243 #: build/C/man3/siginterrupt.3:31
5244 #, no-wrap
5245 msgid "SIGINTERRUPT"
5246 msgstr ""
5247
5248 #. type: TH
5249 #: build/C/man3/siginterrupt.3:31 build/C/man2/signal.2:36 build/C/man2/sigprocmask.2:29 build/C/man2/sigsuspend.2:29
5250 #, no-wrap
5251 msgid "2013-04-19"
5252 msgstr ""
5253
5254 #. type: Plain text
5255 #: build/C/man3/siginterrupt.3:34
5256 msgid "siginterrupt - allow signals to interrupt system calls"
5257 msgstr ""
5258
5259 #. type: Plain text
5260 #: build/C/man3/siginterrupt.3:39
5261 #, no-wrap
5262 msgid "B<int siginterrupt(int >I<sig>B<, int >I<flag>B<);>\n"
5263 msgstr ""
5264
5265 #. type: Plain text
5266 #: build/C/man3/siginterrupt.3:47
5267 msgid "B<siginterrupt>():"
5268 msgstr ""
5269
5270 #. type: Plain text
5271 #: build/C/man3/siginterrupt.3:64
5272 msgid ""
5273 "The B<siginterrupt>()  function changes the restart behavior when a system "
5274 "call is interrupted by the signal I<sig>.  If the I<flag> argument is false "
5275 "(0), then system calls will be restarted if interrupted by the specified "
5276 "signal I<sig>.  This is the default behavior in Linux."
5277 msgstr ""
5278
5279 #. type: Plain text
5280 #: build/C/man3/siginterrupt.3:69
5281 msgid ""
5282 "If the I<flag> argument is true (1) and no data has been transferred, then a "
5283 "system call interrupted by the signal I<sig> will return -1 and I<errno> "
5284 "will be set to B<EINTR>."
5285 msgstr ""
5286
5287 #. type: Plain text
5288 #: build/C/man3/siginterrupt.3:73
5289 msgid ""
5290 "If the I<flag> argument is true (1) and data transfer has started, then the "
5291 "system call will be interrupted and will return the actual amount of data "
5292 "transferred."
5293 msgstr ""
5294
5295 #. type: Plain text
5296 #: build/C/man3/siginterrupt.3:83
5297 msgid ""
5298 "The B<siginterrupt>()  function returns 0 on success.  It returns -1 if the "
5299 "signal number I<sig> is invalid, with I<errno> set to indicate the cause of "
5300 "the error."
5301 msgstr ""
5302
5303 #. type: Plain text
5304 #: build/C/man3/siginterrupt.3:87
5305 msgid "The specified signal number is invalid."
5306 msgstr ""
5307
5308 #. type: Plain text
5309 #: build/C/man3/siginterrupt.3:96
5310 msgid ""
5311 "4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<siginterrupt>()  as obsolete, "
5312 "recommending the use of B<sigaction>(2)  with the B<SA_RESTART> flag "
5313 "instead."
5314 msgstr ""
5315
5316 #. type: Plain text
5317 #: build/C/man3/siginterrupt.3:98
5318 msgid "B<signal>(2)"
5319 msgstr ""
5320
5321 #. type: TH
5322 #: build/C/man2/signal.2:36 build/C/man7/signal.7:46
5323 #, no-wrap
5324 msgid "SIGNAL"
5325 msgstr ""
5326
5327 #. type: Plain text
5328 #: build/C/man2/signal.2:39
5329 msgid "signal - ANSI C signal handling"
5330 msgstr ""
5331
5332 #. type: Plain text
5333 #: build/C/man2/signal.2:45
5334 msgid "B<sighandler_t signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
5335 msgstr ""
5336
5337 #. type: Plain text
5338 #: build/C/man2/signal.2:54
5339 msgid ""
5340 "The behavior of B<signal>()  varies across UNIX versions, and has also "
5341 "varied historically across different versions of Linux.  B<Avoid its use>: "
5342 "use B<sigaction>(2)  instead.  See I<Portability> below."
5343 msgstr ""
5344
5345 #. type: Plain text
5346 #: build/C/man2/signal.2:64
5347 msgid ""
5348 "B<signal>()  sets the disposition of the signal I<signum> to I<handler>, "
5349 "which is either B<SIG_IGN>, B<SIG_DFL>, or the address of a "
5350 "programmer-defined function (a \"signal handler\")."
5351 msgstr ""
5352
5353 #. type: Plain text
5354 #: build/C/man2/signal.2:68
5355 msgid ""
5356 "If the signal I<signum> is delivered to the process, then one of the "
5357 "following happens:"
5358 msgstr ""
5359
5360 #. type: Plain text
5361 #: build/C/man2/signal.2:73
5362 msgid "If the disposition is set to B<SIG_IGN>, then the signal is ignored."
5363 msgstr ""
5364
5365 #. type: Plain text
5366 #: build/C/man2/signal.2:80
5367 msgid ""
5368 "If the disposition is set to B<SIG_DFL>, then the default action associated "
5369 "with the signal (see B<signal>(7))  occurs."
5370 msgstr ""
5371
5372 #. type: Plain text
5373 #: build/C/man2/signal.2:91
5374 msgid ""
5375 "If the disposition is set to a function, then first either the disposition "
5376 "is reset to B<SIG_DFL>, or the signal is blocked (see I<Portability> below), "
5377 "and then I<handler> is called with argument I<signum>.  If invocation of the "
5378 "handler caused the signal to be blocked, then the signal is unblocked upon "
5379 "return from the handler."
5380 msgstr ""
5381
5382 #. type: Plain text
5383 #: build/C/man2/signal.2:97
5384 msgid "The signals B<SIGKILL> and B<SIGSTOP> cannot be caught or ignored."
5385 msgstr ""
5386
5387 #. type: Plain text
5388 #: build/C/man2/signal.2:105
5389 msgid ""
5390 "B<signal>()  returns the previous value of the signal handler, or B<SIG_ERR> "
5391 "on error.  In the event of an error, I<errno> is set to indicate the cause."
5392 msgstr ""
5393
5394 #. type: Plain text
5395 #: build/C/man2/signal.2:110
5396 msgid "I<signum> is invalid."
5397 msgstr ""
5398
5399 #. type: Plain text
5400 #: build/C/man2/signal.2:116
5401 msgid "The effects of B<signal>()  in a multithreaded process are unspecified."
5402 msgstr ""
5403
5404 #. type: Plain text
5405 #: build/C/man2/signal.2:141
5406 msgid ""
5407 "See B<sigaction>(2)  for details on what happens when B<SIGCHLD> is set to "
5408 "B<SIG_IGN>."
5409 msgstr ""
5410
5411 #. type: Plain text
5412 #: build/C/man2/signal.2:146
5413 msgid ""
5414 "See B<signal>(7)  for a list of the async-signal-safe functions that can be "
5415 "safely called from inside a signal handler."
5416 msgstr ""
5417
5418 #.  libc4 and libc5 define
5419 #.  .IR SignalHandler ;
5420 #. type: Plain text
5421 #: build/C/man2/signal.2:162
5422 msgid ""
5423 "The use of I<sighandler_t> is a GNU extension, exposed if B<_GNU_SOURCE> is "
5424 "defined; glibc also defines (the BSD-derived)  I<sig_t> if B<_BSD_SOURCE> is "
5425 "defined.  Without use of such a type, the declaration of B<signal>()  is the "
5426 "somewhat harder to read:"
5427 msgstr ""
5428
5429 #. type: Plain text
5430 #: build/C/man2/signal.2:166
5431 #, no-wrap
5432 msgid ""
5433 "B<void ( *>I<signal>B<(int >I<signum>B<, void (*>I<handler>B<)(int)) ) "
5434 "(int);>\n"
5435 msgstr ""
5436
5437 #. type: SS
5438 #: build/C/man2/signal.2:168
5439 #, no-wrap
5440 msgid "Portability"
5441 msgstr ""
5442
5443 #. type: Plain text
5444 #: build/C/man2/signal.2:180
5445 msgid ""
5446 "The only portable use of B<signal>()  is to set a signal's disposition to "
5447 "B<SIG_DFL> or B<SIG_IGN>.  The semantics when using B<signal>()  to "
5448 "establish a signal handler vary across systems (and POSIX.1 explicitly "
5449 "permits this variation); B<do not use it for this purpose.>"
5450 msgstr ""
5451
5452 #. type: Plain text
5453 #: build/C/man2/signal.2:186
5454 msgid ""
5455 "POSIX.1 solved the portability mess by specifying B<sigaction>(2), which "
5456 "provides explicit control of the semantics when a signal handler is invoked; "
5457 "use that interface instead of B<signal>()."
5458 msgstr ""
5459
5460 #. type: Plain text
5461 #: build/C/man2/signal.2:196
5462 msgid ""
5463 "In the original UNIX systems, when a handler that was established using "
5464 "B<signal>()  was invoked by the delivery of a signal, the disposition of the "
5465 "signal would be reset to B<SIG_DFL>, and the system did not block delivery "
5466 "of further instances of the signal.  This is equivalent to calling "
5467 "B<sigaction>(2)  with the following flags:"
5468 msgstr ""
5469
5470 #. type: Plain text
5471 #: build/C/man2/signal.2:198
5472 #, no-wrap
5473 msgid "    sa.sa_flags = SA_RESETHAND | SA_NODEFER;\n"
5474 msgstr ""
5475
5476 #. type: Plain text
5477 #: build/C/man2/signal.2:205
5478 msgid ""
5479 "System\\ V also provides these semantics for B<signal>().  This was bad "
5480 "because the signal might be delivered again before the handler had a chance "
5481 "to reestablish itself.  Furthermore, rapid deliveries of the same signal "
5482 "could result in recursive invocations of the handler."
5483 msgstr ""
5484
5485 #. type: Plain text
5486 #: build/C/man2/signal.2:220
5487 msgid ""
5488 "BSD improved on this situation, but unfortunately also changed the semantics "
5489 "of the existing B<signal>()  interface while doing so.  On BSD, when a "
5490 "signal handler is invoked, the signal disposition is not reset, and further "
5491 "instances of the signal are blocked from being delivered while the handler "
5492 "is executing.  Furthermore, certain blocking system calls are automatically "
5493 "restarted if interrupted by a signal handler (see B<signal>(7)).  The BSD "
5494 "semantics are equivalent to calling B<sigaction>(2)  with the following "
5495 "flags:"
5496 msgstr ""
5497
5498 #. type: Plain text
5499 #: build/C/man2/signal.2:222
5500 #, no-wrap
5501 msgid "    sa.sa_flags = SA_RESTART;\n"
5502 msgstr ""
5503
5504 #. type: Plain text
5505 #: build/C/man2/signal.2:224
5506 msgid "The situation on Linux is as follows:"
5507 msgstr ""
5508
5509 #. type: Plain text
5510 #: build/C/man2/signal.2:228
5511 msgid "The kernel's B<signal>()  system call provides System\\ V semantics."
5512 msgstr ""
5513
5514 #. type: Plain text
5515 #: build/C/man2/signal.2:244
5516 msgid ""
5517 "By default, in glibc 2 and later, the B<signal>()  wrapper function does not "
5518 "invoke the kernel system call.  Instead, it calls B<sigaction>(2)  using "
5519 "flags that supply BSD semantics.  This default behavior is provided as long "
5520 "as the B<_BSD_SOURCE> feature test macro is defined.  By default, "
5521 "B<_BSD_SOURCE> is defined; it is also implicitly defined if one defines "
5522 "B<_GNU_SOURCE>, and can of course be explicitly defined."
5523 msgstr ""
5524
5525 #
5526 #.  System V semantics are also provided if one uses the separate
5527 #.  .BR sysv_signal (3)
5528 #.  function.
5529 #. type: Plain text
5530 #: build/C/man2/signal.2:267
5531 msgid ""
5532 "On glibc 2 and later, if the B<_BSD_SOURCE> feature test macro is not "
5533 "defined, then B<signal>()  provides System\\ V semantics.  (The default "
5534 "implicit definition of B<_BSD_SOURCE> is not provided if one invokes "
5535 "B<gcc>(1)  in one of its standard modes (I<-std=xxx> or I<-ansi>)  or "
5536 "defines various other feature test macros such as B<_POSIX_SOURCE>, "
5537 "B<_XOPEN_SOURCE>, or B<_SVID_SOURCE>; see B<feature_test_macros>(7).)"
5538 msgstr ""
5539
5540 #. type: Plain text
5541 #: build/C/man2/signal.2:278
5542 msgid ""
5543 "The B<signal>()  function in Linux libc4 and libc5 provide System\\ V "
5544 "semantics.  If one on a libc5 system includes I<E<lt>bsd/signal.hE<gt>> "
5545 "instead of I<E<lt>signal.hE<gt>>, then B<signal>()  provides BSD semantics."
5546 msgstr ""
5547
5548 #. type: Plain text
5549 #: build/C/man2/signal.2:297
5550 msgid ""
5551 "B<kill>(1), B<alarm>(2), B<kill>(2), B<killpg>(2), B<pause>(2), "
5552 "B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), "
5553 "B<sigsuspend>(2), B<bsd_signal>(3), B<raise>(3), B<siginterrupt>(3), "
5554 "B<sigqueue>(3), B<sigsetops>(3), B<sigvec>(3), B<sysv_signal>(3), "
5555 "B<signal>(7)"
5556 msgstr ""
5557
5558 #. type: TH
5559 #: build/C/man7/signal.7:46 build/C/man2/sigreturn.2:29
5560 #, no-wrap
5561 msgid "2013-07-30"
5562 msgstr ""
5563
5564 #. type: Plain text
5565 #: build/C/man7/signal.7:49
5566 msgid "signal - overview of signals"
5567 msgstr ""
5568
5569 #. type: Plain text
5570 #: build/C/man7/signal.7:52
5571 msgid ""
5572 "Linux supports both POSIX reliable signals (hereinafter \"standard "
5573 "signals\") and POSIX real-time signals."
5574 msgstr ""
5575
5576 #. type: SS
5577 #: build/C/man7/signal.7:52
5578 #, no-wrap
5579 msgid "Signal dispositions"
5580 msgstr ""
5581
5582 #. type: Plain text
5583 #: build/C/man7/signal.7:57
5584 msgid ""
5585 "Each signal has a current I<disposition>, which determines how the process "
5586 "behaves when it is delivered the signal."
5587 msgstr ""
5588
5589 #. type: Plain text
5590 #: build/C/man7/signal.7:60
5591 msgid ""
5592 "The entries in the \"Action\" column of the tables below specify the default "
5593 "disposition for each signal, as follows:"
5594 msgstr ""
5595
5596 #. type: IP
5597 #: build/C/man7/signal.7:60
5598 #, no-wrap
5599 msgid "Term"
5600 msgstr ""
5601
5602 #. type: Plain text
5603 #: build/C/man7/signal.7:62
5604 msgid "Default action is to terminate the process."
5605 msgstr ""
5606
5607 #. type: IP
5608 #: build/C/man7/signal.7:62
5609 #, no-wrap
5610 msgid "Ign"
5611 msgstr ""
5612
5613 #. type: Plain text
5614 #: build/C/man7/signal.7:64
5615 msgid "Default action is to ignore the signal."
5616 msgstr ""
5617
5618 #. type: IP
5619 #: build/C/man7/signal.7:64
5620 #, no-wrap
5621 msgid "Core"
5622 msgstr ""
5623
5624 #. type: Plain text
5625 #: build/C/man7/signal.7:67
5626 msgid "Default action is to terminate the process and dump core (see B<core>(5))."
5627 msgstr ""
5628
5629 #. type: IP
5630 #: build/C/man7/signal.7:67
5631 #, no-wrap
5632 msgid "Stop"
5633 msgstr ""
5634
5635 #. type: Plain text
5636 #: build/C/man7/signal.7:69
5637 msgid "Default action is to stop the process."
5638 msgstr ""
5639
5640 #. type: IP
5641 #: build/C/man7/signal.7:69
5642 #, no-wrap
5643 msgid "Cont"
5644 msgstr ""
5645
5646 #. type: Plain text
5647 #: build/C/man7/signal.7:71
5648 msgid "Default action is to continue the process if it is currently stopped."
5649 msgstr ""
5650
5651 #. type: Plain text
5652 #: build/C/man7/signal.7:93
5653 msgid ""
5654 "A process can change the disposition of a signal using B<sigaction>(2)  or "
5655 "B<signal>(2).  (The latter is less portable when establishing a signal "
5656 "handler; see B<signal>(2)  for details.)  Using these system calls, a "
5657 "process can elect one of the following behaviors to occur on delivery of the "
5658 "signal: perform the default action; ignore the signal; or catch the signal "
5659 "with a I<signal handler>, a programmer-defined function that is "
5660 "automatically invoked when the signal is delivered.  (By default, the signal "
5661 "handler is invoked on the normal process stack.  It is possible to arrange "
5662 "that the signal handler uses an alternate stack; see B<sigaltstack>(2)  for "
5663 "a discussion of how to do this and when it might be useful.)"
5664 msgstr ""
5665
5666 #. type: Plain text
5667 #: build/C/man7/signal.7:97
5668 msgid ""
5669 "The signal disposition is a per-process attribute: in a multithreaded "
5670 "application, the disposition of a particular signal is the same for all "
5671 "threads."
5672 msgstr ""
5673
5674 #. type: SS
5675 #: build/C/man7/signal.7:105
5676 #, no-wrap
5677 msgid "Sending a signal"
5678 msgstr ""
5679
5680 #. type: Plain text
5681 #: build/C/man7/signal.7:108
5682 msgid ""
5683 "The following system calls and library functions allow the caller to send a "
5684 "signal:"
5685 msgstr ""
5686
5687 #. type: TP
5688 #: build/C/man7/signal.7:108
5689 #, no-wrap
5690 msgid "B<raise>(3)"
5691 msgstr ""
5692
5693 #. type: Plain text
5694 #: build/C/man7/signal.7:111
5695 msgid "Sends a signal to the calling thread."
5696 msgstr ""
5697
5698 #. type: Plain text
5699 #: build/C/man7/signal.7:116
5700 msgid ""
5701 "Sends a signal to a specified process, to all members of a specified process "
5702 "group, or to all processes on the system."
5703 msgstr ""
5704
5705 #. type: TP
5706 #: build/C/man7/signal.7:116
5707 #, no-wrap
5708 msgid "B<killpg>(2)"
5709 msgstr ""
5710
5711 #. type: Plain text
5712 #: build/C/man7/signal.7:119
5713 msgid "Sends a signal to all of the members of a specified process group."
5714 msgstr ""
5715
5716 #. type: TP
5717 #: build/C/man7/signal.7:119
5718 #, no-wrap
5719 msgid "B<pthread_kill>(3)"
5720 msgstr ""
5721
5722 #. type: Plain text
5723 #: build/C/man7/signal.7:123
5724 msgid ""
5725 "Sends a signal to a specified POSIX thread in the same process as the "
5726 "caller."
5727 msgstr ""
5728
5729 #. type: TP
5730 #: build/C/man7/signal.7:123
5731 #, no-wrap
5732 msgid "B<tgkill>(2)"
5733 msgstr ""
5734
5735 #. type: Plain text
5736 #: build/C/man7/signal.7:128
5737 msgid ""
5738 "Sends a signal to a specified thread within a specific process.  (This is "
5739 "the system call used to implement B<pthread_kill>(3).)"
5740 msgstr ""
5741
5742 #. type: Plain text
5743 #: build/C/man7/signal.7:131
5744 msgid "Sends a real-time signal with accompanying data to a specified process."
5745 msgstr ""
5746
5747 #. type: SS
5748 #: build/C/man7/signal.7:131
5749 #, no-wrap
5750 msgid "Waiting for a signal to be caught"
5751 msgstr ""
5752
5753 #. type: Plain text
5754 #: build/C/man7/signal.7:135
5755 msgid ""
5756 "The following system calls suspend execution of the calling process or "
5757 "thread until a signal is caught (or an unhandled signal terminates the "
5758 "process):"
5759 msgstr ""
5760
5761 #. type: TP
5762 #: build/C/man7/signal.7:135
5763 #, no-wrap
5764 msgid "B<pause>(2)"
5765 msgstr ""
5766
5767 #. type: Plain text
5768 #: build/C/man7/signal.7:138
5769 msgid "Suspends execution until any signal is caught."
5770 msgstr ""
5771
5772 #. type: TP
5773 #: build/C/man7/signal.7:138
5774 #, no-wrap
5775 msgid "B<sigsuspend>(2)"
5776 msgstr ""
5777
5778 #. type: Plain text
5779 #: build/C/man7/signal.7:142
5780 msgid ""
5781 "Temporarily changes the signal mask (see below) and suspends execution until "
5782 "one of the unmasked signals is caught."
5783 msgstr ""
5784
5785 #. type: SS
5786 #: build/C/man7/signal.7:142
5787 #, no-wrap
5788 msgid "Synchronously accepting a signal"
5789 msgstr ""
5790
5791 #. type: Plain text
5792 #: build/C/man7/signal.7:149
5793 msgid ""
5794 "Rather than asynchronously catching a signal via a signal handler, it is "
5795 "possible to synchronously accept the signal, that is, to block execution "
5796 "until the signal is delivered, at which point the kernel returns information "
5797 "about the signal to the caller.  There are two general ways to do this:"
5798 msgstr ""
5799
5800 #. type: Plain text
5801 #: build/C/man7/signal.7:157
5802 msgid ""
5803 "B<sigwaitinfo>(2), B<sigtimedwait>(2), and B<sigwait>(3)  suspend execution "
5804 "until one of the signals in a specified set is delivered.  Each of these "
5805 "calls returns information about the delivered signal."
5806 msgstr ""
5807
5808 #. type: Plain text
5809 #: build/C/man7/signal.7:170
5810 msgid ""
5811 "B<signalfd>(2)  returns a file descriptor that can be used to read "
5812 "information about signals that are delivered to the caller.  Each B<read>(2)  "
5813 "from this file descriptor blocks until one of the signals in the set "
5814 "specified in the B<signalfd>(2)  call is delivered to the caller.  The "
5815 "buffer returned by B<read>(2)  contains a structure describing the signal."
5816 msgstr ""
5817
5818 #. type: SS
5819 #: build/C/man7/signal.7:170
5820 #, no-wrap
5821 msgid "Signal mask and pending signals"
5822 msgstr ""
5823
5824 #. type: Plain text
5825 #: build/C/man7/signal.7:177
5826 msgid ""
5827 "A signal may be I<blocked>, which means that it will not be delivered until "
5828 "it is later unblocked.  Between the time when it is generated and when it is "
5829 "delivered a signal is said to be I<pending>."
5830 msgstr ""
5831
5832 #. type: Plain text
5833 #: build/C/man7/signal.7:186
5834 msgid ""
5835 "Each thread in a process has an independent I<signal mask>, which indicates "
5836 "the set of signals that the thread is currently blocking.  A thread can "
5837 "manipulate its signal mask using B<pthread_sigmask>(3).  In a traditional "
5838 "single-threaded application, B<sigprocmask>(2)  can be used to manipulate "
5839 "the signal mask."
5840 msgstr ""
5841
5842 #. type: Plain text
5843 #: build/C/man7/signal.7:192 build/C/man2/sigprocmask.2:126
5844 msgid ""
5845 "A child created via B<fork>(2)  inherits a copy of its parent's signal mask; "
5846 "the signal mask is preserved across B<execve>(2)."
5847 msgstr ""
5848
5849 #. type: Plain text
5850 #: build/C/man7/signal.7:209
5851 msgid ""
5852 "A signal may be generated (and thus pending)  for a process as a whole "
5853 "(e.g., when sent using B<kill>(2))  or for a specific thread (e.g., certain "
5854 "signals, such as B<SIGSEGV> and B<SIGFPE>, generated as a consequence of "
5855 "executing a specific machine-language instruction are thread directed, as "
5856 "are signals targeted at a specific thread using B<pthread_kill>(3)).  A "
5857 "process-directed signal may be delivered to any one of the threads that does "
5858 "not currently have the signal blocked.  If more than one of the threads has "
5859 "the signal unblocked, then the kernel chooses an arbitrary thread to which "
5860 "to deliver the signal."
5861 msgstr ""
5862
5863 #. type: Plain text
5864 #: build/C/man7/signal.7:216
5865 msgid ""
5866 "A thread can obtain the set of signals that it currently has pending using "
5867 "B<sigpending>(2).  This set will consist of the union of the set of pending "
5868 "process-directed signals and the set of signals pending for the calling "
5869 "thread."
5870 msgstr ""
5871
5872 #. type: Plain text
5873 #: build/C/man7/signal.7:222 build/C/man2/sigpending.2:85
5874 msgid ""
5875 "A child created via B<fork>(2)  initially has an empty pending signal set; "
5876 "the pending signal set is preserved across an B<execve>(2)."
5877 msgstr ""
5878
5879 #. type: SS
5880 #: build/C/man7/signal.7:222
5881 #, no-wrap
5882 msgid "Standard signals"
5883 msgstr ""
5884
5885 #. type: Plain text
5886 #: build/C/man7/signal.7:234
5887 msgid ""
5888 "Linux supports the standard signals listed below.  Several signal numbers "
5889 "are architecture-dependent, as indicated in the \"Value\" column.  (Where "
5890 "three values are given, the first one is usually valid for alpha and sparc, "
5891 "the middle one for x86, arm, and most other architectures, and the last one "
5892 "for mips.  (Values for parisc are I<not> shown; see the Linux kernel source "
5893 "for signal numbering on that architecture.)  A - denotes that a signal is "
5894 "absent on the corresponding architecture.)"
5895 msgstr ""
5896
5897 #. type: Plain text
5898 #: build/C/man7/signal.7:236
5899 msgid "First the signals described in the original POSIX.1-1990 standard."
5900 msgstr ""
5901
5902 #. type: tbl table
5903 #: build/C/man7/signal.7:240 build/C/man7/signal.7:276 build/C/man7/signal.7:305
5904 #, no-wrap
5905 msgid "Signal\tValue\tAction\tComment\n"
5906 msgstr ""
5907
5908 #. type: tbl table
5909 #: build/C/man7/signal.7:241
5910 #, no-wrap
5911 msgid "SIGHUP\t\\01\tTerm\tHangup detected on controlling terminal\n"
5912 msgstr ""
5913
5914 #. type: tbl table
5915 #: build/C/man7/signal.7:242
5916 #, no-wrap
5917 msgid "\t\t\tor death of controlling process\n"
5918 msgstr ""
5919
5920 #. type: tbl table
5921 #: build/C/man7/signal.7:243
5922 #, no-wrap
5923 msgid "SIGINT\t\\02\tTerm\tInterrupt from keyboard\n"
5924 msgstr ""
5925
5926 #. type: tbl table
5927 #: build/C/man7/signal.7:244
5928 #, no-wrap
5929 msgid "SIGQUIT\t\\03\tCore\tQuit from keyboard\n"
5930 msgstr ""
5931
5932 #. type: tbl table
5933 #: build/C/man7/signal.7:245
5934 #, no-wrap
5935 msgid "SIGILL\t\\04\tCore\tIllegal Instruction\n"
5936 msgstr ""
5937
5938 #. type: tbl table
5939 #: build/C/man7/signal.7:246
5940 #, no-wrap
5941 msgid "SIGABRT\t\\06\tCore\tAbort signal from B<abort>(3)\n"
5942 msgstr ""
5943
5944 #. type: tbl table
5945 #: build/C/man7/signal.7:247
5946 #, no-wrap
5947 msgid "SIGFPE\t\\08\tCore\tFloating point exception\n"
5948 msgstr ""
5949
5950 #. type: tbl table
5951 #: build/C/man7/signal.7:248
5952 #, no-wrap
5953 msgid "SIGKILL\t\\09\tTerm\tKill signal\n"
5954 msgstr ""
5955
5956 #. type: tbl table
5957 #: build/C/man7/signal.7:249
5958 #, no-wrap
5959 msgid "SIGSEGV\t11\tCore\tInvalid memory reference\n"
5960 msgstr ""
5961
5962 #. type: tbl table
5963 #: build/C/man7/signal.7:250
5964 #, no-wrap
5965 msgid "SIGPIPE\t13\tTerm\tBroken pipe: write to pipe with no\n"
5966 msgstr ""
5967
5968 #. type: tbl table
5969 #: build/C/man7/signal.7:251
5970 #, no-wrap
5971 msgid "\t\t\treaders\n"
5972 msgstr ""
5973
5974 #. type: tbl table
5975 #: build/C/man7/signal.7:252
5976 #, no-wrap
5977 msgid "SIGALRM\t14\tTerm\tTimer signal from B<alarm>(2)\n"
5978 msgstr ""
5979
5980 #. type: tbl table
5981 #: build/C/man7/signal.7:253
5982 #, no-wrap
5983 msgid "SIGTERM\t15\tTerm\tTermination signal\n"
5984 msgstr ""
5985
5986 #. type: tbl table
5987 #: build/C/man7/signal.7:254
5988 #, no-wrap
5989 msgid "SIGUSR1\t30,10,16\tTerm\tUser-defined signal 1\n"
5990 msgstr ""
5991
5992 #. type: tbl table
5993 #: build/C/man7/signal.7:255
5994 #, no-wrap
5995 msgid "SIGUSR2\t31,12,17\tTerm\tUser-defined signal 2\n"
5996 msgstr ""
5997
5998 #. type: tbl table
5999 #: build/C/man7/signal.7:256
6000 #, no-wrap
6001 msgid "SIGCHLD\t20,17,18\tIgn\tChild stopped or terminated\n"
6002 msgstr ""
6003
6004 #. type: tbl table
6005 #: build/C/man7/signal.7:257
6006 #, no-wrap
6007 msgid "SIGCONT\t19,18,25\tCont\tContinue if stopped\n"
6008 msgstr ""
6009
6010 #. type: tbl table
6011 #: build/C/man7/signal.7:258
6012 #, no-wrap
6013 msgid "SIGSTOP\t17,19,23\tStop\tStop process\n"
6014 msgstr ""
6015
6016 #. type: tbl table
6017 #: build/C/man7/signal.7:259
6018 #, no-wrap
6019 msgid "SIGTSTP\t18,20,24\tStop\tStop typed at terminal\n"
6020 msgstr ""
6021
6022 #. type: tbl table
6023 #: build/C/man7/signal.7:260
6024 #, no-wrap
6025 msgid "SIGTTIN\t21,21,26\tStop\tTerminal input for background process\n"
6026 msgstr ""
6027
6028 #. type: tbl table
6029 #: build/C/man7/signal.7:261
6030 #, no-wrap
6031 msgid "SIGTTOU\t22,22,27\tStop\tTerminal output for background process\n"
6032 msgstr ""
6033
6034 #. type: Plain text
6035 #: build/C/man7/signal.7:269
6036 msgid "The signals B<SIGKILL> and B<SIGSTOP> cannot be caught, blocked, or ignored."
6037 msgstr ""
6038
6039 #. type: Plain text
6040 #: build/C/man7/signal.7:272
6041 msgid ""
6042 "Next the signals not in the POSIX.1-1990 standard but described in SUSv2 and "
6043 "POSIX.1-2001."
6044 msgstr ""
6045
6046 #. type: tbl table
6047 #: build/C/man7/signal.7:277
6048 #, no-wrap
6049 msgid "SIGBUS\t10,7,10\tCore\tBus error (bad memory access)\n"
6050 msgstr ""
6051
6052 #. type: tbl table
6053 #: build/C/man7/signal.7:278
6054 #, no-wrap
6055 msgid "SIGPOLL\t\tTerm\tPollable event (Sys V).\n"
6056 msgstr ""
6057
6058 #. type: tbl table
6059 #: build/C/man7/signal.7:279
6060 #, no-wrap
6061 msgid "\t\t\tSynonym for B<SIGIO>\n"
6062 msgstr ""
6063
6064 #. type: tbl table
6065 #: build/C/man7/signal.7:280
6066 #, no-wrap
6067 msgid "SIGPROF\t27,27,29\tTerm\tProfiling timer expired\n"
6068 msgstr ""
6069
6070 #. type: tbl table
6071 #: build/C/man7/signal.7:281
6072 #, no-wrap
6073 msgid "SIGSYS\t12,31,12\tCore\tBad argument to routine (SVr4)\n"
6074 msgstr ""
6075
6076 #. type: tbl table
6077 #: build/C/man7/signal.7:282
6078 #, no-wrap
6079 msgid "SIGTRAP\t5\tCore\tTrace/breakpoint trap\n"
6080 msgstr ""
6081
6082 #. type: tbl table
6083 #: build/C/man7/signal.7:283
6084 #, no-wrap
6085 msgid "SIGURG\t16,23,21\tIgn\tUrgent condition on socket (4.2BSD)\n"
6086 msgstr ""
6087
6088 #. type: tbl table
6089 #: build/C/man7/signal.7:284
6090 #, no-wrap
6091 msgid "SIGVTALRM\t26,26,28\tTerm\tVirtual alarm clock (4.2BSD)\n"
6092 msgstr ""
6093
6094 #. type: tbl table
6095 #: build/C/man7/signal.7:285
6096 #, no-wrap
6097 msgid "SIGXCPU\t24,24,30\tCore\tCPU time limit exceeded (4.2BSD)\n"
6098 msgstr ""
6099
6100 #. type: tbl table
6101 #: build/C/man7/signal.7:286
6102 #, no-wrap
6103 msgid "SIGXFSZ\t25,25,31\tCore\tFile size limit exceeded (4.2BSD)\n"
6104 msgstr ""
6105
6106 #. type: Plain text
6107 #: build/C/man7/signal.7:299
6108 msgid ""
6109 "Up to and including Linux 2.2, the default behavior for B<SIGSYS>, "
6110 "B<SIGXCPU>, B<SIGXFSZ>, and (on architectures other than SPARC and MIPS)  "
6111 "B<SIGBUS> was to terminate the process (without a core dump).  (On some "
6112 "other UNIX systems the default action for B<SIGXCPU> and B<SIGXFSZ> is to "
6113 "terminate the process without a core dump.)  Linux 2.4 conforms to the "
6114 "POSIX.1-2001 requirements for these signals, terminating the process with a "
6115 "core dump."
6116 msgstr ""
6117
6118 #. type: Plain text
6119 #: build/C/man7/signal.7:301
6120 msgid "Next various other signals."
6121 msgstr ""
6122
6123 #. type: tbl table
6124 #: build/C/man7/signal.7:306
6125 #, no-wrap
6126 msgid "SIGIOT\t6\tCore\tIOT trap. A synonym for B<SIGABRT>\n"
6127 msgstr ""
6128
6129 #. type: tbl table
6130 #: build/C/man7/signal.7:307
6131 #, no-wrap
6132 msgid "SIGEMT\t7,-,7\tTerm\n"
6133 msgstr ""
6134
6135 #. type: tbl table
6136 #: build/C/man7/signal.7:308
6137 #, no-wrap
6138 msgid "SIGSTKFLT\t-,16,-\tTerm\tStack fault on coprocessor (unused)\n"
6139 msgstr ""
6140
6141 #. type: tbl table
6142 #: build/C/man7/signal.7:309
6143 #, no-wrap
6144 msgid "SIGIO\t23,29,22\tTerm\tI/O now possible (4.2BSD)\n"
6145 msgstr ""
6146
6147 #. type: tbl table
6148 #: build/C/man7/signal.7:310
6149 #, no-wrap
6150 msgid "SIGCLD\t-,-,18\tIgn\tA synonym for B<SIGCHLD>\n"
6151 msgstr ""
6152
6153 #. type: tbl table
6154 #: build/C/man7/signal.7:311
6155 #, no-wrap
6156 msgid "SIGPWR\t29,30,19\tTerm\tPower failure (System V)\n"
6157 msgstr ""
6158
6159 #. type: tbl table
6160 #: build/C/man7/signal.7:312
6161 #, no-wrap
6162 msgid "SIGINFO\t29,-,-\t\tA synonym for B<SIGPWR>\n"
6163 msgstr ""
6164
6165 #. type: tbl table
6166 #: build/C/man7/signal.7:313
6167 #, no-wrap
6168 msgid "SIGLOST\t-,-,-\tTerm\tFile lock lost (unused)\n"
6169 msgstr ""
6170
6171 #. type: tbl table
6172 #: build/C/man7/signal.7:314
6173 #, no-wrap
6174 msgid "SIGWINCH\t28,28,20\tIgn\tWindow resize signal (4.3BSD, Sun)\n"
6175 msgstr ""
6176
6177 #. type: tbl table
6178 #: build/C/man7/signal.7:315
6179 #, no-wrap
6180 msgid "SIGUNUSED\t-,31,-\tCore\tSynonymous with B<SIGSYS>\n"
6181 msgstr ""
6182
6183 #. type: Plain text
6184 #: build/C/man7/signal.7:325
6185 msgid "(Signal 29 is B<SIGINFO> / B<SIGPWR> on an alpha but B<SIGLOST> on a sparc.)"
6186 msgstr ""
6187
6188 #. type: Plain text
6189 #: build/C/man7/signal.7:331
6190 msgid ""
6191 "B<SIGEMT> is not specified in POSIX.1-2001, but nevertheless appears on most "
6192 "other UNIX systems, where its default action is typically to terminate the "
6193 "process with a core dump."
6194 msgstr ""
6195
6196 #. type: Plain text
6197 #: build/C/man7/signal.7:335
6198 msgid ""
6199 "B<SIGPWR> (which is not specified in POSIX.1-2001) is typically ignored by "
6200 "default on those other UNIX systems where it appears."
6201 msgstr ""
6202
6203 #. type: Plain text
6204 #: build/C/man7/signal.7:339
6205 msgid ""
6206 "B<SIGIO> (which is not specified in POSIX.1-2001) is ignored by default on "
6207 "several other UNIX systems."
6208 msgstr ""
6209
6210 #.  parisc is the only exception: SIGSYS is 12, SIGUNUSED is 31
6211 #. type: Plain text
6212 #: build/C/man7/signal.7:346
6213 msgid ""
6214 "Where defined, B<SIGUNUSED> is synonymous with B<SIGSYS> on most "
6215 "architectures."
6216 msgstr ""
6217
6218 #. type: SS
6219 #: build/C/man7/signal.7:346
6220 #, no-wrap
6221 msgid "Real-time signals"
6222 msgstr ""
6223
6224 #. type: Plain text
6225 #: build/C/man7/signal.7:356
6226 msgid ""
6227 "Linux supports real-time signals as originally defined in the POSIX.1b "
6228 "real-time extensions (and now included in POSIX.1-2001).  The range of "
6229 "supported real-time signals is defined by the macros B<SIGRTMIN> and "
6230 "B<SIGRTMAX>.  POSIX.1-2001 requires that an implementation support at least "
6231 "B<_POSIX_RTSIG_MAX> (8) real-time signals."
6232 msgstr ""
6233
6234 #. type: Plain text
6235 #: build/C/man7/signal.7:378
6236 msgid ""
6237 "The Linux kernel supports a range of 32 different real-time signals, "
6238 "numbered 33 to 64.  However, the glibc POSIX threads implementation "
6239 "internally uses two (for NPTL) or three (for LinuxThreads) real-time signals "
6240 "(see B<pthreads>(7)), and adjusts the value of B<SIGRTMIN> suitably (to 34 "
6241 "or 35).  Because the range of available real-time signals varies according "
6242 "to the glibc threading implementation (and this variation can occur at run "
6243 "time according to the available kernel and glibc), and indeed the range of "
6244 "real-time signals varies across UNIX systems, programs should I<never refer "
6245 "to real-time signals using hard-coded numbers>, but instead should always "
6246 "refer to real-time signals using the notation B<SIGRTMIN>+n, and include "
6247 "suitable (run-time) checks that B<SIGRTMIN>+n does not exceed B<SIGRTMAX>."
6248 msgstr ""
6249
6250 #. type: Plain text
6251 #: build/C/man7/signal.7:382
6252 msgid ""
6253 "Unlike standard signals, real-time signals have no predefined meanings: the "
6254 "entire set of real-time signals can be used for application-defined "
6255 "purposes."
6256 msgstr ""
6257
6258 #. type: Plain text
6259 #: build/C/man7/signal.7:385
6260 msgid ""
6261 "The default action for an unhandled real-time signal is to terminate the "
6262 "receiving process."
6263 msgstr ""
6264
6265 #. type: Plain text
6266 #: build/C/man7/signal.7:387
6267 msgid "Real-time signals are distinguished by the following:"
6268 msgstr ""
6269
6270 #. type: Plain text
6271 #: build/C/man7/signal.7:391
6272 msgid ""
6273 "Multiple instances of real-time signals can be queued.  By contrast, if "
6274 "multiple instances of a standard signal are delivered while that signal is "
6275 "currently blocked, then only one instance is queued."
6276 msgstr ""
6277
6278 #. type: Plain text
6279 #: build/C/man7/signal.7:411
6280 msgid ""
6281 "If the signal is sent using B<sigqueue>(3), an accompanying value (either an "
6282 "integer or a pointer) can be sent with the signal.  If the receiving process "
6283 "establishes a handler for this signal using the B<SA_SIGINFO> flag to "
6284 "B<sigaction>(2), then it can obtain this data via the I<si_value> field of "
6285 "the I<siginfo_t> structure passed as the second argument to the handler.  "
6286 "Furthermore, the I<si_pid> and I<si_uid> fields of this structure can be "
6287 "used to obtain the PID and real user ID of the process sending the signal."
6288 msgstr ""
6289
6290 #. type: Plain text
6291 #: build/C/man7/signal.7:420
6292 msgid ""
6293 "Real-time signals are delivered in a guaranteed order.  Multiple real-time "
6294 "signals of the same type are delivered in the order they were sent.  If "
6295 "different real-time signals are sent to a process, they are delivered "
6296 "starting with the lowest-numbered signal.  (I.e., low-numbered signals have "
6297 "highest priority.)  By contrast, if multiple standard signals are pending "
6298 "for a process, the order in which they are delivered is unspecified."
6299 msgstr ""
6300
6301 #. type: Plain text
6302 #: build/C/man7/signal.7:425
6303 msgid ""
6304 "If both standard and real-time signals are pending for a process, POSIX "
6305 "leaves it unspecified which is delivered first.  Linux, like many other "
6306 "implementations, gives priority to standard signals in this case."
6307 msgstr ""
6308
6309 #. type: Plain text
6310 #: build/C/man7/signal.7:448
6311 msgid ""
6312 "According to POSIX, an implementation should permit at least "
6313 "B<_POSIX_SIGQUEUE_MAX> (32) real-time signals to be queued to a process.  "
6314 "However, Linux does things differently.  In kernels up to and including "
6315 "2.6.7, Linux imposes a system-wide limit on the number of queued real-time "
6316 "signals for all processes.  This limit can be viewed and (with privilege) "
6317 "changed via the I</proc/sys/kernel/rtsig-max> file.  A related file, "
6318 "I</proc/sys/kernel/rtsig-nr>, can be used to find out how many real-time "
6319 "signals are currently queued.  In Linux 2.6.8, these I</proc> interfaces "
6320 "were replaced by the B<RLIMIT_SIGPENDING> resource limit, which specifies a "
6321 "per-user limit for queued signals; see B<setrlimit>(2)  for further details."
6322 msgstr ""
6323
6324 #. type: SS
6325 #: build/C/man7/signal.7:448
6326 #, no-wrap
6327 msgid "Async-signal-safe functions"
6328 msgstr ""
6329
6330 #. type: Plain text
6331 #: build/C/man7/signal.7:457
6332 msgid ""
6333 "A signal handler function must be very careful, since processing elsewhere "
6334 "may be interrupted at some arbitrary point in the execution of the program.  "
6335 "POSIX has the concept of \"safe function\".  If a signal interrupts the "
6336 "execution of an unsafe function, and I<handler> calls an unsafe function, "
6337 "then the behavior of the program is undefined."
6338 msgstr ""
6339
6340 #. type: Plain text
6341 #: build/C/man7/signal.7:461
6342 msgid ""
6343 "POSIX.1-2004 (also known as POSIX.1-2001 Technical Corrigendum 2)  requires "
6344 "an implementation to guarantee that the following functions can be safely "
6345 "called inside a signal handler:"
6346 msgstr ""
6347
6348 #. type: Plain text
6349 #: build/C/man7/signal.7:582
6350 #, no-wrap
6351 msgid ""
6352 "_Exit()\n"
6353 "_exit()\n"
6354 "abort()\n"
6355 "accept()\n"
6356 "access()\n"
6357 "aio_error()\n"
6358 "aio_return()\n"
6359 "aio_suspend()\n"
6360 "alarm()\n"
6361 "bind()\n"
6362 "cfgetispeed()\n"
6363 "cfgetospeed()\n"
6364 "cfsetispeed()\n"
6365 "cfsetospeed()\n"
6366 "chdir()\n"
6367 "chmod()\n"
6368 "chown()\n"
6369 "clock_gettime()\n"
6370 "close()\n"
6371 "connect()\n"
6372 "creat()\n"
6373 "dup()\n"
6374 "dup2()\n"
6375 "execle()\n"
6376 "execve()\n"
6377 "fchmod()\n"
6378 "fchown()\n"
6379 "fcntl()\n"
6380 "fdatasync()\n"
6381 "fork()\n"
6382 "fpathconf()\n"
6383 "fstat()\n"
6384 "fsync()\n"
6385 "ftruncate()\n"
6386 "getegid()\n"
6387 "geteuid()\n"
6388 "getgid()\n"
6389 "getgroups()\n"
6390 "getpeername()\n"
6391 "getpgrp()\n"
6392 "getpid()\n"
6393 "getppid()\n"
6394 "getsockname()\n"
6395 "getsockopt()\n"
6396 "getuid()\n"
6397 "kill()\n"
6398 "link()\n"
6399 "listen()\n"
6400 "lseek()\n"
6401 "lstat()\n"
6402 "mkdir()\n"
6403 "mkfifo()\n"
6404 "open()\n"
6405 "pathconf()\n"
6406 "pause()\n"
6407 "pipe()\n"
6408 "poll()\n"
6409 "posix_trace_event()\n"
6410 "pselect()\n"
6411 "raise()\n"
6412 "read()\n"
6413 "readlink()\n"
6414 "recv()\n"
6415 "recvfrom()\n"
6416 "recvmsg()\n"
6417 "rename()\n"
6418 "rmdir()\n"
6419 "select()\n"
6420 "sem_post()\n"
6421 "send()\n"
6422 "sendmsg()\n"
6423 "sendto()\n"
6424 "setgid()\n"
6425 "setpgid()\n"
6426 "setsid()\n"
6427 "setsockopt()\n"
6428 "setuid()\n"
6429 "shutdown()\n"
6430 "sigaction()\n"
6431 "sigaddset()\n"
6432 "sigdelset()\n"
6433 "sigemptyset()\n"
6434 "sigfillset()\n"
6435 "sigismember()\n"
6436 "signal()\n"
6437 "sigpause()\n"
6438 "sigpending()\n"
6439 "sigprocmask()\n"
6440 "sigqueue()\n"
6441 "sigset()\n"
6442 "sigsuspend()\n"
6443 "sleep()\n"
6444 "sockatmark()\n"
6445 "socket()\n"
6446 "socketpair()\n"
6447 "stat()\n"
6448 "symlink()\n"
6449 "sysconf()\n"
6450 "tcdrain()\n"
6451 "tcflow()\n"
6452 "tcflush()\n"
6453 "tcgetattr()\n"
6454 "tcgetpgrp()\n"
6455 "tcsendbreak()\n"
6456 "tcsetattr()\n"
6457 "tcsetpgrp()\n"
6458 "time()\n"
6459 "timer_getoverrun()\n"
6460 "timer_gettime()\n"
6461 "timer_settime()\n"
6462 "times()\n"
6463 "umask()\n"
6464 "uname()\n"
6465 "unlink()\n"
6466 "utime()\n"
6467 "wait()\n"
6468 "waitpid()\n"
6469 "write()\n"
6470 msgstr ""
6471
6472 #. type: Plain text
6473 #: build/C/man7/signal.7:587
6474 msgid ""
6475 "POSIX.1-2008 removes fpathconf(), pathconf(), and sysconf()  from the above "
6476 "list, and adds the following functions:"
6477 msgstr ""
6478
6479 #. type: Plain text
6480 #: build/C/man7/signal.7:610
6481 #, no-wrap
6482 msgid ""
6483 "execl()\n"
6484 "execv()\n"
6485 "faccessat()\n"
6486 "fchmodat()\n"
6487 "fchownat()\n"
6488 "fexecve()\n"
6489 "fstatat()\n"
6490 "futimens()\n"
6491 "linkat()\n"
6492 "mkdirat()\n"
6493 "mkfifoat()\n"
6494 "mknod()\n"
6495 "mknodat()\n"
6496 "openat()\n"
6497 "readlinkat()\n"
6498 "renameat()\n"
6499 "symlinkat()\n"
6500 "unlinkat()\n"
6501 "utimensat()\n"
6502 "utimes()\n"
6503 msgstr ""
6504
6505 #. type: SS
6506 #: build/C/man7/signal.7:612
6507 #, no-wrap
6508 msgid "Interruption of system calls and library functions by signal handlers"
6509 msgstr ""
6510
6511 #. type: Plain text
6512 #: build/C/man7/signal.7:615
6513 msgid ""
6514 "If a signal handler is invoked while a system call or library function call "
6515 "is blocked, then either:"
6516 msgstr ""
6517
6518 #. type: Plain text
6519 #: build/C/man7/signal.7:617
6520 msgid "the call is automatically restarted after the signal handler returns; or"
6521 msgstr ""
6522
6523 #. type: Plain text
6524 #: build/C/man7/signal.7:620
6525 msgid "the call fails with the error B<EINTR>."
6526 msgstr ""
6527
6528 #. type: Plain text
6529 #: build/C/man7/signal.7:628
6530 msgid ""
6531 "Which of these two behaviors occurs depends on the interface and whether or "
6532 "not the signal handler was established using the B<SA_RESTART> flag (see "
6533 "B<sigaction>(2)).  The details vary across UNIX systems; below, the details "
6534 "for Linux."
6535 msgstr ""
6536
6537 #.  The following system calls use ERESTARTSYS,
6538 #.  so that they are restartable
6539 #. type: Plain text
6540 #: build/C/man7/signal.7:637
6541 msgid ""
6542 "If a blocked call to one of the following interfaces is interrupted by a "
6543 "signal handler, then the call will be automatically restarted after the "
6544 "signal handler returns if the B<SA_RESTART> flag was used; otherwise the "
6545 "call will fail with the error B<EINTR>:"
6546 msgstr ""
6547
6548 #. type: Plain text
6549 #: build/C/man7/signal.7:653
6550 msgid ""
6551 "B<read>(2), B<readv>(2), B<write>(2), B<writev>(2), and B<ioctl>(2)  calls "
6552 "on \"slow\" devices.  A \"slow\" device is one where the I/O call may block "
6553 "for an indefinite time, for example, a terminal, pipe, or socket.  (A disk "
6554 "is not a slow device according to this definition.)  If an I/O call on a "
6555 "slow device has already transferred some data by the time it is interrupted "
6556 "by a signal handler, then the call will return a success status (normally, "
6557 "the number of bytes transferred)."
6558 msgstr ""
6559
6560 #. type: Plain text
6561 #: build/C/man7/signal.7:657
6562 msgid "B<open>(2), if it can block (e.g., when opening a FIFO; see B<fifo>(7))."
6563 msgstr ""
6564
6565 #. type: Plain text
6566 #: build/C/man7/signal.7:664
6567 msgid "B<wait>(2), B<wait3>(2), B<wait4>(2), B<waitid>(2), and B<waitpid>(2)."
6568 msgstr ""
6569
6570 #.  If a timeout (setsockopt()) is in effect on the socket, then these
6571 #.  system calls switch to using EINTR.  Consequently, they and are not
6572 #.  automatically restarted, and they show the stop/cont behavior
6573 #.  described below.  (Verified from 2.6.26 source, and by experiment; mtk)
6574 #. type: Plain text
6575 #: build/C/man7/signal.7:680
6576 msgid ""
6577 "Socket interfaces: B<accept>(2), B<connect>(2), B<recv>(2), B<recvfrom>(2), "
6578 "B<recvmsg>(2), B<send>(2), B<sendto>(2), and B<sendmsg>(2), unless a timeout "
6579 "has been set on the socket (see below)."
6580 msgstr ""
6581
6582 #. type: Plain text
6583 #: build/C/man7/signal.7:686
6584 msgid "File locking interfaces: B<flock>(2)  and B<fcntl>(2)  B<F_SETLKW>."
6585 msgstr ""
6586
6587 #. type: Plain text
6588 #: build/C/man7/signal.7:693
6589 msgid ""
6590 "POSIX message queue interfaces: B<mq_receive>(3), B<mq_timedreceive>(3), "
6591 "B<mq_send>(3), and B<mq_timedsend>(3)."
6592 msgstr ""
6593
6594 #. type: Plain text
6595 #: build/C/man7/signal.7:698
6596 msgid ""
6597 "B<futex>(2)  B<FUTEX_WAIT> (since Linux 2.6.22; beforehand, always failed "
6598 "with B<EINTR>)."
6599 msgstr ""
6600
6601 #. type: Plain text
6602 #: build/C/man7/signal.7:705
6603 msgid ""
6604 "POSIX semaphore interfaces: B<sem_wait>(3)  and B<sem_timedwait>(3)  (since "
6605 "Linux 2.6.22; beforehand, always failed with B<EINTR>)."
6606 msgstr ""
6607
6608 #.  These are the system calls that give EINTR or ERESTARTNOHAND
6609 #.  on interruption by a signal handler.
6610 #. type: Plain text
6611 #: build/C/man7/signal.7:716
6612 msgid ""
6613 "The following interfaces are never restarted after being interrupted by a "
6614 "signal handler, regardless of the use of B<SA_RESTART>; they always fail "
6615 "with the error B<EINTR> when interrupted by a signal handler:"
6616 msgstr ""
6617
6618 #. type: Plain text
6619 #: build/C/man7/signal.7:736 build/C/man7/signal.7:810
6620 msgid ""
6621 "Socket interfaces, when a timeout has been set on the socket using "
6622 "B<setsockopt>(2): B<accept>(2), B<recv>(2), B<recvfrom>(2), and "
6623 "B<recvmsg>(2), if a receive timeout (B<SO_RCVTIMEO>)  has been set; "
6624 "B<connect>(2), B<send>(2), B<sendto>(2), and B<sendmsg>(2), if a send "
6625 "timeout (B<SO_SNDTIMEO>)  has been set."
6626 msgstr ""
6627
6628 #. type: Plain text
6629 #: build/C/man7/signal.7:743
6630 msgid ""
6631 "Interfaces used to wait for signals: B<pause>(2), B<sigsuspend>(2), "
6632 "B<sigtimedwait>(2), and B<sigwaitinfo>(2)."
6633 msgstr ""
6634
6635 #. type: Plain text
6636 #: build/C/man7/signal.7:752
6637 msgid ""
6638 "File descriptor multiplexing interfaces: B<epoll_wait>(2), "
6639 "B<epoll_pwait>(2), B<poll>(2), B<ppoll>(2), B<select>(2), and B<pselect>(2)."
6640 msgstr ""
6641
6642 #.  On some other systems, SA_RESTART does restart these system calls
6643 #. type: Plain text
6644 #: build/C/man7/signal.7:760
6645 msgid ""
6646 "System V IPC interfaces: B<msgrcv>(2), B<msgsnd>(2), B<semop>(2), and "
6647 "B<semtimedop>(2)."
6648 msgstr ""
6649
6650 #. type: Plain text
6651 #: build/C/man7/signal.7:766
6652 msgid "Sleep interfaces: B<clock_nanosleep>(2), B<nanosleep>(2), and B<usleep>(3)."
6653 msgstr ""
6654
6655 #. type: Plain text
6656 #: build/C/man7/signal.7:771 build/C/man7/signal.7:824
6657 msgid "B<read>(2)  from an B<inotify>(7)  file descriptor."
6658 msgstr ""
6659
6660 #. type: Plain text
6661 #: build/C/man7/signal.7:773
6662 msgid "B<io_getevents>(2)."
6663 msgstr ""
6664
6665 #. type: Plain text
6666 #: build/C/man7/signal.7:779
6667 msgid ""
6668 "The B<sleep>(3)  function is also never restarted if interrupted by a "
6669 "handler, but gives a success return: the number of seconds remaining to "
6670 "sleep."
6671 msgstr ""
6672
6673 #. type: SS
6674 #: build/C/man7/signal.7:779
6675 #, no-wrap
6676 msgid "Interruption of system calls and library functions by stop signals"
6677 msgstr ""
6678
6679 #. type: Plain text
6680 #: build/C/man7/signal.7:788
6681 msgid ""
6682 "On Linux, even in the absence of signal handlers, certain blocking "
6683 "interfaces can fail with the error B<EINTR> after the process is stopped by "
6684 "one of the stop signals and then resumed via B<SIGCONT>.  This behavior is "
6685 "not sanctioned by POSIX.1, and doesn't occur on other systems."
6686 msgstr ""
6687
6688 #. type: Plain text
6689 #: build/C/man7/signal.7:790
6690 msgid "The Linux interfaces that display this behavior are:"
6691 msgstr ""
6692
6693 #. type: Plain text
6694 #: build/C/man7/signal.7:813
6695 msgid "B<epoll_wait>(2), B<epoll_pwait>(2)."
6696 msgstr ""
6697
6698 #. type: Plain text
6699 #: build/C/man7/signal.7:816
6700 msgid "B<semop>(2), B<semtimedop>(2)."
6701 msgstr ""
6702
6703 #. type: Plain text
6704 #: build/C/man7/signal.7:819
6705 msgid "B<sigtimedwait>(2), B<sigwaitinfo>(2)."
6706 msgstr ""
6707
6708 #. type: Plain text
6709 #: build/C/man7/signal.7:830
6710 msgid ""
6711 "Linux 2.6.21 and earlier: B<futex>(2)  B<FUTEX_WAIT>, B<sem_timedwait>(3), "
6712 "B<sem_wait>(3)."
6713 msgstr ""
6714
6715 #. type: Plain text
6716 #: build/C/man7/signal.7:834
6717 msgid "Linux 2.6.8 and earlier: B<msgrcv>(2), B<msgsnd>(2)."
6718 msgstr ""
6719
6720 #. type: Plain text
6721 #: build/C/man7/signal.7:837
6722 msgid "Linux 2.4 and earlier: B<nanosleep>(2)."
6723 msgstr ""
6724
6725 #.  It must be a *very* long time since this was true:
6726 #.  .SH BUGS
6727 #.  .B SIGIO
6728 #.  and
6729 #.  .B SIGLOST
6730 #.  have the same value.
6731 #.  The latter is commented out in the kernel source, but
6732 #.  the build process of some software still thinks that
6733 #.  signal 29 is
6734 #.  .BR SIGLOST .
6735 #. type: Plain text
6736 #: build/C/man7/signal.7:850
6737 msgid "POSIX.1, except as noted."
6738 msgstr ""
6739
6740 #. type: Plain text
6741 #: build/C/man7/signal.7:884
6742 msgid ""
6743 "B<kill>(1), B<getrlimit>(2), B<kill>(2), B<killpg>(2), "
6744 "B<restart_syscall>(2), B<rt_sigqueueinfo>(2), B<setitimer>(2), "
6745 "B<setrlimit>(2), B<sgetmask>(2), B<sigaction>(2), B<sigaltstack>(2), "
6746 "B<signal>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), "
6747 "B<sigsuspend>(2), B<sigwaitinfo>(2), B<abort>(3), B<bsd_signal>(3), "
6748 "B<longjmp>(3), B<raise>(3), B<pthread_sigqueue>(3), B<sigqueue>(3), "
6749 "B<sigset>(3), B<sigsetops>(3), B<sigvec>(3), B<sigwait>(3), B<strsignal>(3), "
6750 "B<sysv_signal>(3), B<core>(5), B<proc>(5), B<pthreads>(7), B<sigevent>(7)"
6751 msgstr ""
6752
6753 #. type: TH
6754 #: build/C/man2/signalfd.2:20
6755 #, no-wrap
6756 msgid "SIGNALFD"
6757 msgstr ""
6758
6759 #. type: TH
6760 #: build/C/man2/signalfd.2:20
6761 #, no-wrap
6762 msgid "2009-01-13"
6763 msgstr ""
6764
6765 #. type: Plain text
6766 #: build/C/man2/signalfd.2:23
6767 msgid "signalfd - create a file descriptor for accepting signals"
6768 msgstr ""
6769
6770 #. type: Plain text
6771 #: build/C/man2/signalfd.2:25
6772 msgid "B<#include E<lt>sys/signalfd.hE<gt>>"
6773 msgstr ""
6774
6775 #. type: Plain text
6776 #: build/C/man2/signalfd.2:27
6777 msgid "B<int signalfd(int >I<fd>B<, const sigset_t *>I<mask>B<, int >I<flags>B<);>"
6778 msgstr ""
6779
6780 #. type: Plain text
6781 #: build/C/man2/signalfd.2:38
6782 msgid ""
6783 "B<signalfd>()  creates a file descriptor that can be used to accept signals "
6784 "targeted at the caller.  This provides an alternative to the use of a signal "
6785 "handler or B<sigwaitinfo>(2), and has the advantage that the file descriptor "
6786 "may be monitored by B<select>(2), B<poll>(2), and B<epoll>(7)."
6787 msgstr ""
6788
6789 #. type: Plain text
6790 #: build/C/man2/signalfd.2:58
6791 msgid ""
6792 "The I<mask> argument specifies the set of signals that the caller wishes to "
6793 "accept via the file descriptor.  This argument is a signal set whose "
6794 "contents can be initialized using the macros described in B<sigsetops>(3).  "
6795 "Normally, the set of signals to be received via the file descriptor should "
6796 "be blocked using B<sigprocmask>(2), to prevent the signals being handled "
6797 "according to their default dispositions.  It is not possible to receive "
6798 "B<SIGKILL> or B<SIGSTOP> signals via a signalfd file descriptor; these "
6799 "signals are silently ignored if specified in I<mask>."
6800 msgstr ""
6801
6802 #. type: Plain text
6803 #: build/C/man2/signalfd.2:72
6804 msgid ""
6805 "If the I<fd> argument is -1, then the call creates a new file descriptor and "
6806 "associates the signal set specified in I<mask> with that descriptor.  If "
6807 "I<fd> is not -1, then it must specify a valid existing signalfd file "
6808 "descriptor, and I<mask> is used to replace the signal set associated with "
6809 "that descriptor."
6810 msgstr ""
6811
6812 #. type: Plain text
6813 #: build/C/man2/signalfd.2:77
6814 msgid ""
6815 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
6816 "I<flags> to change the behaviour of B<signalfd>():"
6817 msgstr ""
6818
6819 #. type: TP
6820 #: build/C/man2/signalfd.2:77
6821 #, no-wrap
6822 msgid "B<SFD_NONBLOCK>"
6823 msgstr ""
6824
6825 #. type: TP
6826 #: build/C/man2/signalfd.2:85
6827 #, no-wrap
6828 msgid "B<SFD_CLOEXEC>"
6829 msgstr ""
6830
6831 #. type: Plain text
6832 #: build/C/man2/signalfd.2:102
6833 msgid ""
6834 "B<signalfd>()  returns a file descriptor that supports the following "
6835 "operations:"
6836 msgstr ""
6837
6838 #. type: Plain text
6839 #: build/C/man2/signalfd.2:121
6840 msgid ""
6841 "If one or more of the signals specified in I<mask> is pending for the "
6842 "process, then the buffer supplied to B<read>(2)  is used to return one or "
6843 "more I<signalfd_siginfo> structures (see below) that describe the signals.  "
6844 "The B<read>(2)  returns information for as many signals as are pending and "
6845 "will fit in the supplied buffer.  The buffer must be at least "
6846 "I<sizeof(struct signalfd_siginfo)> bytes.  The return value of the "
6847 "B<read>(2)  is the total number of bytes read."
6848 msgstr ""
6849
6850 #. type: Plain text
6851 #: build/C/man2/signalfd.2:129
6852 msgid ""
6853 "As a consequence of the B<read>(2), the signals are consumed, so that they "
6854 "are no longer pending for the process (i.e., will not be caught by signal "
6855 "handlers, and cannot be accepted using B<sigwaitinfo>(2))."
6856 msgstr ""
6857
6858 #. type: Plain text
6859 #: build/C/man2/signalfd.2:140
6860 msgid ""
6861 "If none of the signals in I<mask> is pending for the process, then the "
6862 "B<read>(2)  either blocks until one of the signals in I<mask> is generated "
6863 "for the process, or fails with the error B<EAGAIN> if the file descriptor "
6864 "has been made nonblocking."
6865 msgstr ""
6866
6867 #. type: Plain text
6868 #: build/C/man2/signalfd.2:153
6869 msgid ""
6870 "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the "
6871 "B<poll>(2)  B<POLLIN> flag)  if one or more of the signals in I<mask> is "
6872 "pending for the process."
6873 msgstr ""
6874
6875 #. type: Plain text
6876 #: build/C/man2/signalfd.2:160
6877 msgid ""
6878 "The signalfd file descriptor also supports the other file-descriptor "
6879 "multiplexing APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
6880 msgstr ""
6881
6882 #. type: Plain text
6883 #: build/C/man2/signalfd.2:165
6884 msgid ""
6885 "When the file descriptor is no longer required it should be closed.  When "
6886 "all file descriptors associated with the same signalfd object have been "
6887 "closed, the resources for object are freed by the kernel."
6888 msgstr ""
6889
6890 #. type: SS
6891 #: build/C/man2/signalfd.2:165
6892 #, no-wrap
6893 msgid "The signalfd_siginfo structure"
6894 msgstr ""
6895
6896 #. type: Plain text
6897 #: build/C/man2/signalfd.2:171
6898 msgid ""
6899 "The format of the I<signalfd_siginfo> structure(s) returned by B<read>(2)s "
6900 "from a signalfd file descriptor is as follows:"
6901 msgstr ""
6902
6903 #.  ssi_trapno is unused on most arches
6904 #.  FIXME Since Linux 2.6.37 there is 'uint16_t ssi_addr_lsb'
6905 #.  which is not yet documented
6906 #. type: Plain text
6907 #: build/C/man2/signalfd.2:198
6908 #, no-wrap
6909 msgid ""
6910 "struct signalfd_siginfo {\n"
6911 "    uint32_t ssi_signo;   /* Signal number */\n"
6912 "    int32_t  ssi_errno;   /* Error number (unused) */\n"
6913 "    int32_t  ssi_code;    /* Signal code */\n"
6914 "    uint32_t ssi_pid;     /* PID of sender */\n"
6915 "    uint32_t ssi_uid;     /* Real UID of sender */\n"
6916 "    int32_t  ssi_fd;      /* File descriptor (SIGIO) */\n"
6917 "    uint32_t ssi_tid;     /* Kernel timer ID (POSIX timers)\n"
6918 "    uint32_t ssi_band;    /* Band event (SIGIO) */\n"
6919 "    uint32_t ssi_overrun; /* POSIX timer overrun count */\n"
6920 "    uint32_t ssi_trapno;  /* Trap number that caused signal */\n"
6921 "    int32_t  ssi_status;  /* Exit status or signal (SIGCHLD) */\n"
6922 "    int32_t  ssi_int;     /* Integer sent by sigqueue(3) */\n"
6923 "    uint64_t ssi_ptr;     /* Pointer sent by sigqueue(3) */\n"
6924 "    uint64_t ssi_utime;   /* User CPU time consumed (SIGCHLD) */\n"
6925 "    uint64_t ssi_stime;   /* System CPU time consumed (SIGCHLD) */\n"
6926 "    uint64_t ssi_addr;    /* Address that generated signal\n"
6927 "                             (for hardware-generated signals) */\n"
6928 "    uint8_t  pad[I<X>];      /* Pad size to 128 bytes (allow for\n"
6929 "                              additional fields in the future) */\n"
6930 "};\n"
6931 msgstr ""
6932
6933 #. type: Plain text
6934 #: build/C/man2/signalfd.2:221
6935 msgid ""
6936 "Each of the fields in this structure is analogous to the similarly named "
6937 "field in the I<siginfo_t> structure.  The I<siginfo_t> structure is "
6938 "described in B<sigaction>(2).  Not all fields in the returned "
6939 "I<signalfd_siginfo> structure will be valid for a specific signal; the set "
6940 "of valid fields can be determined from the value returned in the I<ssi_code> "
6941 "field.  This field is the analog of the I<siginfo_t> I<si_code> field; see "
6942 "B<sigaction>(2)  for details."
6943 msgstr ""
6944
6945 #. type: SS
6946 #: build/C/man2/signalfd.2:221 build/C/man2/timerfd_create.2:269
6947 #, no-wrap
6948 msgid "fork(2) semantics"
6949 msgstr ""
6950
6951 #. type: Plain text
6952 #: build/C/man2/signalfd.2:229
6953 msgid ""
6954 "After a B<fork>(2), the child inherits a copy of the signalfd file "
6955 "descriptor.  A B<read>(2)  from the file descriptor in the child will return "
6956 "information about signals queued to the child."
6957 msgstr ""
6958
6959 #. type: SS
6960 #: build/C/man2/signalfd.2:229 build/C/man2/timerfd_create.2:281
6961 #, no-wrap
6962 msgid "execve(2) semantics"
6963 msgstr ""
6964
6965 #. type: Plain text
6966 #: build/C/man2/signalfd.2:241
6967 msgid ""
6968 "Just like any other file descriptor, a signalfd file descriptor remains open "
6969 "across an B<execve>(2), unless it has been marked for close-on-exec (see "
6970 "B<fcntl>(2)).  Any signals that were available for reading before the "
6971 "B<execve>(2)  remain available to the newly loaded program.  (This is "
6972 "analogous to traditional signal semantics, where a blocked signal that is "
6973 "pending remains pending across an B<execve>(2).)"
6974 msgstr ""
6975
6976 #. type: SS
6977 #: build/C/man2/signalfd.2:241
6978 #, no-wrap
6979 msgid "Thread semantics"
6980 msgstr ""
6981
6982 #. type: Plain text
6983 #: build/C/man2/signalfd.2:251
6984 msgid ""
6985 "The semantics of signalfd file descriptors in a multithreaded program mirror "
6986 "the standard semantics for signals.  In other words, when a thread reads "
6987 "from a signalfd file descriptor, it will read the signals that are directed "
6988 "to the thread itself and the signals that are directed to the process (i.e., "
6989 "the entire thread group).  (A thread will not be able to read signals that "
6990 "are directed to other threads in the process.)"
6991 msgstr ""
6992
6993 #. type: Plain text
6994 #: build/C/man2/signalfd.2:265
6995 msgid ""
6996 "On success, B<signalfd>()  returns a signalfd file descriptor; this is "
6997 "either a new file descriptor (if I<fd> was -1), or I<fd> if I<fd> was a "
6998 "valid signalfd file descriptor.  On error, -1 is returned and I<errno> is "
6999 "set to indicate the error."
7000 msgstr ""
7001
7002 #. type: Plain text
7003 #: build/C/man2/signalfd.2:271
7004 msgid "The I<fd> file descriptor is not a valid file descriptor."
7005 msgstr ""
7006
7007 #.  or, the
7008 #.  .I sizemask
7009 #.  argument is not equal to
7010 #.  .IR sizeof(sigset_t) ;
7011 #. type: Plain text
7012 #: build/C/man2/signalfd.2:279
7013 msgid "I<fd> is not a valid signalfd file descriptor."
7014 msgstr ""
7015
7016 #. type: Plain text
7017 #: build/C/man2/signalfd.2:286 build/C/man2/timerfd_create.2:320
7018 msgid "I<flags> is invalid; or, in Linux 2.6.26 or earlier, I<flags> is nonzero."
7019 msgstr ""
7020
7021 #. type: Plain text
7022 #: build/C/man2/signalfd.2:289 build/C/man2/timerfd_create.2:323
7023 msgid "The per-process limit of open file descriptors has been reached."
7024 msgstr ""
7025
7026 #. type: Plain text
7027 #: build/C/man2/signalfd.2:299
7028 msgid "There was insufficient memory to create a new signalfd file descriptor."
7029 msgstr ""
7030
7031 #.  signalfd() is in glibc 2.7, but reportedly does not build
7032 #. type: Plain text
7033 #: build/C/man2/signalfd.2:307
7034 msgid ""
7035 "B<signalfd>()  is available on Linux since kernel 2.6.22.  Working support "
7036 "is provided in glibc since version 2.8.  The B<signalfd4>()  system call "
7037 "(see NOTES) is available on Linux since kernel 2.6.27."
7038 msgstr ""
7039
7040 #. type: Plain text
7041 #: build/C/man2/signalfd.2:312
7042 msgid "B<signalfd>()  and B<signalfd4>()  are Linux-specific."
7043 msgstr ""
7044
7045 #. type: Plain text
7046 #: build/C/man2/signalfd.2:322
7047 msgid ""
7048 "The underlying Linux system call requires an additional argument, I<size_t "
7049 "sizemask>, which specifies the size of the I<mask> argument.  The glibc "
7050 "B<signalfd>()  wrapper function does not include this argument, since it "
7051 "provides the required value for the underlying system call."
7052 msgstr ""
7053
7054 #. type: Plain text
7055 #: build/C/man2/signalfd.2:336
7056 msgid ""
7057 "A process can create multiple signalfd file descriptors.  This makes it "
7058 "possible to accept different signals on different file descriptors.  (This "
7059 "may be useful if monitoring the file descriptors using B<select>(2), "
7060 "B<poll>(2), or B<epoll>(7): the arrival of different signals will make "
7061 "different descriptors ready.)  If a signal appears in the I<mask> of more "
7062 "than one of the file descriptors, then occurrences of that signal can be "
7063 "read (once) from any one of the descriptors."
7064 msgstr ""
7065
7066 #. type: Plain text
7067 #: build/C/man2/signalfd.2:352
7068 msgid ""
7069 "There are two underlying Linux system calls: B<signalfd>()  and the more "
7070 "recent B<signalfd4>().  The former system call does not implement a I<flags> "
7071 "argument.  The latter system call implements the I<flags> values described "
7072 "above.  Starting with glibc 2.9, the B<signalfd>()  wrapper function will "
7073 "use B<signalfd4>()  where it is available."
7074 msgstr ""
7075
7076 #.  The fix also was put into 2.6.24.5
7077 #. type: Plain text
7078 #: build/C/man2/signalfd.2:360
7079 msgid ""
7080 "In kernels before 2.6.25, the I<ssi_ptr> and I<ssi_int> fields are not "
7081 "filled in with the data accompanying a signal sent by B<sigqueue>(3)."
7082 msgstr ""
7083
7084 #. type: Plain text
7085 #: build/C/man2/signalfd.2:370
7086 msgid ""
7087 "The program below accepts the signals B<SIGINT> and B<SIGQUIT> via a "
7088 "signalfd file descriptor.  The program terminates after accepting a "
7089 "B<SIGQUIT> signal.  The following shell session demonstrates the use of the "
7090 "program:"
7091 msgstr ""
7092
7093 #. type: Plain text
7094 #: build/C/man2/signalfd.2:381
7095 #, no-wrap
7096 msgid ""
7097 "$B< ./signalfd_demo>\n"
7098 "B<^C>                   # Control-C generates SIGINT\n"
7099 "Got SIGINT\n"
7100 "B<^C>\n"
7101 "Got SIGINT\n"
7102 "B<^\\e>                    # Control-\\e generates SIGQUIT\n"
7103 "Got SIGQUIT\n"
7104 "$\n"
7105 msgstr ""
7106
7107 #. type: Plain text
7108 #: build/C/man2/signalfd.2:391
7109 #, no-wrap
7110 msgid ""
7111 "#include E<lt>sys/signalfd.hE<gt>\n"
7112 "#include E<lt>signal.hE<gt>\n"
7113 "#include E<lt>unistd.hE<gt>\n"
7114 "#include E<lt>stdlib.hE<gt>\n"
7115 "#include E<lt>stdio.hE<gt>\n"
7116 msgstr ""
7117
7118 #. type: Plain text
7119 #: build/C/man2/signalfd.2:402
7120 #, no-wrap
7121 msgid ""
7122 "int\n"
7123 "main(int argc, char *argv[])\n"
7124 "{\n"
7125 "    sigset_t mask;\n"
7126 "    int sfd;\n"
7127 "    struct signalfd_siginfo fdsi;\n"
7128 "    ssize_t s;\n"
7129 msgstr ""
7130
7131 #. type: Plain text
7132 #: build/C/man2/signalfd.2:406
7133 #, no-wrap
7134 msgid ""
7135 "    sigemptyset(&mask);\n"
7136 "    sigaddset(&mask, SIGINT);\n"
7137 "    sigaddset(&mask, SIGQUIT);\n"
7138 msgstr ""
7139
7140 #. type: Plain text
7141 #: build/C/man2/signalfd.2:409
7142 #, no-wrap
7143 msgid ""
7144 "    /* Block signals so that they aren\\(aqt handled\n"
7145 "       according to their default dispositions */\n"
7146 msgstr ""
7147
7148 #. type: Plain text
7149 #: build/C/man2/signalfd.2:412
7150 #, no-wrap
7151 msgid ""
7152 "    if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n"
7153 "        handle_error(\"sigprocmask\");\n"
7154 msgstr ""
7155
7156 #. type: Plain text
7157 #: build/C/man2/signalfd.2:416
7158 #, no-wrap
7159 msgid ""
7160 "    sfd = signalfd(-1, &mask, 0);\n"
7161 "    if (sfd == -1)\n"
7162 "        handle_error(\"signalfd\");\n"
7163 msgstr ""
7164
7165 #. type: Plain text
7166 #: build/C/man2/signalfd.2:421
7167 #, no-wrap
7168 msgid ""
7169 "    for (;;) {\n"
7170 "        s = read(sfd, &fdsi, sizeof(struct signalfd_siginfo));\n"
7171 "        if (s != sizeof(struct signalfd_siginfo))\n"
7172 "            handle_error(\"read\");\n"
7173 msgstr ""
7174
7175 #. type: Plain text
7176 #: build/C/man2/signalfd.2:432
7177 #, no-wrap
7178 msgid ""
7179 "        if (fdsi.ssi_signo == SIGINT) {\n"
7180 "            printf(\"Got SIGINT\\en\");\n"
7181 "        } else if (fdsi.ssi_signo == SIGQUIT) {\n"
7182 "            printf(\"Got SIGQUIT\\en\");\n"
7183 "            exit(EXIT_SUCCESS);\n"
7184 "        } else {\n"
7185 "            printf(\"Read unexpected signal\\en\");\n"
7186 "        }\n"
7187 "    }\n"
7188 "}\n"
7189 msgstr ""
7190
7191 #. type: Plain text
7192 #: build/C/man2/signalfd.2:446
7193 msgid ""
7194 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<sigaction>(2), "
7195 "B<sigprocmask>(2), B<sigwaitinfo>(2), B<timerfd_create>(2), B<sigsetops>(3), "
7196 "B<sigwait>(3), B<epoll>(7), B<signal>(7)"
7197 msgstr ""
7198
7199 #. type: TH
7200 #: build/C/man3/sigpause.3:25
7201 #, no-wrap
7202 msgid "SIGPAUSE"
7203 msgstr ""
7204
7205 #. type: TH
7206 #: build/C/man3/sigpause.3:25
7207 #, no-wrap
7208 msgid "2014-01-07"
7209 msgstr ""
7210
7211 #. type: Plain text
7212 #: build/C/man3/sigpause.3:28
7213 msgid "sigpause - atomically release blocked signals and wait for interrupt"
7214 msgstr ""
7215
7216 #. type: Plain text
7217 #: build/C/man3/sigpause.3:33
7218 #, no-wrap
7219 msgid "B<int sigpause(int >I<sigmask>B<);  /* BSD (but see NOTES) */>\n"
7220 msgstr ""
7221
7222 #. type: Plain text
7223 #: build/C/man3/sigpause.3:35
7224 #, no-wrap
7225 msgid "B<int sigpause(int >I<sig>B<);      /* System V / UNIX 95 */>\n"
7226 msgstr ""
7227
7228 #. type: Plain text
7229 #: build/C/man3/sigpause.3:41
7230 msgid "Don't use this function.  Use B<sigsuspend>(2)  instead."
7231 msgstr ""
7232
7233 #. type: Plain text
7234 #: build/C/man3/sigpause.3:48
7235 msgid ""
7236 "The function B<sigpause>()  is designed to wait for some signal.  It changes "
7237 "the process's signal mask (set of blocked signals), and then waits for a "
7238 "signal to arrive.  Upon arrival of a signal, the original signal mask is "
7239 "restored."
7240 msgstr ""
7241
7242 #. type: Plain text
7243 #: build/C/man3/sigpause.3:56
7244 msgid ""
7245 "If B<sigpause>()  returns, it was interrupted by a signal and the return "
7246 "value is -1 with I<errno> set to B<EINTR>."
7247 msgstr ""
7248
7249 #. type: Plain text
7250 #: build/C/man3/sigpause.3:61
7251 msgid "The B<sigpause>()  function is thread-safe."
7252 msgstr ""
7253
7254 #. type: Plain text
7255 #: build/C/man3/sigpause.3:65
7256 msgid "The System V version of B<sigpause>()  is standardized in POSIX.1-2001."
7257 msgstr ""
7258
7259 #.  __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG
7260 #. type: Plain text
7261 #: build/C/man3/sigpause.3:82
7262 msgid ""
7263 "The classical BSD version of this function appeared in 4.2BSD.  It sets the "
7264 "process's signal mask to I<sigmask>.  UNIX 95 standardized the incompatible "
7265 "System V version of this function, which removes only the specified signal "
7266 "I<sig> from the process's signal mask.  The unfortunate situation with two "
7267 "incompatible functions with the same name was solved by the "
7268 "B<\\%sigsuspend>(2)  function, that takes a I<sigset_t\\ *> argument "
7269 "(instead of an I<int>)."
7270 msgstr ""
7271
7272 #. type: Plain text
7273 #: build/C/man3/sigpause.3:85
7274 msgid ""
7275 "On Linux, this routine is a system call only on the Sparc (sparc64)  "
7276 "architecture."
7277 msgstr ""
7278
7279 #. type: Plain text
7280 #: build/C/man3/sigpause.3:87
7281 msgid "Libc4 and libc5 know only about the BSD version."
7282 msgstr ""
7283
7284 #
7285 #.  For the BSD version, one usually uses a zero
7286 #.  .I sigmask
7287 #.  to indicate that no signals are to be blocked.
7288 #. type: Plain text
7289 #: build/C/man3/sigpause.3:111
7290 msgid ""
7291 "Glibc uses the BSD version if the B<_BSD_SOURCE> feature test macro is "
7292 "defined and none of B<_POSIX_SOURCE>, B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, "
7293 "B<_GNU_SOURCE>, or B<_SVID_SOURCE> is defined.  Otherwise, the System V "
7294 "version is used (and B<_XOPEN_SOURCE> must be defined to obtain the "
7295 "declaration).  Since glibc 2.19, only the System V version is exposed by "
7296 "I<E<lt>signal.hE<gt>>; applications that formerly used the BSD B<sigpause>()  "
7297 "should be amended to use B<sigsuspend>(2)."
7298 msgstr ""
7299
7300 #. type: Plain text
7301 #: build/C/man3/sigpause.3:119
7302 msgid ""
7303 "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<sigsuspend>(2), "
7304 "B<sigblock>(3), B<sigvec>(3), B<feature_test_macros>(7)"
7305 msgstr ""
7306
7307 #. type: TH
7308 #: build/C/man2/sigpending.2:29
7309 #, no-wrap
7310 msgid "SIGPENDING"
7311 msgstr ""
7312
7313 #. type: TH
7314 #: build/C/man2/sigpending.2:29
7315 #, no-wrap
7316 msgid "2013-12-11"
7317 msgstr ""
7318
7319 #. type: Plain text
7320 #: build/C/man2/sigpending.2:32
7321 msgid "sigpending - examine pending signals"
7322 msgstr ""
7323
7324 #. type: Plain text
7325 #: build/C/man2/sigpending.2:36
7326 msgid "B<int sigpending(sigset_t *>I<set>B<);>"
7327 msgstr ""
7328
7329 #. type: Plain text
7330 #: build/C/man2/sigpending.2:45
7331 msgid ""
7332 "B<sigpending>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
7333 "_POSIX_SOURCE"
7334 msgstr ""
7335
7336 #. type: Plain text
7337 #: build/C/man2/sigpending.2:53
7338 msgid ""
7339 "B<sigpending>()  returns the set of signals that are pending for delivery to "
7340 "the calling thread (i.e., the signals which have been raised while "
7341 "blocked).  The mask of pending signals is returned in I<set>."
7342 msgstr ""
7343
7344 #. type: Plain text
7345 #: build/C/man2/sigpending.2:59
7346 msgid ""
7347 "B<sigpending>()  returns 0 on success and -1 on error.  In the event of an "
7348 "error, I<errno> is set to indicate the cause."
7349 msgstr ""
7350
7351 #. type: Plain text
7352 #: build/C/man2/sigpending.2:64
7353 msgid ""
7354 "I<set> points to memory which is not a valid part of the process address "
7355 "space."
7356 msgstr ""
7357
7358 #. type: Plain text
7359 #: build/C/man2/sigpending.2:74
7360 msgid ""
7361 "If a signal is both blocked and has a disposition of \"ignored\", it is "
7362 "I<not> added to the mask of pending signals when generated."
7363 msgstr ""
7364
7365 #. type: Plain text
7366 #: build/C/man2/sigpending.2:79
7367 msgid ""
7368 "The set of signals that is pending for a thread is the union of the set of "
7369 "signals that is pending for that thread and the set of signals that is "
7370 "pending for the process as a whole; see B<signal>(7)."
7371 msgstr ""
7372
7373 #. type: Plain text
7374 #: build/C/man2/sigpending.2:91
7375 msgid ""
7376 "In versions of glibc up to and including 2.2.1, there is a bug in the "
7377 "wrapper function for B<sigpending>()  which means that information about "
7378 "pending real-time signals is not correctly returned."
7379 msgstr ""
7380
7381 #. type: Plain text
7382 #: build/C/man2/sigpending.2:99
7383 msgid ""
7384 "B<kill>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
7385 "B<sigsuspend>(2), B<sigsetops>(3), B<signal>(7)"
7386 msgstr ""
7387
7388 #. type: TH
7389 #: build/C/man2/sigprocmask.2:29
7390 #, no-wrap
7391 msgid "SIGPROCMASK"
7392 msgstr ""
7393
7394 #. type: Plain text
7395 #: build/C/man2/sigprocmask.2:32
7396 msgid "sigprocmask - examine and change blocked signals"
7397 msgstr ""
7398
7399 #. type: Plain text
7400 #: build/C/man2/sigprocmask.2:37
7401 msgid ""
7402 "B<int sigprocmask(int >I<how>B<, const sigset_t *>I<set>B<,> B<sigset_t "
7403 "*>I<oldset>B<);>"
7404 msgstr ""
7405
7406 #. type: Plain text
7407 #: build/C/man2/sigprocmask.2:46
7408 msgid ""
7409 "B<sigprocmask>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
7410 "_POSIX_SOURCE"
7411 msgstr ""
7412
7413 #. type: Plain text
7414 #: build/C/man2/sigprocmask.2:55
7415 msgid ""
7416 "B<sigprocmask>()  is used to fetch and/or change the signal mask of the "
7417 "calling thread.  The signal mask is the set of signals whose delivery is "
7418 "currently blocked for the caller (see also B<signal>(7)  for more details)."
7419 msgstr ""
7420
7421 #. type: Plain text
7422 #: build/C/man2/sigprocmask.2:59
7423 msgid "The behavior of the call is dependent on the value of I<how>, as follows."
7424 msgstr ""
7425
7426 #. type: TP
7427 #: build/C/man2/sigprocmask.2:59
7428 #, no-wrap
7429 msgid "B<SIG_BLOCK>"
7430 msgstr ""
7431
7432 #. type: Plain text
7433 #: build/C/man2/sigprocmask.2:64
7434 msgid ""
7435 "The set of blocked signals is the union of the current set and the I<set> "
7436 "argument."
7437 msgstr ""
7438
7439 #. type: TP
7440 #: build/C/man2/sigprocmask.2:64
7441 #, no-wrap
7442 msgid "B<SIG_UNBLOCK>"
7443 msgstr ""
7444
7445 #. type: Plain text
7446 #: build/C/man2/sigprocmask.2:70
7447 msgid ""
7448 "The signals in I<set> are removed from the current set of blocked signals.  "
7449 "It is permissible to attempt to unblock a signal which is not blocked."
7450 msgstr ""
7451
7452 #. type: TP
7453 #: build/C/man2/sigprocmask.2:70
7454 #, no-wrap
7455 msgid "B<SIG_SETMASK>"
7456 msgstr ""
7457
7458 #. type: Plain text
7459 #: build/C/man2/sigprocmask.2:74
7460 msgid "The set of blocked signals is set to the argument I<set>."
7461 msgstr ""
7462
7463 #. type: Plain text
7464 #: build/C/man2/sigprocmask.2:79
7465 msgid ""
7466 "If I<oldset> is non-NULL, the previous value of the signal mask is stored in "
7467 "I<oldset>."
7468 msgstr ""
7469
7470 #. type: Plain text
7471 #: build/C/man2/sigprocmask.2:88
7472 msgid ""
7473 "If I<set> is NULL, then the signal mask is unchanged (i.e., I<how> is "
7474 "ignored), but the current value of the signal mask is nevertheless returned "
7475 "in I<oldset> (if it is not NULL)."
7476 msgstr ""
7477
7478 #. type: Plain text
7479 #: build/C/man2/sigprocmask.2:93
7480 msgid ""
7481 "The use of B<sigprocmask>()  is unspecified in a multithreaded process; see "
7482 "B<pthread_sigmask>(3)."
7483 msgstr ""
7484
7485 #. type: Plain text
7486 #: build/C/man2/sigprocmask.2:99
7487 msgid ""
7488 "B<sigprocmask>()  returns 0 on success and -1 on error.  In the event of an "
7489 "error, I<errno> is set to indicate the cause."
7490 msgstr ""
7491
7492 #. type: Plain text
7493 #: build/C/man2/sigprocmask.2:107
7494 msgid ""
7495 "the I<set> or I<oldset> argument points outside the process's allocated "
7496 "address space."
7497 msgstr ""
7498
7499 #. type: Plain text
7500 #: build/C/man2/sigprocmask.2:112
7501 msgid "The value specified in I<how> was invalid."
7502 msgstr ""
7503
7504 #. type: Plain text
7505 #: build/C/man2/sigprocmask.2:118
7506 msgid ""
7507 "It is not possible to block B<SIGKILL> or B<SIGSTOP>.  Attempts to do so are "
7508 "silently ignored."
7509 msgstr ""
7510
7511 #. type: Plain text
7512 #: build/C/man2/sigprocmask.2:120
7513 msgid "Each of the threads in a process has its own signal mask."
7514 msgstr ""
7515
7516 #. type: Plain text
7517 #: build/C/man2/sigprocmask.2:140
7518 msgid ""
7519 "If B<SIGBUS>, B<SIGFPE>, B<SIGILL>, or B<SIGSEGV> are generated while they "
7520 "are blocked, the result is undefined, unless the signal was generated by "
7521 "B<kill>(2), B<sigqueue>(3), or B<raise>(3)."
7522 msgstr ""
7523
7524 #. type: Plain text
7525 #: build/C/man2/sigprocmask.2:155
7526 msgid ""
7527 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigpending>(2), "
7528 "B<sigsuspend>(2), B<pthread_sigmask>(3), B<sigqueue>(3), B<sigsetops>(3), "
7529 "B<signal>(7)"
7530 msgstr ""
7531
7532 #. type: TH
7533 #: build/C/man3/sigqueue.3:28
7534 #, no-wrap
7535 msgid "SIGQUEUE"
7536 msgstr ""
7537
7538 #. type: TH
7539 #: build/C/man3/sigqueue.3:28 build/C/man3/sigwait.3:26
7540 #, no-wrap
7541 msgid "2013-12-16"
7542 msgstr ""
7543
7544 #. type: Plain text
7545 #: build/C/man3/sigqueue.3:31
7546 msgid "sigqueue - queue a signal and data to a process"
7547 msgstr ""
7548
7549 #. type: Plain text
7550 #: build/C/man3/sigqueue.3:35
7551 msgid ""
7552 "B<int sigqueue(pid_t >I<pid>B<, int >I<sig>B<, const union sigval "
7553 ">I<value>B<);>"
7554 msgstr ""
7555
7556 #. type: Plain text
7557 #: build/C/man3/sigqueue.3:43
7558 msgid "B<sigqueue>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
7559 msgstr ""
7560
7561 #. type: Plain text
7562 #: build/C/man3/sigqueue.3:55
7563 msgid ""
7564 "B<sigqueue>()  sends the signal specified in I<sig> to the process whose PID "
7565 "is given in I<pid>.  The permissions required to send a signal are the same "
7566 "as for B<kill>(2).  As with B<kill>(2), the null signal (0) can be used to "
7567 "check if a process with a given PID exists."
7568 msgstr ""
7569
7570 #. type: Plain text
7571 #: build/C/man3/sigqueue.3:60
7572 msgid ""
7573 "The I<value> argument is used to specify an accompanying item of data "
7574 "(either an integer or a pointer value) to be sent with the signal, and has "
7575 "the following type:"
7576 msgstr ""
7577
7578 #. type: Plain text
7579 #: build/C/man3/sigqueue.3:67
7580 #, no-wrap
7581 msgid ""
7582 "union sigval {\n"
7583 "    int   sival_int;\n"
7584 "    void *sival_ptr;\n"
7585 "};\n"
7586 msgstr ""
7587
7588 #. type: Plain text
7589 #: build/C/man3/sigqueue.3:83
7590 msgid ""
7591 "If the receiving process has installed a handler for this signal using the "
7592 "B<SA_SIGINFO> flag to B<sigaction>(2), then it can obtain this data via the "
7593 "I<si_value> field of the I<siginfo_t> structure passed as the second "
7594 "argument to the handler.  Furthermore, the I<si_code> field of that "
7595 "structure will be set to B<SI_QUEUE>."
7596 msgstr ""
7597
7598 #. type: Plain text
7599 #: build/C/man3/sigqueue.3:91
7600 msgid ""
7601 "On success, B<sigqueue>()  returns 0, indicating that the signal was "
7602 "successfully queued to the receiving process.  Otherwise, -1 is returned and "
7603 "I<errno> is set to indicate the error."
7604 msgstr ""
7605
7606 #. type: Plain text
7607 #: build/C/man3/sigqueue.3:102
7608 msgid "I<sig> was invalid."
7609 msgstr ""
7610
7611 #. type: Plain text
7612 #: build/C/man3/sigqueue.3:108
7613 msgid ""
7614 "The process does not have permission to send the signal to the receiving "
7615 "process.  For the required permissions, see B<kill>(2)."
7616 msgstr ""
7617
7618 #. type: Plain text
7619 #: build/C/man3/sigqueue.3:112
7620 msgid "No process has a PID matching I<pid>."
7621 msgstr ""
7622
7623 #. type: Plain text
7624 #: build/C/man3/sigqueue.3:114
7625 msgid "This system call first appeared in Linux 2.2."
7626 msgstr ""
7627
7628 #. type: Plain text
7629 #: build/C/man3/sigqueue.3:119
7630 msgid "The B<sigqueue>()  function is thread-safe."
7631 msgstr ""
7632
7633 #. type: Plain text
7634 #: build/C/man3/sigqueue.3:129
7635 msgid ""
7636 "If this function results in the sending of a signal to the process that "
7637 "invoked it, and that signal was not blocked by the calling thread, and no "
7638 "other threads were willing to handle this signal (either by having it "
7639 "unblocked, or by waiting for it using B<sigwait>(3)), then at least some "
7640 "signal must be delivered to this thread before this function returns."
7641 msgstr ""
7642
7643 #. type: Plain text
7644 #: build/C/man3/sigqueue.3:144
7645 msgid ""
7646 "On Linux, this function is implemented using the B<rt_sigqueueinfo>(2)  "
7647 "system call.  The system call differs in its third argument, which is the "
7648 "I<siginfo_t> structure that will be supplied to the receiving process's "
7649 "signal handler or returned by the receiving process's B<sigtimedwait>(2)  "
7650 "call.  Inside the glibc B<sigqueue>()  wrapper, this argument, I<uinfo>, is "
7651 "initialized as follows:"
7652 msgstr ""
7653
7654 #. type: Plain text
7655 #: build/C/man3/sigqueue.3:152
7656 #, no-wrap
7657 msgid ""
7658 "uinfo.si_signo = sig;      /* Argument supplied to sigqueue() */\n"
7659 "uinfo.si_code = SI_QUEUE;\n"
7660 "uinfo.si_pid = getpid();   /* Process ID of sender */\n"
7661 "uinfo.si_uid = getuid();   /* Real UID of sender */\n"
7662 "uinfo.si_value = val;      /* Argument supplied to sigqueue() */\n"
7663 msgstr ""
7664
7665 #. type: Plain text
7666 #: build/C/man3/sigqueue.3:162
7667 msgid ""
7668 "B<kill>(2), B<rt_sigqueueinfo>(2), B<sigaction>(2), B<signal>(2), "
7669 "B<pthread_sigqueue>(3), B<sigwait>(3), B<signal>(7)"
7670 msgstr ""
7671
7672 #. type: TH
7673 #: build/C/man2/sigreturn.2:29
7674 #, no-wrap
7675 msgid "SIGRETURN"
7676 msgstr ""
7677
7678 #. type: Plain text
7679 #: build/C/man2/sigreturn.2:32
7680 msgid "sigreturn - return from signal handler and cleanup stack frame"
7681 msgstr ""
7682
7683 #. type: Plain text
7684 #: build/C/man2/sigreturn.2:34
7685 msgid "B<int sigreturn(unsigned long >I<__unused>B<);>"
7686 msgstr ""
7687
7688 #. type: Plain text
7689 #: build/C/man2/sigreturn.2:42
7690 msgid ""
7691 "When the Linux kernel creates the stack frame for a signal handler, a call "
7692 "to B<sigreturn>()  is inserted into the stack frame so that upon return from "
7693 "the signal handler, B<sigreturn>()  will be called."
7694 msgstr ""
7695
7696 #. type: Plain text
7697 #: build/C/man2/sigreturn.2:53
7698 msgid ""
7699 "This B<sigreturn>()  call undoes everything that was done\\(emchanging the "
7700 "process's signal mask, switching stacks (see B<sigaltstack>(2))\\(emin order "
7701 "to invoke the signal handler: it restores the process's signal mask, "
7702 "switches stacks, and restores the process's context (registers, processor "
7703 "flags), so that the process directly resumes execution at the point where it "
7704 "was interrupted by the signal."
7705 msgstr ""
7706
7707 #. type: Plain text
7708 #: build/C/man2/sigreturn.2:56
7709 msgid "B<sigreturn>()  never returns."
7710 msgstr ""
7711
7712 #. type: SH
7713 #: build/C/man2/sigreturn.2:56
7714 #, no-wrap
7715 msgid "FILES"
7716 msgstr ""
7717
7718 #. type: Plain text
7719 #: build/C/man2/sigreturn.2:58
7720 msgid "/usr/src/linux/arch/i386/kernel/signal.c"
7721 msgstr ""
7722
7723 #. type: Plain text
7724 #: build/C/man2/sigreturn.2:60
7725 msgid "/usr/src/linux/arch/alpha/kernel/entry.S"
7726 msgstr ""
7727
7728 #. type: Plain text
7729 #: build/C/man2/sigreturn.2:64
7730 msgid ""
7731 "B<sigreturn>()  is specific to Linux and should not be used in programs "
7732 "intended to be portable."
7733 msgstr ""
7734
7735 #. type: Plain text
7736 #: build/C/man2/sigreturn.2:74
7737 msgid ""
7738 "The B<sigreturn>()  call is used by the kernel to implement signal "
7739 "handlers.  It should B<never> be called directly.  Better yet, the specific "
7740 "use of the I<__unused> argument varies depending on the architecture."
7741 msgstr ""
7742
7743 #. type: Plain text
7744 #: build/C/man2/sigreturn.2:80
7745 msgid ""
7746 "B<kill>(2), B<restart_syscall>(2), B<sigaltstack>(2), B<signal>(2), "
7747 "B<signal>(7)"
7748 msgstr ""
7749
7750 #. type: TH
7751 #: build/C/man3/sigset.3:26
7752 #, no-wrap
7753 msgid "SIGSET"
7754 msgstr ""
7755
7756 #. type: Plain text
7757 #: build/C/man3/sigset.3:29
7758 msgid "sigset, sighold, sigrelse, sigignore - System V signal API"
7759 msgstr ""
7760
7761 #. type: Plain text
7762 #: build/C/man3/sigset.3:35
7763 msgid "B<sighandler_t sigset(int >I<sig>B<, sighandler_t >I<disp>B<);>"
7764 msgstr ""
7765
7766 #. type: Plain text
7767 #: build/C/man3/sigset.3:37
7768 msgid "B<int sighold(int >I<sig>B<);>"
7769 msgstr ""
7770
7771 #. type: Plain text
7772 #: build/C/man3/sigset.3:39
7773 msgid "B<int sigrelse(int >I<sig>B<);>"
7774 msgstr ""
7775
7776 #. type: Plain text
7777 #: build/C/man3/sigset.3:41
7778 msgid "B<int sigignore(int >I<sig>B<);>"
7779 msgstr ""
7780
7781 #. type: Plain text
7782 #: build/C/man3/sigset.3:52
7783 msgid "B<sigset>(), B<sighold>(), B<sigrelse>(), B<sigignore>():"
7784 msgstr ""
7785
7786 #. type: Plain text
7787 #: build/C/man3/sigset.3:56
7788 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
7789 msgstr ""
7790
7791 #. type: Plain text
7792 #: build/C/man3/sigset.3:65
7793 msgid ""
7794 "These functions are provided in glibc as a compatibility interface for "
7795 "programs that make use of the historical System V signal API.  This API is "
7796 "obsolete: new applications should use the POSIX signal API (B<sigaction>(2), "
7797 "B<sigprocmask>(2), etc.)"
7798 msgstr ""
7799
7800 #. type: Plain text
7801 #: build/C/man3/sigset.3:74
7802 msgid ""
7803 "The B<sigset>()  function modifies the disposition of the signal I<sig>.  "
7804 "The I<disp> argument can be the address of a signal handler function, or one "
7805 "of the following constants:"
7806 msgstr ""
7807
7808 #. type: TP
7809 #: build/C/man3/sigset.3:74
7810 #, no-wrap
7811 msgid "B<SIG_DFL>"
7812 msgstr ""
7813
7814 #. type: Plain text
7815 #: build/C/man3/sigset.3:79
7816 msgid "Reset the disposition of I<sig> to the default."
7817 msgstr ""
7818
7819 #. type: TP
7820 #: build/C/man3/sigset.3:79
7821 #, no-wrap
7822 msgid "B<SIG_IGN>"
7823 msgstr ""
7824
7825 #. type: Plain text
7826 #: build/C/man3/sigset.3:83
7827 msgid "Ignore I<sig>."
7828 msgstr ""
7829
7830 #. type: TP
7831 #: build/C/man3/sigset.3:83
7832 #, no-wrap
7833 msgid "B<SIG_HOLD>"
7834 msgstr ""
7835
7836 #. type: Plain text
7837 #: build/C/man3/sigset.3:90
7838 msgid ""
7839 "Add I<sig> to the process's signal mask, but leave the disposition of I<sig> "
7840 "unchanged."
7841 msgstr ""
7842
7843 #. type: Plain text
7844 #: build/C/man3/sigset.3:96
7845 msgid ""
7846 "If I<disp> specifies the address of a signal handler, then I<sig> is added "
7847 "to the process's signal mask during execution of the handler."
7848 msgstr ""
7849
7850 #. type: Plain text
7851 #: build/C/man3/sigset.3:104
7852 msgid ""
7853 "If I<disp> was specified as a value other than B<SIG_HOLD>, then I<sig> is "
7854 "removed from the process's signal mask."
7855 msgstr ""
7856
7857 #. type: Plain text
7858 #: build/C/man3/sigset.3:110 build/C/man3/sigvec.3:87
7859 msgid "The dispositions for B<SIGKILL> and B<SIGSTOP> cannot be changed."
7860 msgstr ""
7861
7862 #. type: Plain text
7863 #: build/C/man3/sigset.3:116
7864 msgid "The B<sighold>()  function adds I<sig> to the calling process's signal mask."
7865 msgstr ""
7866
7867 #. type: Plain text
7868 #: build/C/man3/sigset.3:122
7869 msgid ""
7870 "The B<sigrelse>()  function removes I<sig> from the calling process's signal "
7871 "mask."
7872 msgstr ""
7873
7874 #. type: Plain text
7875 #: build/C/man3/sigset.3:129
7876 msgid "The B<sigignore>()  function sets the disposition of I<sig> to B<SIG_IGN>."
7877 msgstr ""
7878
7879 #. type: Plain text
7880 #: build/C/man3/sigset.3:145
7881 msgid ""
7882 "On success, B<sigset>()  returns B<SIG_HOLD> if I<sig> was blocked before "
7883 "the call, or the signal's previous disposition if it was not blocked before "
7884 "the call.  On error, B<sigset>()  returns -1, with I<errno> set to indicate "
7885 "the error.  (But see BUGS below.)"
7886 msgstr ""
7887
7888 #. type: Plain text
7889 #: build/C/man3/sigset.3:154
7890 msgid ""
7891 "The B<sighold>(), B<sigrelse>(), and B<sigignore>()  functions return 0 on "
7892 "success; on error, these functions return -1 and set I<errno> to indicate "
7893 "the error."
7894 msgstr ""
7895
7896 #. type: Plain text
7897 #: build/C/man3/sigset.3:161
7898 msgid ""
7899 "For B<sigset>()  see the ERRORS under B<sigaction>(2)  and "
7900 "B<sigprocmask>(2)."
7901 msgstr ""
7902
7903 #. type: Plain text
7904 #: build/C/man3/sigset.3:168
7905 msgid "For B<sighold>()  and B<sigrelse>()  see the ERRORS under B<sigprocmask>(2)."
7906 msgstr ""
7907
7908 #. type: Plain text
7909 #: build/C/man3/sigset.3:173
7910 msgid "For B<sigignore>(), see the errors under B<sigaction>(2)."
7911 msgstr ""
7912
7913 #. type: Plain text
7914 #: build/C/man3/sigset.3:190
7915 msgid ""
7916 "SVr4, POSIX.1-2001.  These functions are obsolete: do not use them in new "
7917 "programs.  POSIX.1-2008 marks B<sighold>(), B<sigignore>(), B<sigpause>(), "
7918 "B<sigrelse>(), and B<sigset>()  as obsolete, recommending the use of "
7919 "B<sigaction>(2), B<sigprocmask>(2), B<pthread_sigmask>(3), and "
7920 "B<sigsuspend>(2)  instead."
7921 msgstr ""
7922
7923 #. type: Plain text
7924 #: build/C/man3/sigset.3:192
7925 msgid "These functions appeared in glibc version 2.1."
7926 msgstr ""
7927
7928 #. type: Plain text
7929 #: build/C/man3/sigset.3:198
7930 msgid ""
7931 "The I<sighandler_t> type is a GNU extension; it is used on this page only to "
7932 "make the B<sigset>()  prototype more easily readable."
7933 msgstr ""
7934
7935 #. type: Plain text
7936 #: build/C/man3/sigset.3:206
7937 msgid ""
7938 "The B<sigset>()  function provides reliable signal handling semantics (as "
7939 "when calling B<sigaction>(2)  with I<sa_mask> equal to 0)."
7940 msgstr ""
7941
7942 #. type: Plain text
7943 #: build/C/man3/sigset.3:224
7944 msgid ""
7945 "On System V, the B<signal>()  function provides unreliable semantics (as "
7946 "when calling B<sigaction>(2)  with I<sa_mask> equal to I<SA_RESETHAND | "
7947 "SA_NODEFER>).  On BSD, B<signal>()  provides reliable semantics.  "
7948 "POSIX.1-2001 leaves these aspects of B<signal>()  unspecified.  See "
7949 "B<signal>(2)  for further details."
7950 msgstr ""
7951
7952 #. type: Plain text
7953 #: build/C/man3/sigset.3:232 build/C/man3/sigvec.3:265
7954 msgid ""
7955 "In order to wait for a signal, BSD and System V both provided a function "
7956 "named B<sigpause>(3), but this function has a different argument on the two "
7957 "systems.  See B<sigpause>(3)  for details."
7958 msgstr ""
7959
7960 #. type: Plain text
7961 #: build/C/man3/sigset.3:241
7962 msgid ""
7963 "In versions of glibc before 2.2, B<sigset>()  did not unblock I<sig> if "
7964 "I<disp> was specified as a value other than B<SIG_HOLD>."
7965 msgstr ""
7966
7967 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1951
7968 #. type: Plain text
7969 #: build/C/man3/sigset.3:266
7970 msgid ""
7971 "In versions of glibc before 2.5, B<sigset>()  does not correctly return the "
7972 "previous disposition of the signal in two cases.  First, if I<disp> is "
7973 "specified as B<SIG_HOLD>, then a successful B<sigset>()  always returns "
7974 "B<SIG_HOLD>.  Instead, it should return the previous disposition of the "
7975 "signal (unless the signal was blocked, in which case B<SIG_HOLD> should be "
7976 "returned).  Second, if the signal is currently blocked, then the return "
7977 "value of a successful B<sigset>()  should be B<SIG_HOLD>.  Instead, the "
7978 "previous disposition of the signal is returned.  These problems have been "
7979 "fixed since glibc 2.5."
7980 msgstr ""
7981
7982 #. type: Plain text
7983 #: build/C/man3/sigset.3:276
7984 msgid ""
7985 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
7986 "B<raise>(3), B<sigpause>(3), B<sigvec>(3), B<signal>(7)"
7987 msgstr ""
7988
7989 #. type: TH
7990 #: build/C/man3/sigsetops.3:31
7991 #, no-wrap
7992 msgid "SIGSETOPS"
7993 msgstr ""
7994
7995 #. type: Plain text
7996 #: build/C/man3/sigsetops.3:35
7997 msgid ""
7998 "sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - POSIX signal "
7999 "set operations"
8000 msgstr ""
8001
8002 #. type: Plain text
8003 #: build/C/man3/sigsetops.3:39
8004 msgid "B<int sigemptyset(sigset_t *>I<set>B<);>"
8005 msgstr ""
8006
8007 #. type: Plain text
8008 #: build/C/man3/sigsetops.3:41
8009 msgid "B<int sigfillset(sigset_t *>I<set>B<);>"
8010 msgstr ""
8011
8012 #. type: Plain text
8013 #: build/C/man3/sigsetops.3:43
8014 msgid "B<int sigaddset(sigset_t *>I<set>B<, int >I<signum>B<);>"
8015 msgstr ""
8016
8017 #. type: Plain text
8018 #: build/C/man3/sigsetops.3:45
8019 msgid "B<int sigdelset(sigset_t *>I<set>B<, int >I<signum>B<);>"
8020 msgstr ""
8021
8022 #. type: Plain text
8023 #: build/C/man3/sigsetops.3:47
8024 msgid "B<int sigismember(const sigset_t *>I<set>B<, int >I<signum>B<);>"
8025 msgstr ""
8026
8027 #. type: Plain text
8028 #: build/C/man3/sigsetops.3:59
8029 msgid ""
8030 "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>(), "
8031 "B<sigismember>():"
8032 msgstr ""
8033
8034 #. type: Plain text
8035 #: build/C/man3/sigsetops.3:61
8036 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
8037 msgstr ""
8038
8039 #. type: Plain text
8040 #: build/C/man3/sigsetops.3:65
8041 msgid "These functions allow the manipulation of POSIX signal sets."
8042 msgstr ""
8043
8044 #. type: Plain text
8045 #: build/C/man3/sigsetops.3:70
8046 msgid ""
8047 "B<sigemptyset>()  initializes the signal set given by I<set> to empty, with "
8048 "all signals excluded from the set."
8049 msgstr ""
8050
8051 #. type: Plain text
8052 #: build/C/man3/sigsetops.3:75
8053 msgid "B<sigfillset>()  initializes I<set> to full, including all signals."
8054 msgstr ""
8055
8056 #. type: Plain text
8057 #: build/C/man3/sigsetops.3:83
8058 msgid ""
8059 "B<sigaddset>()  and B<sigdelset>()  add and delete respectively signal "
8060 "I<signum> from I<set>."
8061 msgstr ""
8062
8063 #. type: Plain text
8064 #: build/C/man3/sigsetops.3:89
8065 msgid "B<sigismember>()  tests whether I<signum> is a member of I<set>."
8066 msgstr ""
8067
8068 #. type: Plain text
8069 #: build/C/man3/sigsetops.3:107
8070 msgid ""
8071 "Objects of type I<sigset_t> must be initialized by a call to either "
8072 "B<sigemptyset>()  or B<sigfillset>()  before being passed to the functions "
8073 "B<sigaddset>(), B<sigdelset>()  and B<sigismember>()  or the additional "
8074 "glibc functions described below (B<sigisemptyset>(), B<sigandset>(), and "
8075 "B<sigorset>()).  The results are undefined if this is not done."
8076 msgstr ""
8077
8078 #. type: Plain text
8079 #: build/C/man3/sigsetops.3:114
8080 msgid ""
8081 "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), and B<sigdelset>()  "
8082 "return 0 on success and -1 on error."
8083 msgstr ""
8084
8085 #. type: Plain text
8086 #: build/C/man3/sigsetops.3:126
8087 msgid ""
8088 "B<sigismember>()  returns 1 if I<signum> is a member of I<set>, 0 if "
8089 "I<signum> is not a member, and -1 on error.  On error, these functions set "
8090 "I<errno> to indicate the cause."
8091 msgstr ""
8092
8093 #. type: Plain text
8094 #: build/C/man3/sigsetops.3:131
8095 msgid "I<sig> is not a valid signal."
8096 msgstr ""
8097
8098 #. type: Plain text
8099 #: build/C/man3/sigsetops.3:144
8100 msgid ""
8101 "The B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>(), "
8102 "B<sigismember>(), B<sigisemptyset>(), B<sigorset>(), and B<sigandset>()  "
8103 "functions are thread-safe."
8104 msgstr ""
8105
8106 #. type: SS
8107 #: build/C/man3/sigsetops.3:147
8108 #, no-wrap
8109 msgid "Glibc notes"
8110 msgstr ""
8111
8112 #. type: Plain text
8113 #: build/C/man3/sigsetops.3:153
8114 msgid ""
8115 "If the B<_GNU_SOURCE> feature test macro is defined, then "
8116 "I<E<lt>signal.hE<gt>> exposes three other functions for manipulating signal "
8117 "sets:"
8118 msgstr ""
8119
8120 #. type: Plain text
8121 #: build/C/man3/sigsetops.3:160
8122 #, no-wrap
8123 msgid ""
8124 "B<int sigisemptyset(const sigset_t *>I<set>B<);>\n"
8125 "B<int sigorset(sigset_t *>I<dest>B<, const sigset_t *>I<left>B<,>\n"
8126 "B<              const sigset_t *>I<right>B<);>\n"
8127 "B<int sigandset(sigset_t *>I<dest>B<, const sigset_t *>I<left>B<,>\n"
8128 "B<              const sigset_t *>I<right>B<);>\n"
8129 msgstr ""
8130
8131 #. type: Plain text
8132 #: build/C/man3/sigsetops.3:166
8133 msgid ""
8134 "B<sigisemptyset>()  returns 1 if I<set> contains no signals, and 0 "
8135 "otherwise."
8136 msgstr ""
8137
8138 #. type: Plain text
8139 #: build/C/man3/sigsetops.3:182
8140 msgid ""
8141 "B<sigorset>()  places the union of the sets I<left> and I<right> in "
8142 "I<dest>.  B<sigandset>()  places the intersection of the sets I<left> and "
8143 "I<right> in I<dest>.  Both functions return 0 on success, and -1 on failure."
8144 msgstr ""
8145
8146 #. type: Plain text
8147 #: build/C/man3/sigsetops.3:185
8148 msgid ""
8149 "These functions are nonstandard (a few other systems provide similar "
8150 "functions) and their use should be avoided in portable applications."
8151 msgstr ""
8152
8153 #. type: Plain text
8154 #: build/C/man3/sigsetops.3:190
8155 msgid "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2)"
8156 msgstr ""
8157
8158 #. type: TH
8159 #: build/C/man2/sigsuspend.2:29
8160 #, no-wrap
8161 msgid "SIGSUSPEND"
8162 msgstr ""
8163
8164 #. type: Plain text
8165 #: build/C/man2/sigsuspend.2:32
8166 msgid "sigsuspend - wait for a signal"
8167 msgstr ""
8168
8169 #. type: Plain text
8170 #: build/C/man2/sigsuspend.2:36
8171 msgid "B<int sigsuspend(const sigset_t *>I<mask>B<);>"
8172 msgstr ""
8173
8174 #. type: Plain text
8175 #: build/C/man2/sigsuspend.2:45
8176 msgid ""
8177 "B<sigsuspend>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
8178 "_POSIX_SOURCE"
8179 msgstr ""
8180
8181 #. type: Plain text
8182 #: build/C/man2/sigsuspend.2:53
8183 msgid ""
8184 "B<sigsuspend>()  temporarily replaces the signal mask of the calling process "
8185 "with the mask given by I<mask> and then suspends the process until delivery "
8186 "of a signal whose action is to invoke a signal handler or to terminate a "
8187 "process."
8188 msgstr ""
8189
8190 #. type: Plain text
8191 #: build/C/man2/sigsuspend.2:62
8192 msgid ""
8193 "If the signal terminates the process, then B<sigsuspend>()  does not "
8194 "return.  If the signal is caught, then B<sigsuspend>()  returns after the "
8195 "signal handler returns, and the signal mask is restored to the state before "
8196 "the call to B<sigsuspend>()."
8197 msgstr ""
8198
8199 #. type: Plain text
8200 #: build/C/man2/sigsuspend.2:70
8201 msgid ""
8202 "It is not possible to block B<SIGKILL> or B<SIGSTOP>; specifying these "
8203 "signals in I<mask>, has no effect on the process's signal mask."
8204 msgstr ""
8205
8206 #. type: Plain text
8207 #: build/C/man2/sigsuspend.2:76
8208 msgid ""
8209 "B<sigsuspend>()  always returns -1, with I<errno> set to indicate the error "
8210 "(normally, B<EINTR>)."
8211 msgstr ""
8212
8213 #. type: Plain text
8214 #: build/C/man2/sigsuspend.2:81
8215 msgid ""
8216 "I<mask> points to memory which is not a valid part of the process address "
8217 "space."
8218 msgstr ""
8219
8220 #. type: Plain text
8221 #: build/C/man2/sigsuspend.2:84
8222 msgid "The call was interrupted by a signal."
8223 msgstr ""
8224
8225 #. type: Plain text
8226 #: build/C/man2/sigsuspend.2:104
8227 msgid ""
8228 "Normally, B<sigsuspend>()  is used in conjunction with B<sigprocmask>(2)  in "
8229 "order to prevent delivery of a signal during the execution of a critical "
8230 "code section.  The caller first blocks the signals with B<sigprocmask>(2).  "
8231 "When the critical code has completed, the caller then waits for the signals "
8232 "by calling B<sigsuspend>()  with the signal mask that was returned by "
8233 "B<sigprocmask>(2)  (in the I<oldset> argument)."
8234 msgstr ""
8235
8236 #. type: Plain text
8237 #: build/C/man2/sigsuspend.2:118
8238 msgid ""
8239 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
8240 "B<sigwaitinfo>(2), B<sigsetops>(3), B<sigwait>(3), B<signal>(7)"
8241 msgstr ""
8242
8243 #. type: TH
8244 #: build/C/man3/sigvec.3:26
8245 #, no-wrap
8246 msgid "SIGVEC"
8247 msgstr ""
8248
8249 #. type: TH
8250 #: build/C/man3/sigvec.3:26
8251 #, no-wrap
8252 msgid "2014-05-28"
8253 msgstr ""
8254
8255 #. type: Plain text
8256 #: build/C/man3/sigvec.3:29
8257 msgid "sigvec, sigblock, sigsetmask, siggetmask, sigmask - BSD signal API"
8258 msgstr ""
8259
8260 #. type: Plain text
8261 #: build/C/man3/sigvec.3:33
8262 msgid ""
8263 "B<int sigvec(int >I<sig>B<, const struct sigvec *>I<vec>B<, struct sigvec "
8264 "*>I<ovec>B<);>"
8265 msgstr ""
8266
8267 #. type: Plain text
8268 #: build/C/man3/sigvec.3:35
8269 msgid "B<int sigmask(int >I<signum>B<);>"
8270 msgstr ""
8271
8272 #. type: Plain text
8273 #: build/C/man3/sigvec.3:37
8274 msgid "B<int sigblock(int >I<mask>B<);>"
8275 msgstr ""
8276
8277 #. type: Plain text
8278 #: build/C/man3/sigvec.3:39
8279 msgid "B<int sigsetmask(int >I<mask>B<);>"
8280 msgstr ""
8281
8282 #. type: Plain text
8283 #: build/C/man3/sigvec.3:41
8284 msgid "B<int siggetmask(void);>"
8285 msgstr ""
8286
8287 #. type: Plain text
8288 #: build/C/man3/sigvec.3:49
8289 msgid "All functions shown above: _BSD_SOURCE"
8290 msgstr ""
8291
8292 #. type: Plain text
8293 #: build/C/man3/sigvec.3:56
8294 msgid ""
8295 "These functions are provided in glibc as a compatibility interface for "
8296 "programs that make use of the historical BSD signal API.  This API is "
8297 "obsolete: new applications should use the POSIX signal API (B<sigaction>(2), "
8298 "B<sigprocmask>(2), etc.)."
8299 msgstr ""
8300
8301 #. type: Plain text
8302 #: build/C/man3/sigvec.3:81
8303 msgid ""
8304 "The B<sigvec>()  function sets and/or gets the disposition of the signal "
8305 "I<sig> (like the POSIX B<sigaction>(2)).  If I<vec> is not NULL, it points "
8306 "to a I<sigvec> structure that defines the new disposition for I<sig>.  If "
8307 "I<ovec> is not NULL, it points to a I<sigvec> structure that is used to "
8308 "return the previous disposition of I<sig>.  To obtain the current "
8309 "disposition of I<sig> without changing it, specify NULL for I<vec>, and a "
8310 "non-null pointer for I<ovec>."
8311 msgstr ""
8312
8313 #. type: Plain text
8314 #: build/C/man3/sigvec.3:91
8315 msgid "The I<sigvec> structure has the following form:"
8316 msgstr ""
8317
8318 #. type: Plain text
8319 #: build/C/man3/sigvec.3:99
8320 #, no-wrap
8321 msgid ""
8322 "struct sigvec {\n"
8323 "    void (*sv_handler)(int); /* Signal disposition */\n"
8324 "    int    sv_mask;          /* Signals to be blocked in handler */\n"
8325 "    int    sv_flags;         /* Flags */\n"
8326 "};\n"
8327 msgstr ""
8328
8329 #. type: Plain text
8330 #: build/C/man3/sigvec.3:110
8331 msgid ""
8332 "The I<sv_handler> field specifies the disposition of the signal, and is "
8333 "either: the address of a signal handler function; B<SIG_DFL>, meaning the "
8334 "default disposition applies for the signal; or B<SIG_IGN>, meaning that the "
8335 "signal is ignored."
8336 msgstr ""
8337
8338 #. type: Plain text
8339 #: build/C/man3/sigvec.3:124
8340 msgid ""
8341 "If I<sv_handler> specifies the address of a signal handler, then I<sv_mask> "
8342 "specifies a mask of signals that are to be blocked while the handler is "
8343 "executing.  In addition, the signal for which the handler is invoked is also "
8344 "blocked.  Attempts to block B<SIGKILL> or B<SIGSTOP> are silently ignored."
8345 msgstr ""
8346
8347 #. type: Plain text
8348 #: build/C/man3/sigvec.3:131
8349 msgid ""
8350 "If I<sv_handler> specifies the address of a signal handler, then the "
8351 "I<sv_flags> field specifies flags controlling what happens when the handler "
8352 "is called.  This field may contain zero or more of the following flags:"
8353 msgstr ""
8354
8355 #. type: TP
8356 #: build/C/man3/sigvec.3:131
8357 #, no-wrap
8358 msgid "B<SV_INTERRUPT>"
8359 msgstr ""
8360
8361 #. type: Plain text
8362 #: build/C/man3/sigvec.3:139
8363 msgid ""
8364 "If the signal handler interrupts a blocking system call, then upon return "
8365 "from the handler the system call will not be restarted: instead it will fail "
8366 "with the error B<EINTR>.  If this flag is not specified, then system calls "
8367 "are restarted by default."
8368 msgstr ""
8369
8370 #. type: TP
8371 #: build/C/man3/sigvec.3:139
8372 #, no-wrap
8373 msgid "B<SV_RESETHAND>"
8374 msgstr ""
8375
8376 #. type: Plain text
8377 #: build/C/man3/sigvec.3:148
8378 msgid ""
8379 "Reset the disposition of the signal to the default before calling the signal "
8380 "handler.  If this flag is not specified, then the handler remains "
8381 "established until explicitly removed by a later call to B<sigvec>()  or "
8382 "until the process performs an B<execve>(2)."
8383 msgstr ""
8384
8385 #. type: TP
8386 #: build/C/man3/sigvec.3:148
8387 #, no-wrap
8388 msgid "B<SV_ONSTACK>"
8389 msgstr ""
8390
8391 #. type: Plain text
8392 #: build/C/man3/sigvec.3:155
8393 msgid ""
8394 "Handle the signal on the alternate signal stack (historically established "
8395 "under BSD using the obsolete B<sigstack>()  function; the POSIX replacement "
8396 "is B<sigaltstack>(2))."
8397 msgstr ""
8398
8399 #. type: Plain text
8400 #: build/C/man3/sigvec.3:165
8401 msgid ""
8402 "The B<sigmask>()  macro constructs and returns a \"signal mask\" for "
8403 "I<signum>.  For example, we can initialize the I<vec.sv_mask> field given to "
8404 "B<sigvec>()  using code such as the following:"
8405 msgstr ""
8406
8407 #. type: Plain text
8408 #: build/C/man3/sigvec.3:170
8409 #, no-wrap
8410 msgid ""
8411 "    vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT);\n"
8412 "                /* Block SIGQUIT and SIGABRT during\n"
8413 "                   handler execution */\n"
8414 msgstr ""
8415
8416 #. type: Plain text
8417 #: build/C/man3/sigvec.3:185
8418 msgid ""
8419 "The B<sigblock>()  function adds the signals in I<mask> to the process's "
8420 "signal mask (like POSIX I<sigprocmask(SIG_BLOCK)>), and returns the "
8421 "process's previous signal mask.  Attempts to block B<SIGKILL> or B<SIGSTOP> "
8422 "are silently ignored."
8423 msgstr ""
8424
8425 #. type: Plain text
8426 #: build/C/man3/sigvec.3:193
8427 msgid ""
8428 "The B<sigsetmask>()  function sets the process's signal mask to the value "
8429 "given in I<mask> (like POSIX I<sigprocmask(SIG_SETMASK)>), and returns the "
8430 "process's previous signal mask."
8431 msgstr ""
8432
8433 #. type: Plain text
8434 #: build/C/man3/sigvec.3:199
8435 msgid ""
8436 "The B<siggetmask>()  function returns the process's current signal mask.  "
8437 "This call is equivalent to I<sigblock(0)>."
8438 msgstr ""
8439
8440 #. type: Plain text
8441 #: build/C/man3/sigvec.3:205
8442 msgid ""
8443 "The B<sigvec>()  function returns 0 on success; on error, it returns -1 and "
8444 "sets I<errno> to indicate the error."
8445 msgstr ""
8446
8447 #. type: Plain text
8448 #: build/C/man3/sigvec.3:211
8449 msgid ""
8450 "The B<sigblock>()  and B<sigsetmask>()  functions return the previous signal "
8451 "mask."
8452 msgstr ""
8453
8454 #. type: Plain text
8455 #: build/C/man3/sigvec.3:216
8456 msgid "The B<sigmask>()  macro returns the signal mask for I<signum>."
8457 msgstr ""
8458
8459 #. type: Plain text
8460 #: build/C/man3/sigvec.3:221
8461 msgid "See the ERRORS under B<sigaction>(2)  and B<sigprocmask>(2)."
8462 msgstr ""
8463
8464 #. type: Plain text
8465 #: build/C/man3/sigvec.3:230
8466 msgid ""
8467 "The B<sigvec>(), B<sigblock>(), B<sigsetmask>(), and B<siggetmask>()  "
8468 "functions are thread-safe."
8469 msgstr ""
8470
8471 #. type: Plain text
8472 #: build/C/man3/sigvec.3:234
8473 msgid "The B<sigmask>()  macro is thread-safe."
8474 msgstr ""
8475
8476 #. type: Plain text
8477 #: build/C/man3/sigvec.3:240
8478 msgid ""
8479 "All of these functions were in 4.3BSD, except B<siggetmask>(), whose origin "
8480 "is unclear.  These functions are obsolete: do not use them in new programs."
8481 msgstr ""
8482
8483 #. type: Plain text
8484 #: build/C/man3/sigvec.3:257
8485 msgid ""
8486 "On 4.3BSD, the B<signal>()  function provided reliable semantics (as when "
8487 "calling B<sigvec>()  with I<vec.sv_mask> equal to 0).  On System V, "
8488 "B<signal>()  provides unreliable semantics.  POSIX.1-2001 leaves these "
8489 "aspects of B<signal>()  unspecified.  See B<signal>(2)  for further details."
8490 msgstr ""
8491
8492 #. type: Plain text
8493 #: build/C/man3/sigvec.3:275
8494 msgid ""
8495 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
8496 "B<raise>(3), B<sigpause>(3), B<sigset>(3), B<signal>(7)"
8497 msgstr ""
8498
8499 #. type: TH
8500 #: build/C/man3/sigwait.3:26
8501 #, no-wrap
8502 msgid "SIGWAIT"
8503 msgstr ""
8504
8505 #. type: Plain text
8506 #: build/C/man3/sigwait.3:29
8507 msgid "sigwait - wait for a signal"
8508 msgstr ""
8509
8510 #. type: Plain text
8511 #: build/C/man3/sigwait.3:34
8512 #, no-wrap
8513 msgid "B< int sigwait(const sigset_t *>I<set>B<, int *>I<sig>B<);>\n"
8514 msgstr ""
8515
8516 #. type: Plain text
8517 #: build/C/man3/sigwait.3:44
8518 msgid "B<sigwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
8519 msgstr ""
8520
8521 #. type: Plain text
8522 #: build/C/man3/sigwait.3:56
8523 msgid ""
8524 "The B<sigwait>()  function suspends execution of the calling thread until "
8525 "one of the signals specified in the signal set I<set> becomes pending.  The "
8526 "function accepts the signal (removes it from the pending list of signals), "
8527 "and returns the signal number in I<sig>."
8528 msgstr ""
8529
8530 #. type: Plain text
8531 #: build/C/man3/sigwait.3:62
8532 msgid ""
8533 "The operation of B<sigwait>()  is the same as B<sigwaitinfo>(2), except "
8534 "that:"
8535 msgstr ""
8536
8537 #. type: Plain text
8538 #: build/C/man3/sigwait.3:67
8539 msgid ""
8540 "B<sigwait>()  returns only the signal number, rather than a I<siginfo_t> "
8541 "structure describing the signal."
8542 msgstr ""
8543
8544 #. type: Plain text
8545 #: build/C/man3/sigwait.3:69
8546 msgid "The return values of the two functions are different."
8547 msgstr ""
8548
8549 #. type: Plain text
8550 #: build/C/man3/sigwait.3:74
8551 msgid ""
8552 "On success, B<sigwait>()  returns 0.  On error, it returns a positive error "
8553 "number (listed in ERRORS)."
8554 msgstr ""
8555
8556 #.  Does not occur for glibc.
8557 #. type: Plain text
8558 #: build/C/man3/sigwait.3:80
8559 msgid "I<set> contains an invalid signal number."
8560 msgstr ""
8561
8562 #. type: Plain text
8563 #: build/C/man3/sigwait.3:85
8564 msgid "The B<sigwait>()  function is thread-safe."
8565 msgstr ""
8566
8567 #. type: Plain text
8568 #: build/C/man3/sigwait.3:91
8569 msgid "B<sigwait>()  is implemented using B<sigtimedwait>(2)."
8570 msgstr ""
8571
8572 #. type: Plain text
8573 #: build/C/man3/sigwait.3:94
8574 msgid "See B<pthread_sigmask>(3)."
8575 msgstr ""
8576
8577 #. type: Plain text
8578 #: build/C/man3/sigwait.3:102
8579 msgid ""
8580 "B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigsuspend>(2), "
8581 "B<sigwaitinfo>(2), B<sigsetops>(3), B<signal>(7)"
8582 msgstr ""
8583
8584 #. type: TH
8585 #: build/C/man2/sigwaitinfo.2:25
8586 #, no-wrap
8587 msgid "SIGWAITINFO"
8588 msgstr ""
8589
8590 #. type: TH
8591 #: build/C/man2/sigwaitinfo.2:25 build/C/man2/wait.2:49
8592 #, no-wrap
8593 msgid "2013-09-04"
8594 msgstr ""
8595
8596 #. type: Plain text
8597 #: build/C/man2/sigwaitinfo.2:28
8598 msgid "sigwaitinfo, sigtimedwait - synchronously wait for queued signals"
8599 msgstr ""
8600
8601 #. type: Plain text
8602 #: build/C/man2/sigwaitinfo.2:33
8603 #, no-wrap
8604 msgid "B<int sigwaitinfo(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<);>\n"
8605 msgstr ""
8606
8607 #. type: Plain text
8608 #: build/C/man2/sigwaitinfo.2:36
8609 #, no-wrap
8610 msgid ""
8611 "B<int sigtimedwait(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<, >\n"
8612 "B<                 const struct timespec *>I<timeout>B<);>\n"
8613 msgstr ""
8614
8615 #. type: Plain text
8616 #: build/C/man2/sigwaitinfo.2:46
8617 msgid "B<sigwaitinfo>(), B<sigtimedwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8618 msgstr ""
8619
8620 #. type: Plain text
8621 #: build/C/man2/sigwaitinfo.2:56
8622 msgid ""
8623 "B<sigwaitinfo>()  suspends execution of the calling thread until one of the "
8624 "signals in I<set> is pending (If one of the signals in I<set> is already "
8625 "pending for the calling thread, B<sigwaitinfo>()  will return immediately.)"
8626 msgstr ""
8627
8628 #. type: Plain text
8629 #: build/C/man2/sigwaitinfo.2:68
8630 msgid ""
8631 "B<sigwaitinfo>()  removes the signal from the set of pending signals and "
8632 "returns the signal number as its function result.  If the I<info> argument "
8633 "is not NULL, then the buffer that it points to is used to return a structure "
8634 "of type I<siginfo_t> (see B<sigaction>(2))  containing information about the "
8635 "signal."
8636 msgstr ""
8637
8638 #. type: Plain text
8639 #: build/C/man2/sigwaitinfo.2:76
8640 msgid ""
8641 "If multiple signals in I<set> are pending for the caller, the signal that is "
8642 "retrieved by B<sigwaitinfo>()  is determined according to the usual ordering "
8643 "rules; see B<signal>(7)  for further details."
8644 msgstr ""
8645
8646 #. type: Plain text
8647 #: build/C/man2/sigwaitinfo.2:88
8648 msgid ""
8649 "B<sigtimedwait>()  operates in exactly the same way as B<sigwaitinfo>()  "
8650 "except that it has an additional argument, I<timeout>, which specifies the "
8651 "interval for which the thread is suspended waiting for a signal.  (This "
8652 "interval will be rounded up to the system clock granularity, and kernel "
8653 "scheduling delays mean that the interval may overrun by a small amount.)  "
8654 "This argument is of the following type:"
8655 msgstr ""
8656
8657 #. type: Plain text
8658 #: build/C/man2/sigwaitinfo.2:95
8659 #, no-wrap
8660 msgid ""
8661 "struct timespec {\n"
8662 "    long    tv_sec;         /* seconds */\n"
8663 "    long    tv_nsec;        /* nanoseconds */\n"
8664 "}\n"
8665 msgstr ""
8666
8667 #. type: Plain text
8668 #: build/C/man2/sigwaitinfo.2:105
8669 msgid ""
8670 "If both fields of this structure are specified as 0, a poll is performed: "
8671 "B<sigtimedwait>()  returns immediately, either with information about a "
8672 "signal that was pending for the caller, or with an error if none of the "
8673 "signals in I<set> was pending."
8674 msgstr ""
8675
8676 #. type: Plain text
8677 #: build/C/man2/sigwaitinfo.2:114
8678 msgid ""
8679 "On success, both B<sigwaitinfo>()  and B<sigtimedwait>()  return a signal "
8680 "number (i.e., a value greater than zero).  On failure both calls return -1, "
8681 "with I<errno> set to indicate the error."
8682 msgstr ""
8683
8684 #. type: Plain text
8685 #: build/C/man2/sigwaitinfo.2:123
8686 msgid ""
8687 "No signal in I<set> was became pending within the I<timeout> period "
8688 "specified to B<sigtimedwait>()."
8689 msgstr ""
8690
8691 #. type: Plain text
8692 #: build/C/man2/sigwaitinfo.2:129
8693 msgid ""
8694 "The wait was interrupted by a signal handler; see B<signal>(7).  (This "
8695 "handler was for a signal other than one of those in I<set>.)"
8696 msgstr ""
8697
8698 #. type: Plain text
8699 #: build/C/man2/sigwaitinfo.2:133
8700 msgid "I<timeout> was invalid."
8701 msgstr ""
8702
8703 #. type: Plain text
8704 #: build/C/man2/sigwaitinfo.2:153
8705 msgid ""
8706 "In normal usage, the calling program blocks the signals in I<set> via a "
8707 "prior call to B<sigprocmask>(2)  (so that the default disposition for these "
8708 "signals does not occur if they become pending between successive calls to "
8709 "B<sigwaitinfo>()  or B<sigtimedwait>())  and does not establish handlers for "
8710 "these signals.  In a multithreaded program, the signal should be blocked in "
8711 "all threads, in order to prevent the signal being treated according to its "
8712 "default disposition in a thread other than the one calling B<sigwaitinfo>()  "
8713 "or B<sigtimedwait>())."
8714 msgstr ""
8715
8716 #. type: Plain text
8717 #: build/C/man2/sigwaitinfo.2:158
8718 msgid ""
8719 "The set of signals that is pending for a given thread is the union of the "
8720 "set of signals that is pending specifically for that thread and the set of "
8721 "signals that is pending for the process as a whole (see B<signal>(7))."
8722 msgstr ""
8723
8724 #. type: Plain text
8725 #: build/C/man2/sigwaitinfo.2:164
8726 msgid "Attempts to wait for B<SIGKILL> and B<SIGSTOP> are silently ignored."
8727 msgstr ""
8728
8729 #. type: Plain text
8730 #: build/C/man2/sigwaitinfo.2:173
8731 msgid ""
8732 "If multiple threads of a process are blocked waiting for the same signal(s) "
8733 "in B<sigwaitinfo>()  or B<sigtimedwait>(), then exactly one of the threads "
8734 "will actually receive the signal if it becomes pending for the process as a "
8735 "whole; which of the threads receives the signal is indeterminate."
8736 msgstr ""
8737
8738 #. type: Plain text
8739 #: build/C/man2/sigwaitinfo.2:182
8740 msgid ""
8741 "POSIX leaves the meaning of a NULL value for the I<timeout> argument of "
8742 "B<sigtimedwait>()  unspecified, permitting the possibility that this has the "
8743 "same meaning as a call to B<sigwaitinfo>(), and indeed this is what is done "
8744 "on Linux."
8745 msgstr ""
8746
8747 #. type: Plain text
8748 #: build/C/man2/sigwaitinfo.2:187
8749 msgid ""
8750 "On Linux, B<sigwaitinfo>()  is a library function implemented on top of "
8751 "B<sigtimedwait>()."
8752 msgstr ""
8753
8754 #. type: Plain text
8755 #: build/C/man2/sigwaitinfo.2:199
8756 msgid ""
8757 "B<kill>(2), B<sigaction>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), "
8758 "B<sigprocmask>(2), B<sigqueue>(3), B<sigsetops>(3), B<sigwait>(3), "
8759 "B<signal>(7), B<time>(7)"
8760 msgstr ""
8761
8762 #. type: TH
8763 #: build/C/man3/sysv_signal.3:25
8764 #, no-wrap
8765 msgid "SYSV_SIGNAL"
8766 msgstr ""
8767
8768 #. type: TH
8769 #: build/C/man3/sysv_signal.3:25
8770 #, no-wrap
8771 msgid "2014-01-06"
8772 msgstr ""
8773
8774 #. type: Plain text
8775 #: build/C/man3/sysv_signal.3:28
8776 msgid "sysv_signal - signal handling with System V semantics"
8777 msgstr ""
8778
8779 #. type: Plain text
8780 #: build/C/man3/sysv_signal.3:30
8781 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
8782 msgstr ""
8783
8784 #. type: Plain text
8785 #: build/C/man3/sysv_signal.3:36
8786 msgid "B<sighandler_t sysv_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
8787 msgstr ""
8788
8789 #. type: Plain text
8790 #: build/C/man3/sysv_signal.3:41
8791 msgid ""
8792 "The B<sysv_signal>()  function takes the same arguments, and performs the "
8793 "same task, as B<signal>(2)."
8794 msgstr ""
8795
8796 #. type: Plain text
8797 #: build/C/man3/sysv_signal.3:51
8798 msgid ""
8799 "However B<sysv_signal>()  provides the System V unreliable signal semantics, "
8800 "that is: a) the disposition of the signal is reset to the default when the "
8801 "handler is invoked; b) delivery of further instances of the signal is not "
8802 "blocked while the signal handler is executing; and c) if the handler "
8803 "interrupts (certain) blocking system calls, then the system call is not "
8804 "automatically restarted."
8805 msgstr ""
8806
8807 #. type: Plain text
8808 #: build/C/man3/sysv_signal.3:57
8809 msgid ""
8810 "The B<sysv_signal>()  function returns the previous value of the signal "
8811 "handler, or B<SIG_ERR> on error."
8812 msgstr ""
8813
8814 #. type: Plain text
8815 #: build/C/man3/sysv_signal.3:65
8816 msgid "The B<sysv_signal>()  function is thread-safe."
8817 msgstr ""
8818
8819 #. type: Plain text
8820 #: build/C/man3/sysv_signal.3:67
8821 msgid "This function is nonstandard."
8822 msgstr ""
8823
8824 #. type: Plain text
8825 #: build/C/man3/sysv_signal.3:73
8826 msgid "Use of B<sysv_signal>()  should be avoided; use B<sigaction>(2)  instead."
8827 msgstr ""
8828
8829 #. type: Plain text
8830 #: build/C/man3/sysv_signal.3:84
8831 msgid ""
8832 "On older Linux systems, B<sysv_signal>()  and B<signal>(2)  were "
8833 "equivalent.  But on newer systems, B<signal>(2)  provides reliable signal "
8834 "semantics; see B<signal>(2)  for details."
8835 msgstr ""
8836
8837 #. type: Plain text
8838 #: build/C/man3/sysv_signal.3:97
8839 msgid "B<sigaction>(2), B<signal>(2), B<bsd_signal>(3), B<signal>(7)"
8840 msgstr ""
8841
8842 #. type: TH
8843 #: build/C/man2/timer_create.2:31
8844 #, no-wrap
8845 msgid "TIMER_CREATE"
8846 msgstr ""
8847
8848 #. type: TH
8849 #: build/C/man2/timer_create.2:31
8850 #, no-wrap
8851 msgid "2014-01-20"
8852 msgstr ""
8853
8854 #. type: Plain text
8855 #: build/C/man2/timer_create.2:34
8856 msgid "timer_create - create a POSIX per-process timer"
8857 msgstr ""
8858
8859 #. type: Plain text
8860 #: build/C/man2/timer_create.2:38
8861 #, no-wrap
8862 msgid ""
8863 "B<#include E<lt>signal.hE<gt>>\n"
8864 "B<#include E<lt>time.hE<gt>>\n"
8865 msgstr ""
8866
8867 #. type: Plain text
8868 #: build/C/man2/timer_create.2:41
8869 #, no-wrap
8870 msgid ""
8871 "B<int timer_create(clockid_t >I<clockid>B<, struct sigevent *>I<sevp>B<,>\n"
8872 "B<                 timer_t *>I<timerid>B<);>\n"
8873 msgstr ""
8874
8875 #. type: Plain text
8876 #: build/C/man2/timer_create.2:44 build/C/man2/timer_delete.2:37 build/C/man2/timer_getoverrun.2:37 build/C/man2/timer_settime.2:41
8877 msgid "Link with I<-lrt>."
8878 msgstr ""
8879
8880 #. type: Plain text
8881 #: build/C/man2/timer_create.2:52
8882 msgid "B<timer_create>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8883 msgstr ""
8884
8885 #. type: Plain text
8886 #: build/C/man2/timer_create.2:60
8887 msgid ""
8888 "B<timer_create>()  creates a new per-process interval timer.  The ID of the "
8889 "new timer is returned in the buffer pointed to by I<timerid>, which must be "
8890 "a non-null pointer.  This ID is unique within the process, until the timer "
8891 "is deleted.  The new timer is initially disarmed."
8892 msgstr ""
8893
8894 #. type: Plain text
8895 #: build/C/man2/timer_create.2:65
8896 msgid ""
8897 "The I<clockid> argument specifies the clock that the new timer uses to "
8898 "measure time.  It can be specified as one of the following values:"
8899 msgstr ""
8900
8901 #. type: TP
8902 #: build/C/man2/timer_create.2:65
8903 #, no-wrap
8904 msgid "B<CLOCK_REALTIME>"
8905 msgstr ""
8906
8907 #. type: Plain text
8908 #: build/C/man2/timer_create.2:68
8909 msgid "A settable system-wide real-time clock."
8910 msgstr ""
8911
8912 #. type: TP
8913 #: build/C/man2/timer_create.2:68
8914 #, no-wrap
8915 msgid "B<CLOCK_MONOTONIC>"
8916 msgstr ""
8917
8918 #.  Note: the CLOCK_MONOTONIC_RAW clock added for clock_gettime()
8919 #.  in 2.6.28 is not supported for POSIX timers -- mtk, Feb 2009
8920 #. type: Plain text
8921 #: build/C/man2/timer_create.2:75
8922 msgid ""
8923 "A nonsettable monotonically increasing clock that measures time from some "
8924 "unspecified point in the past that does not change after system startup."
8925 msgstr ""
8926
8927 #. type: TP
8928 #: build/C/man2/timer_create.2:75
8929 #, no-wrap
8930 msgid "B<CLOCK_PROCESS_CPUTIME_ID> (since Linux 2.6.12)"
8931 msgstr ""
8932
8933 #. type: Plain text
8934 #: build/C/man2/timer_create.2:79
8935 msgid ""
8936 "A clock that measures (user and system) CPU time consumed by (all of the "
8937 "threads in) the calling process."
8938 msgstr ""
8939
8940 #. type: TP
8941 #: build/C/man2/timer_create.2:79
8942 #, no-wrap
8943 msgid "B<CLOCK_THREAD_CPUTIME_ID> (since Linux 2.6.12)"
8944 msgstr ""
8945
8946 #.  The CLOCK_MONOTONIC_RAW that was added in 2.6.28 can't be used
8947 #.  to create a timer -- mtk, Feb 2009
8948 #. type: Plain text
8949 #: build/C/man2/timer_create.2:85
8950 msgid ""
8951 "A clock that measures (user and system) CPU time consumed by the calling "
8952 "thread."
8953 msgstr ""
8954
8955 #. type: Plain text
8956 #: build/C/man2/timer_create.2:94
8957 msgid ""
8958 "As well as the above values, I<clockid> can be specified as the I<clockid> "
8959 "returned by a call to B<clock_getcpuclockid>(3)  or "
8960 "B<pthread_getcpuclockid>(3)."
8961 msgstr ""
8962
8963 #. type: Plain text
8964 #: build/C/man2/timer_create.2:103
8965 msgid ""
8966 "The I<sevp> argument points to a I<sigevent> structure that specifies how "
8967 "the caller should be notified when the timer expires.  For the definition "
8968 "and general details of this structure, see B<sigevent>(7)."
8969 msgstr ""
8970
8971 #. type: Plain text
8972 #: build/C/man2/timer_create.2:107
8973 msgid "The I<sevp.sigev_notify> field can have the following values:"
8974 msgstr ""
8975
8976 #. type: Plain text
8977 #: build/C/man2/timer_create.2:112
8978 msgid ""
8979 "Don't asynchronously notify when the timer expires.  Progress of the timer "
8980 "can be monitored using B<timer_gettime>(2)."
8981 msgstr ""
8982
8983 #. type: Plain text
8984 #: build/C/man2/timer_create.2:130
8985 msgid ""
8986 "Upon timer expiration, generate the signal I<sigev_signo> for the process.  "
8987 "See B<sigevent>(7)  for general details.  The I<si_code> field of the "
8988 "I<siginfo_t> structure will be set to B<SI_TIMER>.  At any point in time, at "
8989 "most one signal is queued to the process for a given timer; see "
8990 "B<timer_getoverrun>(2)  for more details."
8991 msgstr ""
8992
8993 #. type: Plain text
8994 #: build/C/man2/timer_create.2:138
8995 msgid ""
8996 "Upon timer expiration, invoke I<sigev_notify_function> as if it were the "
8997 "start function of a new thread.  See B<sigevent>(7)  for details."
8998 msgstr ""
8999
9000 #. type: Plain text
9001 #: build/C/man2/timer_create.2:152
9002 msgid ""
9003 "As for B<SIGEV_SIGNAL>, but the signal is targeted at the thread whose ID is "
9004 "given in I<sigev_notify_thread_id>, which must be a thread in the same "
9005 "process as the caller.  The I<sigev_notify_thread_id> field specifies a "
9006 "kernel thread ID, that is, the value returned by B<clone>(2)  or "
9007 "B<gettid>(2).  This flag is intended only for use by threading libraries."
9008 msgstr ""
9009
9010 #. type: Plain text
9011 #: build/C/man2/timer_create.2:167
9012 msgid ""
9013 "Specifying I<sevp> as NULL is equivalent to specifying a pointer to a "
9014 "I<sigevent> structure in which I<sigev_notify> is B<SIGEV_SIGNAL>, "
9015 "I<sigev_signo> is B<SIGALRM>, and I<sigev_value.sival_int> is the timer ID."
9016 msgstr ""
9017
9018 #. type: Plain text
9019 #: build/C/man2/timer_create.2:175
9020 msgid ""
9021 "On success, B<timer_create>()  returns 0, and the ID of the new timer is "
9022 "placed in I<*timerid>.  On failure, -1 is returned, and I<errno> is set to "
9023 "indicate the error."
9024 msgstr ""
9025
9026 #. type: Plain text
9027 #: build/C/man2/timer_create.2:179
9028 msgid "Temporary error during kernel allocation of timer structures."
9029 msgstr ""
9030
9031 #. type: Plain text
9032 #: build/C/man2/timer_create.2:187
9033 msgid ""
9034 "Clock ID, I<sigev_notify>, I<sigev_signo>, or I<sigev_notify_thread_id> is "
9035 "invalid."
9036 msgstr ""
9037
9038 #.  glibc layer: malloc()
9039 #. type: Plain text
9040 #: build/C/man2/timer_create.2:191
9041 msgid "Could not allocate memory."
9042 msgstr ""
9043
9044 #. type: Plain text
9045 #: build/C/man2/timer_create.2:193 build/C/man2/timer_delete.2:67 build/C/man2/timer_getoverrun.2:97
9046 msgid "This system call is available since Linux 2.6."
9047 msgstr ""
9048
9049 #. type: Plain text
9050 #: build/C/man2/timer_create.2:198
9051 msgid "A program may create multiple interval timers using B<timer_create>()."
9052 msgstr ""
9053
9054 #. type: Plain text
9055 #: build/C/man2/timer_create.2:203
9056 msgid ""
9057 "Timers are not inherited by the child of a B<fork>(2), and are disarmed and "
9058 "deleted during an B<execve>(2)."
9059 msgstr ""
9060
9061 #. type: Plain text
9062 #: build/C/man2/timer_create.2:211
9063 msgid ""
9064 "The kernel preallocates a \"queued real-time signal\" for each timer created "
9065 "using B<timer_create>().  Consequently, the number of timers is limited by "
9066 "the B<RLIMIT_SIGPENDING> resource limit (see B<setrlimit>(2))."
9067 msgstr ""
9068
9069 #. type: Plain text
9070 #: build/C/man2/timer_create.2:216
9071 msgid ""
9072 "The timers created by B<timer_create>()  are commonly known as \"POSIX "
9073 "(interval) timers\".  The POSIX timers API consists of the following "
9074 "interfaces:"
9075 msgstr ""
9076
9077 #. type: Plain text
9078 #: build/C/man2/timer_create.2:219
9079 msgid "B<timer_create>(): Create a timer."
9080 msgstr ""
9081
9082 #. type: Plain text
9083 #: build/C/man2/timer_create.2:222
9084 msgid "B<timer_settime>(2): Arm (start) or disarm (stop) a timer."
9085 msgstr ""
9086
9087 #. type: Plain text
9088 #: build/C/man2/timer_create.2:226
9089 msgid ""
9090 "B<timer_gettime>(2): Fetch the time remaining until the next expiration of a "
9091 "timer, along with the interval setting of the timer."
9092 msgstr ""
9093
9094 #. type: Plain text
9095 #: build/C/man2/timer_create.2:229
9096 msgid ""
9097 "B<timer_getoverrun>(2): Return the overrun count for the last timer "
9098 "expiration."
9099 msgstr ""
9100
9101 #. type: Plain text
9102 #: build/C/man2/timer_create.2:232
9103 msgid "B<timer_delete>(2): Disarm and delete a timer."
9104 msgstr ""
9105
9106 #. type: Plain text
9107 #: build/C/man2/timer_create.2:235
9108 msgid ""
9109 "Part of the implementation of the POSIX timers API is provided by glibc.  In "
9110 "particular:"
9111 msgstr ""
9112
9113 #. type: Plain text
9114 #: build/C/man2/timer_create.2:239
9115 msgid ""
9116 "The functionality for B<SIGEV_THREAD> is implemented within glibc, rather "
9117 "than the kernel."
9118 msgstr ""
9119
9120 #.  See the glibc source file kernel-posix-timers.h for the structure
9121 #.  that glibc uses to map user-space timer IDs to kernel timer IDs
9122 #.  The kernel-level timer ID is exposed via siginfo.si_tid.
9123 #. type: Plain text
9124 #: build/C/man2/timer_create.2:245
9125 msgid ""
9126 "The timer IDs presented at user level are maintained by glibc, which maps "
9127 "these IDs to the timer IDs employed by the kernel."
9128 msgstr ""
9129
9130 #. type: Plain text
9131 #: build/C/man2/timer_create.2:253
9132 msgid ""
9133 "The POSIX timers system calls first appeared in Linux 2.6.  Prior to this, "
9134 "glibc provided an incomplete user-space implementation (B<CLOCK_REALTIME> "
9135 "timers only) using POSIX threads, and current glibc falls back to this "
9136 "implementation on systems running pre-2.6 Linux kernels."
9137 msgstr ""
9138
9139 #. type: Plain text
9140 #: build/C/man2/timer_create.2:261
9141 msgid ""
9142 "Since Linux 3.10, the I</proc/[pid]/timers> file can be used to list the "
9143 "POSIX timers for the process with PID I<pid>.  See B<proc>(5)  for further "
9144 "information."
9145 msgstr ""
9146
9147 #. type: Plain text
9148 #: build/C/man2/timer_create.2:273
9149 msgid ""
9150 "The program below takes two arguments: a sleep period in seconds, and a "
9151 "timer frequency in nanoseconds.  The program establishes a handler for the "
9152 "signal it uses for the timer, blocks that signal, creates and arms a timer "
9153 "that expires with the given frequency, sleeps for the specified number of "
9154 "seconds, and then unblocks the timer signal.  Assuming that the timer "
9155 "expired at least once while the program slept, the signal handler will be "
9156 "invoked, and the handler displays some information about the timer "
9157 "notification.  The program terminates after one invocation of the signal "
9158 "handler."
9159 msgstr ""
9160
9161 #. type: Plain text
9162 #: build/C/man2/timer_create.2:278
9163 msgid ""
9164 "In the following example run, the program sleeps for 1 second, after "
9165 "creating a timer that has a frequency of 100 nanoseconds.  By the time the "
9166 "signal is unblocked and delivered, there have been around ten million "
9167 "overruns."
9168 msgstr ""
9169
9170 #. type: Plain text
9171 #: build/C/man2/timer_create.2:290
9172 #, no-wrap
9173 msgid ""
9174 "$ B<./a.out 1 100>\n"
9175 "Establishing handler for signal 34\n"
9176 "Blocking signal 34\n"
9177 "timer ID is 0x804c008\n"
9178 "Sleeping for 1 seconds\n"
9179 "Unblocking signal 34\n"
9180 "Caught signal 34\n"
9181 "    sival_ptr = 0xbfb174f4;     *sival_ptr = 0x804c008\n"
9182 "    overrun count = 10004886\n"
9183 msgstr ""
9184
9185 #. type: Plain text
9186 #: build/C/man2/timer_create.2:300
9187 #, no-wrap
9188 msgid ""
9189 "#include E<lt>stdlib.hE<gt>\n"
9190 "#include E<lt>unistd.hE<gt>\n"
9191 "#include E<lt>stdio.hE<gt>\n"
9192 "#include E<lt>signal.hE<gt>\n"
9193 "#include E<lt>time.hE<gt>\n"
9194 msgstr ""
9195
9196 #. type: Plain text
9197 #: build/C/man2/timer_create.2:303
9198 #, no-wrap
9199 msgid ""
9200 "#define CLOCKID CLOCK_REALTIME\n"
9201 "#define SIG SIGRTMIN\n"
9202 msgstr ""
9203
9204 #. type: Plain text
9205 #: build/C/man2/timer_create.2:306
9206 #, no-wrap
9207 msgid ""
9208 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
9209 "                        } while (0)\n"
9210 msgstr ""
9211
9212 #. type: Plain text
9213 #: build/C/man2/timer_create.2:312
9214 #, no-wrap
9215 msgid ""
9216 "static void\n"
9217 "print_siginfo(siginfo_t *si)\n"
9218 "{\n"
9219 "    timer_t *tidp;\n"
9220 "    int or;\n"
9221 msgstr ""
9222
9223 #. type: Plain text
9224 #: build/C/man2/timer_create.2:314
9225 #, no-wrap
9226 msgid "    tidp = si-E<gt>si_value.sival_ptr;\n"
9227 msgstr ""
9228
9229 #. type: Plain text
9230 #: build/C/man2/timer_create.2:317
9231 #, no-wrap
9232 msgid ""
9233 "    printf(\"    sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n"
9234 "    printf(\"    *sival_ptr = 0x%lx\\en\", (long) *tidp);\n"
9235 msgstr ""
9236
9237 #. type: Plain text
9238 #: build/C/man2/timer_create.2:324
9239 #, no-wrap
9240 msgid ""
9241 "    or = timer_getoverrun(*tidp);\n"
9242 "    if (or == -1)\n"
9243 "        errExit(\"timer_getoverrun\");\n"
9244 "    else\n"
9245 "        printf(\"    overrun count = %d\\en\", or);\n"
9246 "}\n"
9247 msgstr ""
9248
9249 #. type: Plain text
9250 #: build/C/man2/timer_create.2:331
9251 #, no-wrap
9252 msgid ""
9253 "static void\n"
9254 "handler(int sig, siginfo_t *si, void *uc)\n"
9255 "{\n"
9256 "    /* Note: calling printf() from a signal handler is not\n"
9257 "       strictly correct, since printf() is not async-signal-safe;\n"
9258 "       see signal(7) */\n"
9259 msgstr ""
9260
9261 #. type: Plain text
9262 #: build/C/man2/timer_create.2:336
9263 #, no-wrap
9264 msgid ""
9265 "    printf(\"Caught signal %d\\en\", sig);\n"
9266 "    print_siginfo(si);\n"
9267 "    signal(sig, SIG_IGN);\n"
9268 "}\n"
9269 msgstr ""
9270
9271 #. type: Plain text
9272 #: build/C/man2/timer_create.2:346
9273 #, no-wrap
9274 msgid ""
9275 "int\n"
9276 "main(int argc, char *argv[])\n"
9277 "{\n"
9278 "    timer_t timerid;\n"
9279 "    struct sigevent sev;\n"
9280 "    struct itimerspec its;\n"
9281 "    long long freq_nanosecs;\n"
9282 "    sigset_t mask;\n"
9283 "    struct sigaction sa;\n"
9284 msgstr ""
9285
9286 #. type: Plain text
9287 #: build/C/man2/timer_create.2:352
9288 #, no-wrap
9289 msgid ""
9290 "    if (argc != 3) {\n"
9291 "        fprintf(stderr, \"Usage: %s E<lt>sleep-secsE<gt> "
9292 "E<lt>freq-nanosecsE<gt>\\en\",\n"
9293 "                argv[0]);\n"
9294 "        exit(EXIT_FAILURE);\n"
9295 "    }\n"
9296 msgstr ""
9297
9298 #. type: Plain text
9299 #: build/C/man2/timer_create.2:354
9300 #, no-wrap
9301 msgid "    /* Establish handler for timer signal */\n"
9302 msgstr ""
9303
9304 #. type: Plain text
9305 #: build/C/man2/timer_create.2:361
9306 #, no-wrap
9307 msgid ""
9308 "    printf(\"Establishing handler for signal %d\\en\", SIG);\n"
9309 "    sa.sa_flags = SA_SIGINFO;\n"
9310 "    sa.sa_sigaction = handler;\n"
9311 "    sigemptyset(&sa.sa_mask);\n"
9312 "    if (sigaction(SIG, &sa, NULL) == -1)\n"
9313 "        errExit(\"sigaction\");\n"
9314 msgstr ""
9315
9316 #. type: Plain text
9317 #: build/C/man2/timer_create.2:363
9318 #, no-wrap
9319 msgid "    /* Block timer signal temporarily */\n"
9320 msgstr ""
9321
9322 #. type: Plain text
9323 #: build/C/man2/timer_create.2:369
9324 #, no-wrap
9325 msgid ""
9326 "    printf(\"Blocking signal %d\\en\", SIG);\n"
9327 "    sigemptyset(&mask);\n"
9328 "    sigaddset(&mask, SIG);\n"
9329 "    if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n"
9330 "        errExit(\"sigprocmask\");\n"
9331 msgstr ""
9332
9333 #. type: Plain text
9334 #: build/C/man2/timer_create.2:371
9335 #, no-wrap
9336 msgid "    /* Create the timer */\n"
9337 msgstr ""
9338
9339 #. type: Plain text
9340 #: build/C/man2/timer_create.2:377
9341 #, no-wrap
9342 msgid ""
9343 "    sev.sigev_notify = SIGEV_SIGNAL;\n"
9344 "    sev.sigev_signo = SIG;\n"
9345 "    sev.sigev_value.sival_ptr = &timerid;\n"
9346 "    if (timer_create(CLOCKID, &sev, &timerid) == -1)\n"
9347 "        errExit(\"timer_create\");\n"
9348 msgstr ""
9349
9350 #. type: Plain text
9351 #: build/C/man2/timer_create.2:379
9352 #, no-wrap
9353 msgid "    printf(\"timer ID is 0x%lx\\en\", (long) timerid);\n"
9354 msgstr ""
9355
9356 #. type: Plain text
9357 #: build/C/man2/timer_create.2:381
9358 #, no-wrap
9359 msgid "    /* Start the timer */\n"
9360 msgstr ""
9361
9362 #. type: Plain text
9363 #: build/C/man2/timer_create.2:387
9364 #, no-wrap
9365 msgid ""
9366 "    freq_nanosecs = atoll(argv[2]);\n"
9367 "    its.it_value.tv_sec = freq_nanosecs / 1000000000;\n"
9368 "    its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n"
9369 "    its.it_interval.tv_sec = its.it_value.tv_sec;\n"
9370 "    its.it_interval.tv_nsec = its.it_value.tv_nsec;\n"
9371 msgstr ""
9372
9373 #. type: Plain text
9374 #: build/C/man2/timer_create.2:390
9375 #, no-wrap
9376 msgid ""
9377 "    if (timer_settime(timerid, 0, &its, NULL) == -1)\n"
9378 "         errExit(\"timer_settime\");\n"
9379 msgstr ""
9380
9381 #. type: Plain text
9382 #: build/C/man2/timer_create.2:393
9383 #, no-wrap
9384 msgid ""
9385 "    /* Sleep for a while; meanwhile, the timer may expire\n"
9386 "       multiple times */\n"
9387 msgstr ""
9388
9389 #. type: Plain text
9390 #: build/C/man2/timer_create.2:396
9391 #, no-wrap
9392 msgid ""
9393 "    printf(\"Sleeping for %d seconds\\en\", atoi(argv[1]));\n"
9394 "    sleep(atoi(argv[1]));\n"
9395 msgstr ""
9396
9397 #. type: Plain text
9398 #: build/C/man2/timer_create.2:399
9399 #, no-wrap
9400 msgid ""
9401 "    /* Unlock the timer signal, so that timer notification\n"
9402 "       can be delivered */\n"
9403 msgstr ""
9404
9405 #. type: Plain text
9406 #: build/C/man2/timer_create.2:403
9407 #, no-wrap
9408 msgid ""
9409 "    printf(\"Unblocking signal %d\\en\", SIG);\n"
9410 "    if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n"
9411 "        errExit(\"sigprocmask\");\n"
9412 msgstr ""
9413
9414 #. type: Plain text
9415 #: build/C/man2/timer_create.2:406 build/C/man2/timerfd_create.2:540
9416 #, no-wrap
9417 msgid ""
9418 "    exit(EXIT_SUCCESS);\n"
9419 "}\n"
9420 msgstr ""
9421
9422 #. type: Plain text
9423 #: build/C/man2/timer_create.2:422
9424 msgid ""
9425 "B<clock_gettime>(2), B<setitimer>(2), B<timer_delete>(2), "
9426 "B<timer_getoverrun>(2), B<timer_settime>(2), B<timerfd_create>(2), "
9427 "B<clock_getcpuclockid>(3), B<pthread_getcpuclockid>(3), B<pthreads>(7), "
9428 "B<sigevent>(7), B<signal>(7), B<time>(7)"
9429 msgstr ""
9430
9431 #. type: TH
9432 #: build/C/man2/timer_delete.2:26
9433 #, no-wrap
9434 msgid "TIMER_DELETE"
9435 msgstr ""
9436
9437 #. type: TH
9438 #: build/C/man2/timer_delete.2:26 build/C/man2/timer_getoverrun.2:26
9439 #, no-wrap
9440 msgid "2009-02-20"
9441 msgstr ""
9442
9443 #. type: Plain text
9444 #: build/C/man2/timer_delete.2:29
9445 msgid "timer_delete - delete a POSIX per-process timer"
9446 msgstr ""
9447
9448 #. type: Plain text
9449 #: build/C/man2/timer_delete.2:32 build/C/man2/timer_getoverrun.2:32 build/C/man2/timer_settime.2:33
9450 #, no-wrap
9451 msgid "B<#include E<lt>time.hE<gt>>\n"
9452 msgstr ""
9453
9454 #. type: Plain text
9455 #: build/C/man2/timer_delete.2:34
9456 #, no-wrap
9457 msgid "B<int timer_delete(timer_t >I<timerid>B<);>\n"
9458 msgstr ""
9459
9460 #. type: Plain text
9461 #: build/C/man2/timer_delete.2:45
9462 msgid "B<timer_delete>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
9463 msgstr ""
9464
9465 #. type: Plain text
9466 #: build/C/man2/timer_delete.2:53
9467 msgid ""
9468 "B<timer_delete>()  deletes the timer whose ID is given in I<timerid>.  If "
9469 "the timer was armed at the time of this call, it is disarmed before being "
9470 "deleted.  The treatment of any pending signal generated by the deleted timer "
9471 "is unspecified."
9472 msgstr ""
9473
9474 #. type: Plain text
9475 #: build/C/man2/timer_delete.2:60
9476 msgid ""
9477 "On success, B<timer_delete>()  returns 0.  On failure, -1 is returned, and "
9478 "I<errno> is set to indicate the error."
9479 msgstr ""
9480
9481 #. type: Plain text
9482 #: build/C/man2/timer_delete.2:65 build/C/man2/timer_getoverrun.2:95
9483 msgid "I<timerid> is not a valid timer ID."
9484 msgstr ""
9485
9486 #. type: Plain text
9487 #: build/C/man2/timer_delete.2:75
9488 msgid ""
9489 "B<clock_gettime>(2), B<timer_create>(2), B<timer_getoverrun>(2), "
9490 "B<timer_settime>(2), B<time>(7)"
9491 msgstr ""
9492
9493 #. type: TH
9494 #: build/C/man2/timer_getoverrun.2:26
9495 #, no-wrap
9496 msgid "TIMER_GETOVERRUN"
9497 msgstr ""
9498
9499 #. type: Plain text
9500 #: build/C/man2/timer_getoverrun.2:29
9501 msgid "timer_getoverrun - get overrun count for a POSIX per-process timer"
9502 msgstr ""
9503
9504 #. type: Plain text
9505 #: build/C/man2/timer_getoverrun.2:34
9506 #, no-wrap
9507 msgid "B<int timer_getoverrun(timer_t >I<timerid>B<);>\n"
9508 msgstr ""
9509
9510 #. type: Plain text
9511 #: build/C/man2/timer_getoverrun.2:45
9512 msgid "B<timer_getoverrun>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
9513 msgstr ""
9514
9515 #. type: Plain text
9516 #: build/C/man2/timer_getoverrun.2:56
9517 msgid ""
9518 "B<timer_getoverrun>()  returns the \"overrun count\" for the timer referred "
9519 "to by I<timerid>.  An application can use the overrun count to accurately "
9520 "calculate the number of timer expirations that would have occurred over a "
9521 "given time interval.  Timer overruns can occur both when receiving "
9522 "expiration notifications via signals (B<SIGEV_SIGNAL>), and via threads "
9523 "(B<SIGEV_THREAD>)."
9524 msgstr ""
9525
9526 #. type: Plain text
9527 #: build/C/man2/timer_getoverrun.2:76
9528 msgid ""
9529 "When expiration notifications are delivered via a signal, overruns can occur "
9530 "as follows.  Regardless of whether or not a real-time signal is used for "
9531 "timer notifications, the system queues at most one signal per timer.  (This "
9532 "is the behavior specified by POSIX.1-2001.  The alternative, queuing one "
9533 "signal for each timer expiration, could easily result in overflowing the "
9534 "allowed limits for queued signals on the system.)  Because of system "
9535 "scheduling delays, or because the signal may be temporarily blocked, there "
9536 "can be a delay between the time when the notification signal is generated "
9537 "and the time when it is delivered (e.g., caught by a signal handler) or "
9538 "accepted (e.g., using B<sigwaitinfo>(2)).  In this interval, further timer "
9539 "expirations may occur.  The timer overrun count is the number of additional "
9540 "timer expirations that occurred between the time when the signal was "
9541 "generated and when it was delivered or accepted."
9542 msgstr ""
9543
9544 #. type: Plain text
9545 #: build/C/man2/timer_getoverrun.2:82
9546 msgid ""
9547 "Timer overruns can also occur when expiration notifications are delivered "
9548 "via invocation of a thread, since there may be an arbitrary delay between an "
9549 "expiration of the timer and the invocation of the notification thread, and "
9550 "in that delay interval, additional timer expirations may occur."
9551 msgstr ""
9552
9553 #. type: Plain text
9554 #: build/C/man2/timer_getoverrun.2:90
9555 msgid ""
9556 "On success, B<timer_getoverrun>()  returns the overrun count of the "
9557 "specified timer; this count may be 0 if no overruns have occurred.  On "
9558 "failure, -1 is returned, and I<errno> is set to indicate the error."
9559 msgstr ""
9560
9561 #. type: Plain text
9562 #: build/C/man2/timer_getoverrun.2:111
9563 msgid ""
9564 "When timer notifications are delivered via signals (B<SIGEV_SIGNAL>), on "
9565 "Linux it is also possible to obtain the overrun count via the I<si_overrun> "
9566 "field of the I<siginfo_t> structure (see B<sigaction>(2)).  This allows an "
9567 "application to avoid the overhead of making a system call to obtain the "
9568 "overrun count, but is a nonportable extension to POSIX.1-2001."
9569 msgstr ""
9570
9571 #.  FIXME . Austin bug filed, 11 Feb 09
9572 #. type: Plain text
9573 #: build/C/man2/timer_getoverrun.2:115
9574 msgid ""
9575 "POSIX.1-2001 discusses timer overruns only in the context of timer "
9576 "notifications using signals."
9577 msgstr ""
9578
9579 #.  Bug filed: http://bugzilla.kernel.org/show_bug.cgi?id=12665
9580 #.  http://thread.gmane.org/gmane.linux.kernel/113276/
9581 #. type: Plain text
9582 #: build/C/man2/timer_getoverrun.2:128
9583 msgid ""
9584 "POSIX.1-2001 specifies that if the timer overrun count is equal to or "
9585 "greater than an implementation-defined maximum, B<DELAYTIMER_MAX>, then "
9586 "B<timer_getoverrun>()  should return B<DELAYTIMER_MAX>.  However, Linux does "
9587 "not implement this feature: instead, if the timer overrun value exceeds the "
9588 "maximum representable integer, the counter cycles, starting once more from "
9589 "low values."
9590 msgstr ""
9591
9592 #. type: Plain text
9593 #: build/C/man2/timer_getoverrun.2:131 build/C/man2/timer_settime.2:212
9594 msgid "See B<timer_create>(2)."
9595 msgstr ""
9596
9597 #. type: Plain text
9598 #: build/C/man2/timer_getoverrun.2:141
9599 msgid ""
9600 "B<clock_gettime>(2), B<sigaction>(2), B<signalfd>(2), B<sigwaitinfo>(2), "
9601 "B<timer_create>(2), B<timer_delete>(2), B<timer_settime>(2), B<signal>(7), "
9602 "B<time>(7)"
9603 msgstr ""
9604
9605 #. type: TH
9606 #: build/C/man2/timer_settime.2:26
9607 #, no-wrap
9608 msgid "TIMER_SETTIME"
9609 msgstr ""
9610
9611 #. type: TH
9612 #: build/C/man2/timer_settime.2:26
9613 #, no-wrap
9614 msgid "2012-10-15"
9615 msgstr ""
9616
9617 #. type: Plain text
9618 #: build/C/man2/timer_settime.2:30
9619 msgid ""
9620 "timer_settime, timer_gettime - arm/disarm and fetch state of POSIX "
9621 "per-process timer"
9622 msgstr ""
9623
9624 #. type: Plain text
9625 #: build/C/man2/timer_settime.2:38
9626 #, no-wrap
9627 msgid ""
9628 "B<int timer_settime(timer_t >I<timerid>B<, int >I<flags>B<,>\n"
9629 "B<                  const struct itimerspec *>I<new_value>B<,>\n"
9630 "B<                  struct itimerspec * >I<old_value>B<);>\n"
9631 "B<int timer_gettime(timer_t >I<timerid>B<, struct itimerspec "
9632 "*>I<curr_value>B<);>\n"
9633 msgstr ""
9634
9635 #. type: Plain text
9636 #: build/C/man2/timer_settime.2:50
9637 msgid "B<timer_settime>(), B<timer_gettime>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
9638 msgstr ""
9639
9640 #. type: Plain text
9641 #: build/C/man2/timer_settime.2:63
9642 msgid ""
9643 "B<timer_settime>()  arms or disarms the timer identified by I<timerid>.  The "
9644 "I<new_value> argument is pointer to an I<itimerspec> structure that "
9645 "specifies the new initial value and the new interval for the timer.  The "
9646 "I<itimerspec> structure is defined as follows:"
9647 msgstr ""
9648
9649 #. type: Plain text
9650 #: build/C/man2/timer_settime.2:70 build/C/man2/timerfd_create.2:128
9651 #, no-wrap
9652 msgid ""
9653 "struct timespec {\n"
9654 "    time_t tv_sec;                /* Seconds */\n"
9655 "    long   tv_nsec;               /* Nanoseconds */\n"
9656 "};\n"
9657 msgstr ""
9658
9659 #. type: Plain text
9660 #: build/C/man2/timer_settime.2:75
9661 #, no-wrap
9662 msgid ""
9663 "struct itimerspec {\n"
9664 "    struct timespec it_interval;  /* Timer interval */\n"
9665 "    struct timespec it_value;     /* Initial expiration */\n"
9666 "};\n"
9667 msgstr ""
9668
9669 #. type: Plain text
9670 #: build/C/man2/timer_settime.2:87
9671 msgid ""
9672 "Each of the substructures of the I<itimerspec> structure is a I<timespec> "
9673 "structure that allows a time value to be specified in seconds and "
9674 "nanoseconds.  These time values are measured according to the clock that was "
9675 "specified when the timer was created by B<timer_create>(2)."
9676 msgstr ""
9677
9678 #. type: Plain text
9679 #: build/C/man2/timer_settime.2:101
9680 msgid ""
9681 "If I<new_value-E<gt>it_value> specifies a nonzero value (i.e., either "
9682 "subfield is nonzero), then B<timer_settime>()  arms (starts) the timer, "
9683 "setting it to initially expire at the given time.  (If the timer was already "
9684 "armed, then the previous settings are overwritten.)  If "
9685 "I<new_value-E<gt>it_value> specifies a zero value (i.e., both subfields are "
9686 "zero), then the timer is disarmed."
9687 msgstr ""
9688
9689 #. type: Plain text
9690 #: build/C/man2/timer_settime.2:113
9691 msgid ""
9692 "The I<new_value-E<gt>it_interval> field specifies the period of the timer, "
9693 "in seconds and nanoseconds.  If this field is nonzero, then each time that "
9694 "an armed timer expires, the timer is reloaded from the value specified in "
9695 "I<new_value-E<gt>it_interval>.  If I<new_value-E<gt>it_interval> specifies a "
9696 "zero value, then the timer expires just once, at the time specified by "
9697 "I<it_value>."
9698 msgstr ""
9699
9700 #.  By experiment: the overrun count is set correctly, for CLOCK_REALTIME.
9701 #. type: Plain text
9702 #: build/C/man2/timer_settime.2:134
9703 msgid ""
9704 "By default, the initial expiration time specified in "
9705 "I<new_value-E<gt>it_value> is interpreted relative to the current time on "
9706 "the timer's clock at the time of the call.  This can be modified by "
9707 "specifying B<TIMER_ABSTIME> in I<flags>, in which case "
9708 "I<new_value-E<gt>it_value> is interpreted as an absolute value as measured "
9709 "on the timer's clock; that is, the timer will expire when the clock value "
9710 "reaches the value specified by I<new_value-E<gt>it_value>.  If the specified "
9711 "absolute time has already passed, then the timer expires immediately, and "
9712 "the overrun count (see B<timer_getoverrun>(2))  will be set correctly."
9713 msgstr ""
9714
9715 #.  Similar remarks might apply with respect to process and thread CPU time
9716 #.  clocks, but these clocks are not currently (2.6.28) settable on Linux.
9717 #. type: Plain text
9718 #: build/C/man2/timer_settime.2:144
9719 msgid ""
9720 "If the value of the B<CLOCK_REALTIME> clock is adjusted while an absolute "
9721 "timer based on that clock is armed, then the expiration of the timer will be "
9722 "appropriately adjusted.  Adjustments to the B<CLOCK_REALTIME> clock have no "
9723 "effect on relative timers based on that clock."
9724 msgstr ""
9725
9726 #. type: Plain text
9727 #: build/C/man2/timer_settime.2:153
9728 msgid ""
9729 "If I<old_value> is not NULL, then it points to a buffer that is used to "
9730 "return the previous interval of the timer (in I<old_value-E<gt>it_interval>)  "
9731 "and the amount of time until the timer would previously have next expired "
9732 "(in I<old_value-E<gt>it_value>)."
9733 msgstr ""
9734
9735 #. type: Plain text
9736 #: build/C/man2/timer_settime.2:173
9737 msgid ""
9738 "B<timer_gettime>()  returns the time until next expiration, and the "
9739 "interval, for the timer specified by I<timerid>, in the buffer pointed to by "
9740 "I<curr_value>.  The time remaining until the next timer expiration is "
9741 "returned in I<curr_value-E<gt>it_value>; this is always a relative value, "
9742 "regardless of whether the B<TIMER_ABSTIME> flag was used when arming the "
9743 "timer.  If the value returned in I<curr_value-E<gt>it_value> is zero, then "
9744 "the timer is currently disarmed.  The timer interval is returned in "
9745 "I<curr_value-E<gt>it_interval>.  If the value returned in "
9746 "I<curr_value-E<gt>it_interval> is zero, then this is a \"one-shot\" timer."
9747 msgstr ""
9748
9749 #. type: Plain text
9750 #: build/C/man2/timer_settime.2:182
9751 msgid ""
9752 "On success, B<timer_settime>()  and B<timer_gettime>()  return 0.  On error, "
9753 "-1 is returned, and I<errno> is set to indicate the error."
9754 msgstr ""
9755
9756 #. type: Plain text
9757 #: build/C/man2/timer_settime.2:184
9758 msgid "These functions may fail with the following errors:"
9759 msgstr ""
9760
9761 #. type: Plain text
9762 #: build/C/man2/timer_settime.2:191
9763 msgid "I<new_value>, I<old_value>, or I<curr_value> is not a valid pointer."
9764 msgstr ""
9765
9766 #.  FIXME . eventually: invalid value in flags
9767 #. type: Plain text
9768 #: build/C/man2/timer_settime.2:196
9769 msgid "I<timerid> is invalid."
9770 msgstr ""
9771
9772 #. type: Plain text
9773 #: build/C/man2/timer_settime.2:199
9774 msgid "B<timer_settime>()  may fail with the following errors:"
9775 msgstr ""
9776
9777 #. type: Plain text
9778 #: build/C/man2/timer_settime.2:205
9779 msgid ""
9780 "I<new_value.it_value> is negative; or I<new_value.it_value.tv_nsec> is "
9781 "negative or greater than 999,999,999."
9782 msgstr ""
9783
9784 #. type: Plain text
9785 #: build/C/man2/timer_settime.2:207
9786 msgid "These system calls are available since Linux 2.6."
9787 msgstr ""
9788
9789 #. type: Plain text
9790 #: build/C/man2/timer_settime.2:216
9791 msgid "B<timer_create>(2), B<timer_getoverrun>(2), B<time>(7)"
9792 msgstr ""
9793
9794 #. type: TH
9795 #: build/C/man2/timerfd_create.2:21
9796 #, no-wrap
9797 msgid "TIMERFD_CREATE"
9798 msgstr ""
9799
9800 #. type: TH
9801 #: build/C/man2/timerfd_create.2:21
9802 #, no-wrap
9803 msgid "2011-09-14"
9804 msgstr ""
9805
9806 #. type: Plain text
9807 #: build/C/man2/timerfd_create.2:25
9808 msgid ""
9809 "timerfd_create, timerfd_settime, timerfd_gettime - timers that notify via "
9810 "file descriptors"
9811 msgstr ""
9812
9813 #. type: Plain text
9814 #: build/C/man2/timerfd_create.2:28
9815 #, no-wrap
9816 msgid "B<#include E<lt>sys/timerfd.hE<gt>>\n"
9817 msgstr ""
9818
9819 #. type: Plain text
9820 #: build/C/man2/timerfd_create.2:30
9821 #, no-wrap
9822 msgid "B<int timerfd_create(int >I<clockid>B<, int >I<flags>B<);>\n"
9823 msgstr ""
9824
9825 #. type: Plain text
9826 #: build/C/man2/timerfd_create.2:34
9827 #, no-wrap
9828 msgid ""
9829 "B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n"
9830 "B<                    const struct itimerspec *>I<new_value>B<,>\n"
9831 "B<                    struct itimerspec *>I<old_value>B<);>\n"
9832 msgstr ""
9833
9834 #. type: Plain text
9835 #: build/C/man2/timerfd_create.2:36
9836 #, no-wrap
9837 msgid "B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n"
9838 msgstr ""
9839
9840 #. type: Plain text
9841 #: build/C/man2/timerfd_create.2:49
9842 msgid ""
9843 "These system calls create and operate on a timer that delivers timer "
9844 "expiration notifications via a file descriptor.  They provide an alternative "
9845 "to the use of B<setitimer>(2)  or B<timer_create>(2), with the advantage "
9846 "that the file descriptor may be monitored by B<select>(2), B<poll>(2), and "
9847 "B<epoll>(7)."
9848 msgstr ""
9849
9850 #. type: Plain text
9851 #: build/C/man2/timerfd_create.2:61
9852 msgid ""
9853 "The use of these three system calls is analogous to the use of "
9854 "B<timer_create>(2), B<timer_settime>(2), and B<timer_gettime>(2).  (There is "
9855 "no analog of B<timer_getoverrun>(2), since that functionality is provided by "
9856 "B<read>(2), as described below.)"
9857 msgstr ""
9858
9859 #. type: SS
9860 #: build/C/man2/timerfd_create.2:61
9861 #, no-wrap
9862 msgid "timerfd_create()"
9863 msgstr ""
9864
9865 #. type: Plain text
9866 #: build/C/man2/timerfd_create.2:80
9867 msgid ""
9868 "B<timerfd_create>()  creates a new timer object, and returns a file "
9869 "descriptor that refers to that timer.  The I<clockid> argument specifies the "
9870 "clock that is used to mark the progress of the timer, and must be either "
9871 "B<CLOCK_REALTIME> or B<CLOCK_MONOTONIC>.  B<CLOCK_REALTIME> is a settable "
9872 "system-wide clock.  B<CLOCK_MONOTONIC> is a nonsettable clock that is not "
9873 "affected by discontinuous changes in the system clock (e.g., manual changes "
9874 "to system time).  The current value of each of these clocks can be retrieved "
9875 "using B<clock_gettime>(2)."
9876 msgstr ""
9877
9878 #. type: Plain text
9879 #: build/C/man2/timerfd_create.2:85
9880 msgid ""
9881 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
9882 "I<flags> to change the behavior of B<timerfd_create>():"
9883 msgstr ""
9884
9885 #. type: TP
9886 #: build/C/man2/timerfd_create.2:85
9887 #, no-wrap
9888 msgid "B<TFD_NONBLOCK>"
9889 msgstr ""
9890
9891 #. type: TP
9892 #: build/C/man2/timerfd_create.2:93
9893 #, no-wrap
9894 msgid "B<TFD_CLOEXEC>"
9895 msgstr ""
9896
9897 #. type: Plain text
9898 #: build/C/man2/timerfd_create.2:107
9899 msgid ""
9900 "In Linux versions up to and including 2.6.26, I<flags> must be specified as "
9901 "zero."
9902 msgstr ""
9903
9904 #. type: SS
9905 #: build/C/man2/timerfd_create.2:107
9906 #, no-wrap
9907 msgid "timerfd_settime()"
9908 msgstr ""
9909
9910 #. type: Plain text
9911 #: build/C/man2/timerfd_create.2:112
9912 msgid ""
9913 "B<timerfd_settime>()  arms (starts) or disarms (stops)  the timer referred "
9914 "to by the file descriptor I<fd>."
9915 msgstr ""
9916
9917 #. type: Plain text
9918 #: build/C/man2/timerfd_create.2:121
9919 msgid ""
9920 "The I<new_value> argument specifies the initial expiration and interval for "
9921 "the timer.  The I<itimer> structure used for this argument contains two "
9922 "fields, each of which is in turn a structure of type I<timespec>:"
9923 msgstr ""
9924
9925 #. type: Plain text
9926 #: build/C/man2/timerfd_create.2:133
9927 #, no-wrap
9928 msgid ""
9929 "struct itimerspec {\n"
9930 "    struct timespec it_interval;  /* Interval for periodic timer */\n"
9931 "    struct timespec it_value;     /* Initial expiration */\n"
9932 "};\n"
9933 msgstr ""
9934
9935 #. type: Plain text
9936 #: build/C/man2/timerfd_create.2:145
9937 msgid ""
9938 "I<new_value.it_value> specifies the initial expiration of the timer, in "
9939 "seconds and nanoseconds.  Setting either field of I<new_value.it_value> to a "
9940 "nonzero value arms the timer.  Setting both fields of I<new_value.it_value> "
9941 "to zero disarms the timer."
9942 msgstr ""
9943
9944 #. type: Plain text
9945 #: build/C/man2/timerfd_create.2:154
9946 msgid ""
9947 "Setting one or both fields of I<new_value.it_interval> to nonzero values "
9948 "specifies the period, in seconds and nanoseconds, for repeated timer "
9949 "expirations after the initial expiration.  If both fields of "
9950 "I<new_value.it_interval> are zero, the timer expires just once, at the time "
9951 "specified by I<new_value.it_value>."
9952 msgstr ""
9953
9954 #. type: Plain text
9955 #: build/C/man2/timerfd_create.2:170
9956 msgid ""
9957 "The I<flags> argument is either 0, to start a relative timer "
9958 "(I<new_value.it_value> specifies a time relative to the current value of the "
9959 "clock specified by I<clockid>), or B<TFD_TIMER_ABSTIME>, to start an "
9960 "absolute timer (I<new_value.it_value> specifies an absolute time for the "
9961 "clock specified by I<clockid>; that is, the timer will expire when the value "
9962 "of that clock reaches the value specified in I<new_value.it_value>)."
9963 msgstr ""
9964
9965 #. type: Plain text
9966 #: build/C/man2/timerfd_create.2:181
9967 msgid ""
9968 "If the I<old_value> argument is not NULL, then the I<itimerspec> structure "
9969 "that it points to is used to return the setting of the timer that was "
9970 "current at the time of the call; see the description of B<timerfd_gettime>()  "
9971 "following."
9972 msgstr ""
9973
9974 #. type: SS
9975 #: build/C/man2/timerfd_create.2:181
9976 #, no-wrap
9977 msgid "timerfd_gettime()"
9978 msgstr ""
9979
9980 #. type: Plain text
9981 #: build/C/man2/timerfd_create.2:190
9982 msgid ""
9983 "B<timerfd_gettime>()  returns, in I<curr_value>, an I<itimerspec> structure "
9984 "that contains the current setting of the timer referred to by the file "
9985 "descriptor I<fd>."
9986 msgstr ""
9987
9988 #. type: Plain text
9989 #: build/C/man2/timerfd_create.2:200
9990 msgid ""
9991 "The I<it_value> field returns the amount of time until the timer will next "
9992 "expire.  If both fields of this structure are zero, then the timer is "
9993 "currently disarmed.  This field always contains a relative value, regardless "
9994 "of whether the B<TFD_TIMER_ABSTIME> flag was specified when setting the "
9995 "timer."
9996 msgstr ""
9997
9998 #. type: Plain text
9999 #: build/C/man2/timerfd_create.2:207
10000 msgid ""
10001 "The I<it_interval> field returns the interval of the timer.  If both fields "
10002 "of this structure are zero, then the timer is set to expire just once, at "
10003 "the time specified by I<curr_value.it_value>."
10004 msgstr ""
10005
10006 #. type: SS
10007 #: build/C/man2/timerfd_create.2:207
10008 #, no-wrap
10009 msgid "Operating on a timer file descriptor"
10010 msgstr ""
10011
10012 #. type: Plain text
10013 #: build/C/man2/timerfd_create.2:211
10014 msgid ""
10015 "The file descriptor returned by B<timerfd_create>()  supports the following "
10016 "operations:"
10017 msgstr ""
10018
10019 #. type: Plain text
10020 #: build/C/man2/timerfd_create.2:225
10021 msgid ""
10022 "If the timer has already expired one or more times since its settings were "
10023 "last modified using B<timerfd_settime>(), or since the last successful "
10024 "B<read>(2), then the buffer given to B<read>(2)  returns an unsigned 8-byte "
10025 "integer (I<uint64_t>)  containing the number of expirations that have "
10026 "occurred.  (The returned value is in host byte order\\(emthat is, the native "
10027 "byte order for integers on the host machine.)"
10028 msgstr ""
10029
10030 #. type: Plain text
10031 #: build/C/man2/timerfd_create.2:238
10032 msgid ""
10033 "If no timer expirations have occurred at the time of the B<read>(2), then "
10034 "the call either blocks until the next timer expiration, or fails with the "
10035 "error B<EAGAIN> if the file descriptor has been made nonblocking (via the "
10036 "use of the B<fcntl>(2)  B<F_SETFL> operation to set the B<O_NONBLOCK> flag)."
10037 msgstr ""
10038
10039 #. type: Plain text
10040 #: build/C/man2/timerfd_create.2:244
10041 msgid ""
10042 "A B<read>(2)  will fail with the error B<EINVAL> if the size of the supplied "
10043 "buffer is less than 8 bytes."
10044 msgstr ""
10045
10046 #. type: Plain text
10047 #: build/C/man2/timerfd_create.2:255
10048 msgid ""
10049 "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the "
10050 "B<poll>(2)  B<POLLIN> flag)  if one or more timer expirations have occurred."
10051 msgstr ""
10052
10053 #. type: Plain text
10054 #: build/C/man2/timerfd_create.2:262
10055 msgid ""
10056 "The file descriptor also supports the other file-descriptor multiplexing "
10057 "APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
10058 msgstr ""
10059
10060 #. type: Plain text
10061 #: build/C/man2/timerfd_create.2:269
10062 msgid ""
10063 "When the file descriptor is no longer required it should be closed.  When "
10064 "all file descriptors associated with the same timer object have been closed, "
10065 "the timer is disarmed and its resources are freed by the kernel."
10066 msgstr ""
10067
10068 #. type: Plain text
10069 #: build/C/man2/timerfd_create.2:281
10070 msgid ""
10071 "After a B<fork>(2), the child inherits a copy of the file descriptor created "
10072 "by B<timerfd_create>().  The file descriptor refers to the same underlying "
10073 "timer object as the corresponding file descriptor in the parent, and "
10074 "B<read>(2)s in the child will return information about expirations of the "
10075 "timer."
10076 msgstr ""
10077
10078 #. type: Plain text
10079 #: build/C/man2/timerfd_create.2:287
10080 msgid ""
10081 "A file descriptor created by B<timerfd_create>()  is preserved across "
10082 "B<execve>(2), and continues to generate timer expirations if the timer was "
10083 "armed."
10084 msgstr ""
10085
10086 #. type: Plain text
10087 #: build/C/man2/timerfd_create.2:294
10088 msgid ""
10089 "On success, B<timerfd_create>()  returns a new file descriptor.  On error, "
10090 "-1 is returned and I<errno> is set to indicate the error."
10091 msgstr ""
10092
10093 #. type: Plain text
10094 #: build/C/man2/timerfd_create.2:302
10095 msgid ""
10096 "B<timerfd_settime>()  and B<timerfd_gettime>()  return 0 on success; on "
10097 "error they return -1, and set I<errno> to indicate the error."
10098 msgstr ""
10099
10100 #. type: Plain text
10101 #: build/C/man2/timerfd_create.2:305
10102 msgid "B<timerfd_create>()  can fail with the following errors:"
10103 msgstr ""
10104
10105 #. type: Plain text
10106 #: build/C/man2/timerfd_create.2:313
10107 msgid "The I<clockid> argument is neither B<CLOCK_MONOTONIC> nor B<CLOCK_REALTIME>;"
10108 msgstr ""
10109
10110 #. type: Plain text
10111 #: build/C/man2/timerfd_create.2:333
10112 msgid "There was insufficient kernel memory to create the timer."
10113 msgstr ""
10114
10115 #. type: Plain text
10116 #: build/C/man2/timerfd_create.2:338
10117 msgid ""
10118 "B<timerfd_settime>()  and B<timerfd_gettime>()  can fail with the following "
10119 "errors:"
10120 msgstr ""
10121
10122 #. type: Plain text
10123 #: build/C/man2/timerfd_create.2:342
10124 msgid "I<fd> is not a valid file descriptor."
10125 msgstr ""
10126
10127 #. type: Plain text
10128 #: build/C/man2/timerfd_create.2:353
10129 msgid "I<fd> is not a valid timerfd file descriptor."
10130 msgstr ""
10131
10132 #. type: Plain text
10133 #: build/C/man2/timerfd_create.2:356
10134 msgid "B<timerfd_settime>()  can also fail with the following errors:"
10135 msgstr ""
10136
10137 #. type: Plain text
10138 #: build/C/man2/timerfd_create.2:362
10139 msgid ""
10140 "I<new_value> is not properly initialized (one of the I<tv_nsec> falls "
10141 "outside the range zero to 999,999,999)."
10142 msgstr ""
10143
10144 #.  This case only checked since 2.6.29, and 2.2.2[78].some-stable-version.
10145 #.  In older kernel versions, no check was made for invalid flags.
10146 #. type: Plain text
10147 #: build/C/man2/timerfd_create.2:368
10148 msgid "I<flags> is invalid."
10149 msgstr ""
10150
10151 #. type: Plain text
10152 #: build/C/man2/timerfd_create.2:371
10153 msgid ""
10154 "These system calls are available on Linux since kernel 2.6.25.  Library "
10155 "support is provided by glibc since version 2.8."
10156 msgstr ""
10157
10158 #.  2.6.29
10159 #. type: Plain text
10160 #: build/C/man2/timerfd_create.2:379
10161 msgid ""
10162 "Currently, B<timerfd_create>()  supports fewer types of clock IDs than "
10163 "B<timer_create>(2)."
10164 msgstr ""
10165
10166 #. type: Plain text
10167 #: build/C/man2/timerfd_create.2:388
10168 msgid ""
10169 "The following program creates a timer and then monitors its progress.  The "
10170 "program accepts up to three command-line arguments.  The first argument "
10171 "specifies the number of seconds for the initial expiration of the timer.  "
10172 "The second argument specifies the interval for the timer, in seconds.  The "
10173 "third argument specifies the number of times the program should allow the "
10174 "timer to expire before terminating.  The second and third command-line "
10175 "arguments are optional."
10176 msgstr ""
10177
10178 #. type: Plain text
10179 #: build/C/man2/timerfd_create.2:390 build/C/man2/wait.2:570
10180 msgid "The following shell session demonstrates the use of the program:"
10181 msgstr ""
10182
10183 #. type: Plain text
10184 #: build/C/man2/timerfd_create.2:405
10185 #, no-wrap
10186 msgid ""
10187 "$B< a.out 3 1 100>\n"
10188 "0.000: timer started\n"
10189 "3.000: read: 1; total=1\n"
10190 "4.000: read: 1; total=2\n"
10191 "B<^Z >                 # type control-Z to suspend the program\n"
10192 "[1]+  Stopped                 ./timerfd3_demo 3 1 100\n"
10193 "$ B<fg>                # Resume execution after a few seconds\n"
10194 "a.out 3 1 100\n"
10195 "9.660: read: 5; total=7\n"
10196 "10.000: read: 1; total=8\n"
10197 "11.000: read: 1; total=9\n"
10198 "B<^C >                 # type control-C to suspend the program\n"
10199 msgstr ""
10200
10201 #.  The commented out code here is what we currently need until
10202 #.  the required stuff is in glibc
10203 #
10204 #
10205 #. /* Link with -lrt */
10206 #. #define _GNU_SOURCE
10207 #. #include <sys/syscall.h>
10208 #. #include <unistd.h>
10209 #. #include <time.h>
10210 #. #if defined(__i386__)
10211 #. #define __NR_timerfd_create 322
10212 #. #define __NR_timerfd_settime 325
10213 #. #define __NR_timerfd_gettime 326
10214 #. #endif
10215 #
10216 #. static int
10217 #. timerfd_create(int clockid, int flags)
10218 #. {
10219 #.     return syscall(__NR_timerfd_create, clockid, flags);
10220 #. }
10221 #
10222 #. static int
10223 #. timerfd_settime(int fd, int flags, struct itimerspec *new_value,
10224 #.         struct itimerspec *curr_value)
10225 #. {
10226 #.     return syscall(__NR_timerfd_settime, fd, flags, new_value,
10227 #.                    curr_value);
10228 #. }
10229 #
10230 #. static int
10231 #. timerfd_gettime(int fd, struct itimerspec *curr_value)
10232 #. {
10233 #.     return syscall(__NR_timerfd_gettime, fd, curr_value);
10234 #. }
10235 #
10236 #. #define TFD_TIMER_ABSTIME (1 << 0)
10237 #
10238 #. ////////////////////////////////////////////////////////////
10239 #. type: Plain text
10240 #: build/C/man2/timerfd_create.2:454
10241 #, no-wrap
10242 msgid ""
10243 "#include E<lt>sys/timerfd.hE<gt>\n"
10244 "#include E<lt>time.hE<gt>\n"
10245 "#include E<lt>unistd.hE<gt>\n"
10246 "#include E<lt>stdlib.hE<gt>\n"
10247 "#include E<lt>stdio.hE<gt>\n"
10248 "#include E<lt>stdint.hE<gt>        /* Definition of uint64_t */\n"
10249 msgstr ""
10250
10251 #. type: Plain text
10252 #: build/C/man2/timerfd_create.2:457
10253 #, no-wrap
10254 msgid ""
10255 "#define handle_error(msg) \\e\n"
10256 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
10257 msgstr ""
10258
10259 #. type: Plain text
10260 #: build/C/man2/timerfd_create.2:465
10261 #, no-wrap
10262 msgid ""
10263 "static void\n"
10264 "print_elapsed_time(void)\n"
10265 "{\n"
10266 "    static struct timespec start;\n"
10267 "    struct timespec curr;\n"
10268 "    static int first_call = 1;\n"
10269 "    int secs, nsecs;\n"
10270 msgstr ""
10271
10272 #. type: Plain text
10273 #: build/C/man2/timerfd_create.2:471
10274 #, no-wrap
10275 msgid ""
10276 "    if (first_call) {\n"
10277 "        first_call = 0;\n"
10278 "        if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
10279 "            handle_error(\"clock_gettime\");\n"
10280 "    }\n"
10281 msgstr ""
10282
10283 #. type: Plain text
10284 #: build/C/man2/timerfd_create.2:474
10285 #, no-wrap
10286 msgid ""
10287 "    if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
10288 "        handle_error(\"clock_gettime\");\n"
10289 msgstr ""
10290
10291 #. type: Plain text
10292 #: build/C/man2/timerfd_create.2:483
10293 #, no-wrap
10294 msgid ""
10295 "    secs = curr.tv_sec - start.tv_sec;\n"
10296 "    nsecs = curr.tv_nsec - start.tv_nsec;\n"
10297 "    if (nsecs E<lt> 0) {\n"
10298 "        secs--;\n"
10299 "        nsecs += 1000000000;\n"
10300 "    }\n"
10301 "    printf(\"%d.%03d: \", secs, (nsecs + 500000) / 1000000);\n"
10302 "}\n"
10303 msgstr ""
10304
10305 #. type: Plain text
10306 #: build/C/man2/timerfd_create.2:492
10307 #, no-wrap
10308 msgid ""
10309 "int\n"
10310 "main(int argc, char *argv[])\n"
10311 "{\n"
10312 "    struct itimerspec new_value;\n"
10313 "    int max_exp, fd;\n"
10314 "    struct timespec now;\n"
10315 "    uint64_t exp, tot_exp;\n"
10316 "    ssize_t s;\n"
10317 msgstr ""
10318
10319 #. type: Plain text
10320 #: build/C/man2/timerfd_create.2:498
10321 #, no-wrap
10322 msgid ""
10323 "    if ((argc != 2) && (argc != 4)) {\n"
10324 "        fprintf(stderr, \"%s init-secs [interval-secs max-exp]\\en\",\n"
10325 "                argv[0]);\n"
10326 "        exit(EXIT_FAILURE);\n"
10327 "    }\n"
10328 msgstr ""
10329
10330 #. type: Plain text
10331 #: build/C/man2/timerfd_create.2:501
10332 #, no-wrap
10333 msgid ""
10334 "    if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
10335 "        handle_error(\"clock_gettime\");\n"
10336 msgstr ""
10337
10338 #. type: Plain text
10339 #: build/C/man2/timerfd_create.2:504
10340 #, no-wrap
10341 msgid ""
10342 "    /* Create a CLOCK_REALTIME absolute timer with initial\n"
10343 "       expiration and interval as specified in command line */\n"
10344 msgstr ""
10345
10346 #. type: Plain text
10347 #: build/C/man2/timerfd_create.2:515
10348 #, no-wrap
10349 msgid ""
10350 "    new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
10351 "    new_value.it_value.tv_nsec = now.tv_nsec;\n"
10352 "    if (argc == 2) {\n"
10353 "        new_value.it_interval.tv_sec = 0;\n"
10354 "        max_exp = 1;\n"
10355 "    } else {\n"
10356 "        new_value.it_interval.tv_sec = atoi(argv[2]);\n"
10357 "        max_exp = atoi(argv[3]);\n"
10358 "    }\n"
10359 "    new_value.it_interval.tv_nsec = 0;\n"
10360 msgstr ""
10361
10362 #. type: Plain text
10363 #: build/C/man2/timerfd_create.2:519
10364 #, no-wrap
10365 msgid ""
10366 "    fd = timerfd_create(CLOCK_REALTIME, 0);\n"
10367 "    if (fd == -1)\n"
10368 "        handle_error(\"timerfd_create\");\n"
10369 msgstr ""
10370
10371 #. type: Plain text
10372 #: build/C/man2/timerfd_create.2:522
10373 #, no-wrap
10374 msgid ""
10375 "    if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
10376 "        handle_error(\"timerfd_settime\");\n"
10377 msgstr ""
10378
10379 #. type: Plain text
10380 #: build/C/man2/timerfd_create.2:525
10381 #, no-wrap
10382 msgid ""
10383 "    print_elapsed_time();\n"
10384 "    printf(\"timer started\\en\");\n"
10385 msgstr ""
10386
10387 #. type: Plain text
10388 #: build/C/man2/timerfd_create.2:530
10389 #, no-wrap
10390 msgid ""
10391 "    for (tot_exp = 0; tot_exp E<lt> max_exp;) {\n"
10392 "        s = read(fd, &exp, sizeof(uint64_t));\n"
10393 "        if (s != sizeof(uint64_t))\n"
10394 "            handle_error(\"read\");\n"
10395 msgstr ""
10396
10397 #. type: Plain text
10398 #: build/C/man2/timerfd_create.2:537
10399 #, no-wrap
10400 msgid ""
10401 "        tot_exp += exp;\n"
10402 "        print_elapsed_time();\n"
10403 "        printf(\"read: %llu; total=%llu\\en\",\n"
10404 "                (unsigned long long) exp,\n"
10405 "                (unsigned long long) tot_exp);\n"
10406 "    }\n"
10407 msgstr ""
10408
10409 #. type: Plain text
10410 #: build/C/man2/timerfd_create.2:553
10411 msgid ""
10412 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), "
10413 "B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), "
10414 "B<timer_settime>(2), B<epoll>(7), B<time>(7)"
10415 msgstr ""
10416
10417 #. type: TH
10418 #: build/C/man2/tkill.2:29
10419 #, no-wrap
10420 msgid "TKILL"
10421 msgstr ""
10422
10423 #. type: Plain text
10424 #: build/C/man2/tkill.2:32
10425 msgid "tkill, tgkill - send a signal to a thread"
10426 msgstr ""
10427
10428 #. type: Plain text
10429 #: build/C/man2/tkill.2:35
10430 #, no-wrap
10431 msgid "B<int tkill(int >I<tid>B<, int >I<sig>B<);>\n"
10432 msgstr ""
10433
10434 #. type: Plain text
10435 #: build/C/man2/tkill.2:37
10436 #, no-wrap
10437 msgid "B<int tgkill(int >I<tgid>B<, int >I<tid>B<, int >I<sig>B<);>\n"
10438 msgstr ""
10439
10440 #. type: Plain text
10441 #: build/C/man2/tkill.2:54
10442 msgid ""
10443 "B<tgkill>()  sends the signal I<sig> to the thread with the thread ID I<tid> "
10444 "in the thread group I<tgid>.  (By contrast, B<kill>(2)  can be used to send "
10445 "a signal only to a process (i.e., thread group)  as a whole, and the signal "
10446 "will be delivered to an arbitrary thread within that process.)"
10447 msgstr ""
10448
10449 #.  FIXME: Maybe say something about the following:
10450 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=12889
10451 #.      Rich Felker <bugdal@aerifal.cx>
10452 #.      There is a race condition in pthread_kill: it is possible that,
10453 #.      between the time pthread_kill reads the pid/tid from the target
10454 #.      thread descriptor and the time it makes the tgkill syscall,
10455 #.      the target thread terminates and the same tid gets assigned
10456 #.      to a new thread in the same process.
10457 #
10458 #.      (The tgkill syscall was designed to eliminate a similar race
10459 #.      condition in tkill, but it only succeeded in eliminating races
10460 #.      where the tid gets reused in a different process, and does not
10461 #.      help if the same tid gets assigned to a new thread in the
10462 #.      same process.)
10463 #
10464 #.      The only solution I can see is to introduce a mutex that ensures
10465 #.      that a thread cannot exit while pthread_kill is being called on it.
10466 #
10467 #.      Note that in most real-world situations, like almost all race
10468 #.      conditions, this one will be extremely rare. To make it
10469 #.      measurable, one could exhaust all but 1-2 available pid values,
10470 #.      possibly by lowering the max pid parameter in /proc, forcing
10471 #.      the same tid to be reused rapidly.
10472 #. type: Plain text
10473 #: build/C/man2/tkill.2:85
10474 msgid ""
10475 "B<tkill>()  is an obsolete predecessor to B<tgkill>().  It allows only the "
10476 "target thread ID to be specified, which may result in the wrong thread being "
10477 "signaled if a thread terminates and its thread ID is recycled.  Avoid using "
10478 "this system call."
10479 msgstr ""
10480
10481 #. type: Plain text
10482 #: build/C/man2/tkill.2:92
10483 msgid "If I<tgid> is specified as -1, B<tgkill>()  is equivalent to B<tkill>()."
10484 msgstr ""
10485
10486 #. type: Plain text
10487 #: build/C/man2/tkill.2:95
10488 msgid ""
10489 "These are the raw system call interfaces, meant for internal thread library "
10490 "use."
10491 msgstr ""
10492
10493 #. type: Plain text
10494 #: build/C/man2/tkill.2:103
10495 msgid "An invalid thread ID, thread group ID, or signal was specified."
10496 msgstr ""
10497
10498 #. type: Plain text
10499 #: build/C/man2/tkill.2:108
10500 msgid "Permission denied.  For the required permissions, see B<kill>(2)."
10501 msgstr ""
10502
10503 #. type: Plain text
10504 #: build/C/man2/tkill.2:111
10505 msgid "No process with the specified thread ID (and thread group ID) exists."
10506 msgstr ""
10507
10508 #. type: Plain text
10509 #: build/C/man2/tkill.2:116
10510 msgid ""
10511 "B<tkill>()  is supported since Linux 2.4.19 / 2.5.4.  B<tgkill>()  was added "
10512 "in Linux 2.5.75."
10513 msgstr ""
10514
10515 #. type: Plain text
10516 #: build/C/man2/tkill.2:122
10517 msgid ""
10518 "B<tkill>()  and B<tgkill>()  are Linux-specific and should not be used in "
10519 "programs that are intended to be portable."
10520 msgstr ""
10521
10522 #. type: Plain text
10523 #: build/C/man2/tkill.2:128
10524 msgid ""
10525 "See the description of B<CLONE_THREAD> in B<clone>(2)  for an explanation of "
10526 "thread groups."
10527 msgstr ""
10528
10529 #. type: Plain text
10530 #: build/C/man2/tkill.2:131
10531 msgid ""
10532 "Glibc does not provide wrappers for these system calls; call them using "
10533 "B<syscall>(2)."
10534 msgstr ""
10535
10536 #. type: Plain text
10537 #: build/C/man2/tkill.2:136
10538 msgid "B<clone>(2), B<gettid>(2), B<kill>(2), B<rt_sigqueueinfo>(2)"
10539 msgstr ""
10540
10541 #. type: TH
10542 #: build/C/man2/wait.2:49
10543 #, no-wrap
10544 msgid "WAIT"
10545 msgstr ""
10546
10547 #. type: Plain text
10548 #: build/C/man2/wait.2:52
10549 msgid "wait, waitpid, waitid - wait for process to change state"
10550 msgstr ""
10551
10552 #. type: Plain text
10553 #: build/C/man2/wait.2:54
10554 msgid "B<#include E<lt>sys/types.hE<gt>>"
10555 msgstr ""
10556
10557 #. type: Plain text
10558 #: build/C/man2/wait.2:56
10559 msgid "B<#include E<lt>sys/wait.hE<gt>>"
10560 msgstr ""
10561
10562 #. type: Plain text
10563 #: build/C/man2/wait.2:58
10564 msgid "B<pid_t wait(int *>I<status>B<);>"
10565 msgstr ""
10566
10567 #. type: Plain text
10568 #: build/C/man2/wait.2:60
10569 msgid "B<pid_t waitpid(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<);>"
10570 msgstr ""
10571
10572 #. type: Plain text
10573 #: build/C/man2/wait.2:65
10574 #, no-wrap
10575 msgid ""
10576 "B<int waitid(idtype_t >I<idtype>B<, id_t >I<id>B<, siginfo_t *>I<infop>B<, "
10577 "int >I<options>B<);>\n"
10578 "                /* This is the glibc and POSIX interface; see\n"
10579 "                   NOTES for information on the raw system call. */\n"
10580 msgstr ""
10581
10582 #. type: Plain text
10583 #: build/C/man2/wait.2:74
10584 msgid "B<waitid>():"
10585 msgstr ""
10586
10587 #. type: Plain text
10588 #: build/C/man2/wait.2:78
10589 msgid ""
10590 "_SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
10591 "_XOPEN_SOURCE_EXTENDED"
10592 msgstr ""
10593
10594 #. type: Plain text
10595 #: build/C/man2/wait.2:93
10596 msgid ""
10597 "All of these system calls are used to wait for state changes in a child of "
10598 "the calling process, and obtain information about the child whose state has "
10599 "changed.  A state change is considered to be: the child terminated; the "
10600 "child was stopped by a signal; or the child was resumed by a signal.  In the "
10601 "case of a terminated child, performing a wait allows the system to release "
10602 "the resources associated with the child; if a wait is not performed, then "
10603 "the terminated child remains in a \"zombie\" state (see NOTES below)."
10604 msgstr ""
10605
10606 #. type: Plain text
10607 #: build/C/man2/wait.2:105
10608 msgid ""
10609 "If a child has already changed state, then these calls return immediately.  "
10610 "Otherwise, they block until either a child changes state or a signal handler "
10611 "interrupts the call (assuming that system calls are not automatically "
10612 "restarted using the B<SA_RESTART> flag of B<sigaction>(2)).  In the "
10613 "remainder of this page, a child whose state has changed and which has not "
10614 "yet been waited upon by one of these system calls is termed I<waitable>."
10615 msgstr ""
10616
10617 #. type: SS
10618 #: build/C/man2/wait.2:105
10619 #, no-wrap
10620 msgid "wait() and waitpid()"
10621 msgstr ""
10622
10623 #. type: Plain text
10624 #: build/C/man2/wait.2:113
10625 msgid ""
10626 "The B<wait>()  system call suspends execution of the calling process until "
10627 "one of its children terminates.  The call I<wait(&status)> is equivalent to:"
10628 msgstr ""
10629
10630 #. type: Plain text
10631 #: build/C/man2/wait.2:116
10632 #, no-wrap
10633 msgid "    waitpid(-1, &status, 0);\n"
10634 msgstr ""
10635
10636 #. type: Plain text
10637 #: build/C/man2/wait.2:130
10638 msgid ""
10639 "The B<waitpid>()  system call suspends execution of the calling process "
10640 "until a child specified by I<pid> argument has changed state.  By default, "
10641 "B<waitpid>()  waits only for terminated children, but this behavior is "
10642 "modifiable via the I<options> argument, as described below."
10643 msgstr ""
10644
10645 #. type: Plain text
10646 #: build/C/man2/wait.2:134
10647 msgid "The value of I<pid> can be:"
10648 msgstr ""
10649
10650 #. type: IP
10651 #: build/C/man2/wait.2:134
10652 #, no-wrap
10653 msgid "E<lt> -1"
10654 msgstr ""
10655
10656 #. type: Plain text
10657 #: build/C/man2/wait.2:138
10658 msgid ""
10659 "meaning wait for any child process whose process group ID is equal to the "
10660 "absolute value of I<pid>."
10661 msgstr ""
10662
10663 #. type: IP
10664 #: build/C/man2/wait.2:138
10665 #, no-wrap
10666 msgid "-1"
10667 msgstr ""
10668
10669 #. type: Plain text
10670 #: build/C/man2/wait.2:140
10671 msgid "meaning wait for any child process."
10672 msgstr ""
10673
10674 #. type: IP
10675 #: build/C/man2/wait.2:140
10676 #, no-wrap
10677 msgid "0"
10678 msgstr ""
10679
10680 #. type: Plain text
10681 #: build/C/man2/wait.2:143
10682 msgid ""
10683 "meaning wait for any child process whose process group ID is equal to that "
10684 "of the calling process."
10685 msgstr ""
10686
10687 #. type: IP
10688 #: build/C/man2/wait.2:143
10689 #, no-wrap
10690 msgid "E<gt> 0"
10691 msgstr ""
10692
10693 #. type: Plain text
10694 #: build/C/man2/wait.2:147
10695 msgid "meaning wait for the child whose process ID is equal to the value of I<pid>."
10696 msgstr ""
10697
10698 #. type: Plain text
10699 #: build/C/man2/wait.2:151
10700 msgid "The value of I<options> is an OR of zero or more of the following constants:"
10701 msgstr ""
10702
10703 #. type: TP
10704 #: build/C/man2/wait.2:151 build/C/man2/wait.2:280
10705 #, no-wrap
10706 msgid "B<WNOHANG>"
10707 msgstr ""
10708
10709 #. type: Plain text
10710 #: build/C/man2/wait.2:154
10711 msgid "return immediately if no child has exited."
10712 msgstr ""
10713
10714 #. type: TP
10715 #: build/C/man2/wait.2:154
10716 #, no-wrap
10717 msgid "B<WUNTRACED>"
10718 msgstr ""
10719
10720 #. type: Plain text
10721 #: build/C/man2/wait.2:163
10722 msgid ""
10723 "also return if a child has stopped (but not traced via B<ptrace>(2)).  "
10724 "Status for I<traced> children which have stopped is provided even if this "
10725 "option is not specified."
10726 msgstr ""
10727
10728 #. type: TP
10729 #: build/C/man2/wait.2:163
10730 #, no-wrap
10731 msgid "B<WCONTINUED> (since Linux 2.6.10)"
10732 msgstr ""
10733
10734 #. type: Plain text
10735 #: build/C/man2/wait.2:167
10736 msgid "also return if a stopped child has been resumed by delivery of B<SIGCONT>."
10737 msgstr ""
10738
10739 #. type: Plain text
10740 #: build/C/man2/wait.2:169
10741 msgid "(For Linux-only options, see below.)"
10742 msgstr ""
10743
10744 #. type: Plain text
10745 #: build/C/man2/wait.2:183
10746 msgid ""
10747 "If I<status> is not NULL, B<wait>()  and B<waitpid>()  store status "
10748 "information in the I<int> to which it points.  This integer can be inspected "
10749 "with the following macros (which take the integer itself as an argument, not "
10750 "a pointer to it, as is done in B<wait>()  and B<waitpid>()!):"
10751 msgstr ""
10752
10753 #. type: TP
10754 #: build/C/man2/wait.2:183
10755 #, no-wrap
10756 msgid "B<WIFEXITED(>I<status>B<)>"
10757 msgstr ""
10758
10759 #. type: Plain text
10760 #: build/C/man2/wait.2:191
10761 msgid ""
10762 "returns true if the child terminated normally, that is, by calling "
10763 "B<exit>(3)  or B<_exit>(2), or by returning from main()."
10764 msgstr ""
10765
10766 #. type: TP
10767 #: build/C/man2/wait.2:191
10768 #, no-wrap
10769 msgid "B<WEXITSTATUS(>I<status>B<)>"
10770 msgstr ""
10771
10772 #. type: Plain text
10773 #: build/C/man2/wait.2:204
10774 msgid ""
10775 "returns the exit status of the child.  This consists of the least "
10776 "significant 8 bits of the I<status> argument that the child specified in a "
10777 "call to B<exit>(3)  or B<_exit>(2)  or as the argument for a return "
10778 "statement in main().  This macro should be employed only if B<WIFEXITED> "
10779 "returned true."
10780 msgstr ""
10781
10782 #. type: TP
10783 #: build/C/man2/wait.2:204
10784 #, no-wrap
10785 msgid "B<WIFSIGNALED(>I<status>B<)>"
10786 msgstr ""
10787
10788 #. type: Plain text
10789 #: build/C/man2/wait.2:207
10790 msgid "returns true if the child process was terminated by a signal."
10791 msgstr ""
10792
10793 #. type: TP
10794 #: build/C/man2/wait.2:207
10795 #, no-wrap
10796 msgid "B<WTERMSIG(>I<status>B<)>"
10797 msgstr ""
10798
10799 #. type: Plain text
10800 #: build/C/man2/wait.2:214
10801 msgid ""
10802 "returns the number of the signal that caused the child process to "
10803 "terminate.  This macro should be employed only if B<WIFSIGNALED> returned "
10804 "true."
10805 msgstr ""
10806
10807 #. type: TP
10808 #: build/C/man2/wait.2:214
10809 #, no-wrap
10810 msgid "B<WCOREDUMP(>I<status>B<)>"
10811 msgstr ""
10812
10813 #. type: Plain text
10814 #: build/C/man2/wait.2:223
10815 msgid ""
10816 "returns true if the child produced a core dump.  This macro should be "
10817 "employed only if B<WIFSIGNALED> returned true.  This macro is not specified "
10818 "in POSIX.1-2001 and is not available on some UNIX implementations (e.g., "
10819 "AIX, SunOS).  Only use this enclosed in #ifdef WCOREDUMP ... #endif."
10820 msgstr ""
10821
10822 #. type: TP
10823 #: build/C/man2/wait.2:223
10824 #, no-wrap
10825 msgid "B<WIFSTOPPED(>I<status>B<)>"
10826 msgstr ""
10827
10828 #. type: Plain text
10829 #: build/C/man2/wait.2:230
10830 msgid ""
10831 "returns true if the child process was stopped by delivery of a signal; this "
10832 "is possible only if the call was done using B<WUNTRACED> or when the child "
10833 "is being traced (see B<ptrace>(2))."
10834 msgstr ""
10835
10836 #. type: TP
10837 #: build/C/man2/wait.2:230
10838 #, no-wrap
10839 msgid "B<WSTOPSIG(>I<status>B<)>"
10840 msgstr ""
10841
10842 #. type: Plain text
10843 #: build/C/man2/wait.2:236
10844 msgid ""
10845 "returns the number of the signal which caused the child to stop.  This macro "
10846 "should be employed only if B<WIFSTOPPED> returned true."
10847 msgstr ""
10848
10849 #. type: TP
10850 #: build/C/man2/wait.2:236
10851 #, no-wrap
10852 msgid "B<WIFCONTINUED(>I<status>B<)>"
10853 msgstr ""
10854
10855 #. type: Plain text
10856 #: build/C/man2/wait.2:241
10857 msgid ""
10858 "(since Linux 2.6.10)  returns true if the child process was resumed by "
10859 "delivery of B<SIGCONT>."
10860 msgstr ""
10861
10862 #. type: SS
10863 #: build/C/man2/wait.2:241
10864 #, no-wrap
10865 msgid "waitid()"
10866 msgstr ""
10867
10868 #. type: Plain text
10869 #: build/C/man2/wait.2:246
10870 msgid ""
10871 "The B<waitid>()  system call (available since Linux 2.6.9) provides more "
10872 "precise control over which child state changes to wait for."
10873 msgstr ""
10874
10875 #. type: Plain text
10876 #: build/C/man2/wait.2:252
10877 msgid ""
10878 "The I<idtype> and I<id> arguments select the child(ren) to wait for, as "
10879 "follows:"
10880 msgstr ""
10881
10882 #. type: IP
10883 #: build/C/man2/wait.2:252
10884 #, no-wrap
10885 msgid "I<idtype> == B<P_PID>"
10886 msgstr ""
10887
10888 #. type: Plain text
10889 #: build/C/man2/wait.2:255
10890 msgid "Wait for the child whose process ID matches I<id>."
10891 msgstr ""
10892
10893 #. type: IP
10894 #: build/C/man2/wait.2:255
10895 #, no-wrap
10896 msgid "I<idtype> == B<P_PGID>"
10897 msgstr ""
10898
10899 #. type: Plain text
10900 #: build/C/man2/wait.2:258
10901 msgid "Wait for any child whose process group ID matches I<id>."
10902 msgstr ""
10903
10904 #. type: IP
10905 #: build/C/man2/wait.2:258
10906 #, no-wrap
10907 msgid "I<idtype> == B<P_ALL>"
10908 msgstr ""
10909
10910 #. type: Plain text
10911 #: build/C/man2/wait.2:262
10912 msgid "Wait for any child; I<id> is ignored."
10913 msgstr ""
10914
10915 #. type: Plain text
10916 #: build/C/man2/wait.2:266
10917 msgid ""
10918 "The child state changes to wait for are specified by ORing one or more of "
10919 "the following flags in I<options>:"
10920 msgstr ""
10921
10922 #. type: TP
10923 #: build/C/man2/wait.2:266
10924 #, no-wrap
10925 msgid "B<WEXITED>"
10926 msgstr ""
10927
10928 #. type: Plain text
10929 #: build/C/man2/wait.2:269
10930 msgid "Wait for children that have terminated."
10931 msgstr ""
10932
10933 #. type: TP
10934 #: build/C/man2/wait.2:269
10935 #, no-wrap
10936 msgid "B<WSTOPPED>"
10937 msgstr ""
10938
10939 #. type: Plain text
10940 #: build/C/man2/wait.2:272
10941 msgid "Wait for children that have been stopped by delivery of a signal."
10942 msgstr ""
10943
10944 #. type: TP
10945 #: build/C/man2/wait.2:272
10946 #, no-wrap
10947 msgid "B<WCONTINUED>"
10948 msgstr ""
10949
10950 #. type: Plain text
10951 #: build/C/man2/wait.2:277
10952 msgid ""
10953 "Wait for (previously stopped) children that have been resumed by delivery of "
10954 "B<SIGCONT>."
10955 msgstr ""
10956
10957 #. type: Plain text
10958 #: build/C/man2/wait.2:280
10959 msgid "The following flags may additionally be ORed in I<options>:"
10960 msgstr ""
10961
10962 #. type: Plain text
10963 #: build/C/man2/wait.2:284
10964 msgid "As for B<waitpid>()."
10965 msgstr ""
10966
10967 #. type: TP
10968 #: build/C/man2/wait.2:284
10969 #, no-wrap
10970 msgid "B<WNOWAIT>"
10971 msgstr ""
10972
10973 #. type: Plain text
10974 #: build/C/man2/wait.2:288
10975 msgid ""
10976 "Leave the child in a waitable state; a later wait call can be used to again "
10977 "retrieve the child status information."
10978 msgstr ""
10979
10980 #. type: Plain text
10981 #: build/C/man2/wait.2:295
10982 msgid ""
10983 "Upon successful return, B<waitid>()  fills in the following fields of the "
10984 "I<siginfo_t> structure pointed to by I<infop>:"
10985 msgstr ""
10986
10987 #. type: Plain text
10988 #: build/C/man2/wait.2:298
10989 msgid "The process ID of the child."
10990 msgstr ""
10991
10992 #. type: Plain text
10993 #: build/C/man2/wait.2:302
10994 msgid ""
10995 "The real user ID of the child.  (This field is not set on most other "
10996 "implementations.)"
10997 msgstr ""
10998
10999 #. type: Plain text
11000 #: build/C/man2/wait.2:306
11001 msgid "Always set to B<SIGCHLD>."
11002 msgstr ""
11003
11004 #. type: TP
11005 #: build/C/man2/wait.2:306
11006 #, no-wrap
11007 msgid "I<si_status>"
11008 msgstr ""
11009
11010 #. type: Plain text
11011 #: build/C/man2/wait.2:316
11012 msgid ""
11013 "Either the exit status of the child, as given to B<_exit>(2)  (or "
11014 "B<exit>(3)), or the signal that caused the child to terminate, stop, or "
11015 "continue.  The I<si_code> field can be used to determine how to interpret "
11016 "this field."
11017 msgstr ""
11018
11019 #. type: Plain text
11020 #: build/C/man2/wait.2:333
11021 msgid ""
11022 "Set to one of: B<CLD_EXITED> (child called B<_exit>(2)); B<CLD_KILLED> "
11023 "(child killed by signal); B<CLD_DUMPED> (child killed by signal, and dumped "
11024 "core); B<CLD_STOPPED> (child stopped by signal); B<CLD_TRAPPED> (traced "
11025 "child has trapped); or B<CLD_CONTINUED> (child continued by B<SIGCONT>)."
11026 msgstr ""
11027
11028 #.  POSIX.1-2001 leaves this possibility unspecified; most
11029 #.  implementations (including Linux) zero out the structure
11030 #.  in this case, but at least one implementation (AIX 5.1)
11031 #.  does not -- MTK Nov 04
11032 #. type: Plain text
11033 #: build/C/man2/wait.2:355
11034 msgid ""
11035 "If B<WNOHANG> was specified in I<options> and there were no children in a "
11036 "waitable state, then B<waitid>()  returns 0 immediately and the state of the "
11037 "I<siginfo_t> structure pointed to by I<infop> is unspecified.  To "
11038 "distinguish this case from that where a child was in a waitable state, zero "
11039 "out the I<si_pid> field before the call and check for a nonzero value in "
11040 "this field after the call returns."
11041 msgstr ""
11042
11043 #. type: Plain text
11044 #: build/C/man2/wait.2:359
11045 msgid ""
11046 "B<wait>(): on success, returns the process ID of the terminated child; on "
11047 "error, -1 is returned."
11048 msgstr ""
11049
11050 #. type: Plain text
11051 #: build/C/man2/wait.2:368
11052 msgid ""
11053 "B<waitpid>(): on success, returns the process ID of the child whose state "
11054 "has changed; if B<WNOHANG> was specified and one or more child(ren) "
11055 "specified by I<pid> exist, but have not yet changed state, then 0 is "
11056 "returned.  On error, -1 is returned."
11057 msgstr ""
11058
11059 #.  FIXME: As reported by Vegard Nossum, if infop is NULL, then waitid()
11060 #.  returns the PID of the child.  Either this is a bug, or it is intended
11061 #.  behavior that needs to be documented.  See my Jan 2009 LKML mail
11062 #.  "waitid() return value strangeness when infop is NULL".
11063 #. type: Plain text
11064 #: build/C/man2/wait.2:384
11065 msgid ""
11066 "B<waitid>(): returns 0 on success or if B<WNOHANG> was specified and no "
11067 "child(ren) specified by I<id> has yet changed state; on error, -1 is "
11068 "returned.  Each of these calls sets I<errno> to an appropriate value in the "
11069 "case of an error."
11070 msgstr ""
11071
11072 #. type: TP
11073 #: build/C/man2/wait.2:385 build/C/man2/wait.2:390
11074 #, no-wrap
11075 msgid "B<ECHILD>"
11076 msgstr ""
11077
11078 #. type: Plain text
11079 #: build/C/man2/wait.2:390
11080 msgid ""
11081 "(for B<wait>())  The calling process does not have any unwaited-for "
11082 "children."
11083 msgstr ""
11084
11085 #. type: Plain text
11086 #: build/C/man2/wait.2:410
11087 msgid ""
11088 "(for B<waitpid>()  or B<waitid>())  The process specified by I<pid> "
11089 "(B<waitpid>())  or I<idtype> and I<id> (B<waitid>())  does not exist or is "
11090 "not a child of the calling process.  (This can happen for one's own child if "
11091 "the action for B<SIGCHLD> is set to B<SIG_IGN>.  See also the I<Linux Notes> "
11092 "section about threads.)"
11093 msgstr ""
11094
11095 #. type: Plain text
11096 #: build/C/man2/wait.2:417
11097 msgid ""
11098 "B<WNOHANG> was not set and an unblocked signal or a B<SIGCHLD> was caught; "
11099 "see B<signal>(7)."
11100 msgstr ""
11101
11102 #. type: Plain text
11103 #: build/C/man2/wait.2:422
11104 msgid "The I<options> argument was invalid."
11105 msgstr ""
11106
11107 #. type: Plain text
11108 #: build/C/man2/wait.2:437
11109 msgid ""
11110 "A child that terminates, but has not been waited for becomes a \"zombie\".  "
11111 "The kernel maintains a minimal set of information about the zombie process "
11112 "(PID, termination status, resource usage information)  in order to allow the "
11113 "parent to later perform a wait to obtain information about the child.  As "
11114 "long as a zombie is not removed from the system via a wait, it will consume "
11115 "a slot in the kernel process table, and if this table fills, it will not be "
11116 "possible to create further processes.  If a parent process terminates, then "
11117 "its \"zombie\" children (if any)  are adopted by B<init>(8), which "
11118 "automatically performs a wait to remove the zombies."
11119 msgstr ""
11120
11121 #. type: Plain text
11122 #: build/C/man2/wait.2:466
11123 msgid ""
11124 "POSIX.1-2001 specifies that if the disposition of B<SIGCHLD> is set to "
11125 "B<SIG_IGN> or the B<SA_NOCLDWAIT> flag is set for B<SIGCHLD> (see "
11126 "B<sigaction>(2)), then children that terminate do not become zombies and a "
11127 "call to B<wait>()  or B<waitpid>()  will block until all children have "
11128 "terminated, and then fail with I<errno> set to B<ECHILD>.  (The original "
11129 "POSIX standard left the behavior of setting B<SIGCHLD> to B<SIG_IGN> "
11130 "unspecified.  Note that even though the default disposition of B<SIGCHLD> is "
11131 "\"ignore\", explicitly setting the disposition to B<SIG_IGN> results in "
11132 "different treatment of zombie process children.)"
11133 msgstr ""
11134
11135 #. type: Plain text
11136 #: build/C/man2/wait.2:479
11137 msgid ""
11138 "Linux 2.6 conforms to the POSIX requirements.  However, Linux 2.4 (and "
11139 "earlier) does not: if a B<wait>()  or B<waitpid>()  call is made while "
11140 "B<SIGCHLD> is being ignored, the call behaves just as though B<SIGCHLD> were "
11141 "not being ignored, that is, the call blocks until the next child terminates "
11142 "and then returns the process ID and status of that child."
11143 msgstr ""
11144
11145 #. type: Plain text
11146 #: build/C/man2/wait.2:495
11147 msgid ""
11148 "In the Linux kernel, a kernel-scheduled thread is not a distinct construct "
11149 "from a process.  Instead, a thread is simply a process that is created using "
11150 "the Linux-unique B<clone>(2)  system call; other routines such as the "
11151 "portable B<pthread_create>(3)  call are implemented using B<clone>(2).  "
11152 "Before Linux 2.4, a thread was just a special case of a process, and as a "
11153 "consequence one thread could not wait on the children of another thread, "
11154 "even when the latter belongs to the same thread group.  However, POSIX "
11155 "prescribes such functionality, and since Linux 2.4 a thread can, and by "
11156 "default will, wait on children of other threads in the same thread group."
11157 msgstr ""
11158
11159 #. type: Plain text
11160 #: build/C/man2/wait.2:502
11161 msgid ""
11162 "The following Linux-specific I<options> are for use with children created "
11163 "using B<clone>(2); they cannot be used with B<waitid>():"
11164 msgstr ""
11165
11166 #. type: TP
11167 #: build/C/man2/wait.2:502
11168 #, no-wrap
11169 msgid "B<__WCLONE>"
11170 msgstr ""
11171
11172 #.  since 0.99pl10
11173 #. type: Plain text
11174 #: build/C/man2/wait.2:513
11175 msgid ""
11176 "Wait for \"clone\" children only.  If omitted, then wait for \"non-clone\" "
11177 "children only.  (A \"clone\" child is one which delivers no signal, or a "
11178 "signal other than B<SIGCHLD> to its parent upon termination.)  This option "
11179 "is ignored if B<__WALL> is also specified."
11180 msgstr ""
11181
11182 #. type: TP
11183 #: build/C/man2/wait.2:513
11184 #, no-wrap
11185 msgid "B<__WALL> (since Linux 2.4)"
11186 msgstr ""
11187
11188 #.  since patch-2.3.48
11189 #. type: Plain text
11190 #: build/C/man2/wait.2:518
11191 msgid "Wait for all children, regardless of type (\"clone\" or \"non-clone\")."
11192 msgstr ""
11193
11194 #. type: TP
11195 #: build/C/man2/wait.2:518
11196 #, no-wrap
11197 msgid "B<__WNOTHREAD> (since Linux 2.4)"
11198 msgstr ""
11199
11200 #.  since patch-2.4.0-test8
11201 #. type: Plain text
11202 #: build/C/man2/wait.2:524
11203 msgid ""
11204 "Do not wait for children of other threads in the same thread group.  This "
11205 "was the default before Linux 2.4."
11206 msgstr ""
11207
11208 #. type: Plain text
11209 #: build/C/man2/wait.2:536
11210 msgid ""
11211 "The raw B<waitid>()  system call takes a fith argument, of type I<struct "
11212 "rusage\\ *>.  If this argument is non-NULL, then it is used to return "
11213 "resource usage information about the child, in the same manner as "
11214 "B<wait4>(2).  See B<getrusage>(2)  for details."
11215 msgstr ""
11216
11217 #. type: Plain text
11218 #: build/C/man2/wait.2:551
11219 msgid ""
11220 "According to POSIX.1-2008, an application calling B<waitid>()  must ensure "
11221 "that I<infop> points to a I<siginfo_t> structure (i.e., that it is a "
11222 "non-null pointer).  On Linux, if I<infop> is NULL, B<waitid>()  succeeds, "
11223 "and returns the process ID of the waited-for child.  Applications should "
11224 "avoid relying on this inconsistent, nonstandard, and unnecessary feature."
11225 msgstr ""
11226
11227 #.  fork.2 refers to this example program.
11228 #. type: Plain text
11229 #: build/C/man2/wait.2:568
11230 msgid ""
11231 "The following program demonstrates the use of B<fork>(2)  and B<waitpid>().  "
11232 "The program creates a child process.  If no command-line argument is "
11233 "supplied to the program, then the child suspends its execution using "
11234 "B<pause>(2), to allow the user to send signals to the child.  Otherwise, if "
11235 "a command-line argument is supplied, then the child exits immediately, using "
11236 "the integer supplied on the command line as the exit status.  The parent "
11237 "process executes a loop that monitors the child using B<waitpid>(), and uses "
11238 "the W*() macros described above to analyze the wait status value."
11239 msgstr ""
11240
11241 #. type: Plain text
11242 #: build/C/man2/wait.2:584
11243 #, no-wrap
11244 msgid ""
11245 "$B< ./a.out &>\n"
11246 "Child PID is 32360\n"
11247 "[1] 32359\n"
11248 "$B< kill -STOP 32360>\n"
11249 "stopped by signal 19\n"
11250 "$B< kill -CONT 32360>\n"
11251 "continued\n"
11252 "$B< kill -TERM 32360>\n"
11253 "killed by signal 15\n"
11254 "[1]+  Done                    ./a.out\n"
11255 "$\n"
11256 msgstr ""
11257
11258 #. type: Plain text
11259 #: build/C/man2/wait.2:593
11260 #, no-wrap
11261 msgid ""
11262 "#include E<lt>sys/wait.hE<gt>\n"
11263 "#include E<lt>stdlib.hE<gt>\n"
11264 "#include E<lt>unistd.hE<gt>\n"
11265 "#include E<lt>stdio.hE<gt>\n"
11266 msgstr ""
11267
11268 #. type: Plain text
11269 #: build/C/man2/wait.2:599
11270 #, no-wrap
11271 msgid ""
11272 "int\n"
11273 "main(int argc, char *argv[])\n"
11274 "{\n"
11275 "    pid_t cpid, w;\n"
11276 "    int status;\n"
11277 msgstr ""
11278
11279 #. type: Plain text
11280 #: build/C/man2/wait.2:605
11281 #, no-wrap
11282 msgid ""
11283 "    cpid = fork();\n"
11284 "    if (cpid == -1) {\n"
11285 "        perror(\"fork\");\n"
11286 "        exit(EXIT_FAILURE);\n"
11287 "    }\n"
11288 msgstr ""
11289
11290 #. type: Plain text
11291 #: build/C/man2/wait.2:611
11292 #, no-wrap
11293 msgid ""
11294 "    if (cpid == 0) {            /* Code executed by child */\n"
11295 "        printf(\"Child PID is %ld\\en\", (long) getpid());\n"
11296 "        if (argc == 1)\n"
11297 "            pause();                    /* Wait for signals */\n"
11298 "        _exit(atoi(argv[1]));\n"
11299 msgstr ""
11300
11301 #. type: Plain text
11302 #: build/C/man2/wait.2:619
11303 #, no-wrap
11304 msgid ""
11305 "    } else {                    /* Code executed by parent */\n"
11306 "        do {\n"
11307 "            w = waitpid(cpid, &status, WUNTRACED | WCONTINUED);\n"
11308 "            if (w == -1) {\n"
11309 "                perror(\"waitpid\");\n"
11310 "                exit(EXIT_FAILURE);\n"
11311 "            }\n"
11312 msgstr ""
11313
11314 #. type: Plain text
11315 #: build/C/man2/wait.2:633
11316 #, no-wrap
11317 msgid ""
11318 "            if (WIFEXITED(status)) {\n"
11319 "                printf(\"exited, status=%d\\en\", WEXITSTATUS(status));\n"
11320 "            } else if (WIFSIGNALED(status)) {\n"
11321 "                printf(\"killed by signal %d\\en\", WTERMSIG(status));\n"
11322 "            } else if (WIFSTOPPED(status)) {\n"
11323 "                printf(\"stopped by signal %d\\en\", WSTOPSIG(status));\n"
11324 "            } else if (WIFCONTINUED(status)) {\n"
11325 "                printf(\"continued\\en\");\n"
11326 "            }\n"
11327 "        } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n"
11328 "        exit(EXIT_SUCCESS);\n"
11329 "    }\n"
11330 "}\n"
11331 msgstr ""
11332
11333 #. type: Plain text
11334 #: build/C/man2/wait.2:646
11335 msgid ""
11336 "B<_exit>(2), B<clone>(2), B<fork>(2), B<kill>(2), B<ptrace>(2), "
11337 "B<sigaction>(2), B<signal>(2), B<wait4>(2), B<pthread_create>(3), "
11338 "B<credentials>(7), B<signal>(7)"
11339 msgstr ""
11340
11341 #. type: TH
11342 #: build/C/man2/wait4.2:33
11343 #, no-wrap
11344 msgid "WAIT4"
11345 msgstr ""
11346
11347 #. type: TH
11348 #: build/C/man2/wait4.2:33
11349 #, no-wrap
11350 msgid "2012-09-23"
11351 msgstr ""
11352
11353 #. type: Plain text
11354 #: build/C/man2/wait4.2:36
11355 msgid "wait3, wait4 - wait for process to change state, BSD style"
11356 msgstr ""
11357
11358 #. type: Plain text
11359 #: build/C/man2/wait4.2:42
11360 #, no-wrap
11361 msgid ""
11362 "B<#include E<lt>sys/types.hE<gt>>\n"
11363 "B<#include E<lt>sys/time.hE<gt>>\n"
11364 "B<#include E<lt>sys/resource.hE<gt>>\n"
11365 "B<#include E<lt>sys/wait.hE<gt>>\n"
11366 msgstr ""
11367
11368 #. type: Plain text
11369 #: build/C/man2/wait4.2:45
11370 #, no-wrap
11371 msgid ""
11372 "B<pid_t wait3(int *>I<status>B<, int >I<options>B<,>\n"
11373 "B<            struct rusage *>I<rusage>B<);>\n"
11374 msgstr ""
11375
11376 #. type: Plain text
11377 #: build/C/man2/wait4.2:48
11378 #, no-wrap
11379 msgid ""
11380 "B<pid_t wait4(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<,>\n"
11381 "B<            struct rusage *>I<rusage>B<);>\n"
11382 msgstr ""
11383
11384 #. type: Plain text
11385 #: build/C/man2/wait4.2:57
11386 msgid "B<wait3>():"
11387 msgstr ""
11388
11389 #. type: Plain text
11390 #: build/C/man2/wait4.2:63
11391 msgid "B<wait4>():"
11392 msgstr ""
11393
11394 #. type: Plain text
11395 #: build/C/man2/wait4.2:65
11396 msgid "_BSD_SOURCE"
11397 msgstr ""
11398
11399 #. type: Plain text
11400 #: build/C/man2/wait4.2:73
11401 msgid ""
11402 "These functions are obsolete; use B<waitpid>(2)  or B<waitid>(2)  in new "
11403 "programs."
11404 msgstr ""
11405
11406 #. type: Plain text
11407 #: build/C/man2/wait4.2:83
11408 msgid ""
11409 "The B<wait3>()  and B<wait4>()  system calls are similar to B<waitpid>(2), "
11410 "but additionally return resource usage information about the child in the "
11411 "structure pointed to by I<rusage>."
11412 msgstr ""
11413
11414 #. type: Plain text
11415 #: build/C/man2/wait4.2:89
11416 msgid ""
11417 "Other than the use of the I<rusage> argument, the following B<wait3>()  "
11418 "call:"
11419 msgstr ""
11420
11421 #. type: Plain text
11422 #: build/C/man2/wait4.2:92
11423 #, no-wrap
11424 msgid "    wait3(status, options, rusage);\n"
11425 msgstr ""
11426
11427 #. type: Plain text
11428 #: build/C/man2/wait4.2:95 build/C/man2/wait4.2:109
11429 msgid "is equivalent to:"
11430 msgstr ""
11431
11432 #. type: Plain text
11433 #: build/C/man2/wait4.2:98
11434 #, no-wrap
11435 msgid "    waitpid(-1, status, options);\n"
11436 msgstr ""
11437
11438 #. type: Plain text
11439 #: build/C/man2/wait4.2:103
11440 msgid "Similarly, the following B<wait4>()  call:"
11441 msgstr ""
11442
11443 #. type: Plain text
11444 #: build/C/man2/wait4.2:106
11445 #, no-wrap
11446 msgid "    wait4(pid, status, options, rusage);\n"
11447 msgstr ""
11448
11449 #. type: Plain text
11450 #: build/C/man2/wait4.2:112
11451 #, no-wrap
11452 msgid "    waitpid(pid, status, options);\n"
11453 msgstr ""
11454
11455 #. type: Plain text
11456 #: build/C/man2/wait4.2:122
11457 msgid ""
11458 "In other words, B<wait3>()  waits of any child, while B<wait4>()  can be "
11459 "used to select a specific child, or children, on which to wait.  See "
11460 "B<wait>(2)  for further details."
11461 msgstr ""
11462
11463 #. type: Plain text
11464 #: build/C/man2/wait4.2:132
11465 msgid ""
11466 "If I<rusage> is not NULL, the I<struct rusage> to which it points will be "
11467 "filled with accounting information about the child.  See B<getrusage>(2)  "
11468 "for details."
11469 msgstr ""
11470
11471 #. type: Plain text
11472 #: build/C/man2/wait4.2:135 build/C/man2/wait4.2:138
11473 msgid "As for B<waitpid>(2)."
11474 msgstr ""
11475
11476 #. type: Plain text
11477 #: build/C/man2/wait4.2:140
11478 msgid "4.3BSD."
11479 msgstr ""
11480
11481 #. type: Plain text
11482 #: build/C/man2/wait4.2:147
11483 msgid ""
11484 "SUSv1 included a specification of B<wait3>(); SUSv2 included B<wait3>(), but "
11485 "marked it LEGACY; SUSv3 removed it."
11486 msgstr ""
11487
11488 #. type: Plain text
11489 #: build/C/man2/wait4.2:159
11490 msgid ""
11491 "Including I<E<lt>sys/time.hE<gt>> is not required these days, but increases "
11492 "portability.  (Indeed, I<E<lt>sys/resource.hE<gt>> defines the I<rusage> "
11493 "structure with fields of type I<struct timeval> defined in "
11494 "I<E<lt>sys/time.hE<gt>>.)"
11495 msgstr ""
11496
11497 #. type: Plain text
11498 #: build/C/man2/wait4.2:165
11499 msgid ""
11500 "On Linux, B<wait3>()  is a library function implemented on top of the "
11501 "B<wait4>()  system call."
11502 msgstr ""
11503
11504 #. type: Plain text
11505 #: build/C/man2/wait4.2:172
11506 msgid ""
11507 "B<fork>(2), B<getrusage>(2), B<sigaction>(2), B<signal>(2), B<wait>(2), "
11508 "B<signal>(7)"
11509 msgstr ""