OSDN Git Service

(split) LDP: Force update POT and ja.po
[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: 2013-03-26 16:48+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=CHARSET\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: build/C/man3/bsd_signal.3: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 "2009-03-15"
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/rt_sigqueueinfo.2:25 build/C/man2/s390_runtime_instr.2:26 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/rt_sigqueueinfo.2:26 build/C/man2/s390_runtime_instr.2:27 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/rt_sigqueueinfo.2:28 build/C/man2/s390_runtime_instr.2:29 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:44 build/C/man3/psignal.3:56 build/C/man3/raise.3:38 build/C/man2/rt_sigqueueinfo.2:38 build/C/man2/s390_runtime_instr.2:35 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:81 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:99 build/C/man2/killpg.2:89 build/C/man2/pause.2:42 build/C/man2/prctl.2:766 build/C/man3/profil.3:66 build/C/man3/psignal.3:89 build/C/man3/raise.3:61 build/C/man2/rt_sigqueueinfo.2:129 build/C/man2/s390_runtime_instr.2:55 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:353 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:104 build/C/man2/killpg.2:94 build/C/man2/pause.2:53 build/C/man2/prctl.2:784 build/C/man2/rt_sigqueueinfo.2:134 build/C/man2/s390_runtime_instr.2:66 build/C/man2/sgetmask.2:64 build/C/man2/sigaction.2:663 build/C/man2/sigaltstack.2:137 build/C/man3/siginterrupt.3:78 build/C/man2/signal.2:102 build/C/man2/signalfd.2:265 build/C/man2/sigpending.2:56 build/C/man2/sigprocmask.2:96 build/C/man3/sigqueue.3:91 build/C/man3/sigset.3:154 build/C/man3/sigsetops.3:123 build/C/man2/sigsuspend.2:74 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:382 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/man2/eventfd.2:266 build/C/man2/getitimer.2:148 build/C/man3/gsignal.3:95 build/C/man2/kill.2:120 build/C/man2/killpg.2:111 build/C/man2/pause.2:57 build/C/man2/prctl.2:956 build/C/man3/profil.3:68 build/C/man3/psignal.3:99 build/C/man3/raise.3:64 build/C/man2/rt_sigqueueinfo.2:176 build/C/man2/s390_runtime_instr.2:82 build/C/man2/sgetmask.2:66 build/C/man2/sigaction.2:675 build/C/man2/sigaltstack.2:156 build/C/man7/sigevent.7:130 build/C/man3/siginterrupt.3:82 build/C/man2/signal.2:107 build/C/man7/signal.7:838 build/C/man2/signalfd.2:307 build/C/man3/sigpause.3:56 build/C/man2/sigpending.2:61 build/C/man2/sigprocmask.2:109 build/C/man3/sigqueue.3:114 build/C/man2/sigreturn.2:60 build/C/man3/sigset.3:173 build/C/man3/sigsetops.3:128 build/C/man2/sigsuspend.2:82 build/C/man3/sigvec.3:221 build/C/man3/sigwait.3:80 build/C/man2/sigwaitinfo.2:133 build/C/man3/sysv_signal.3:60 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:420 build/C/man2/wait4.2:138
125 #, no-wrap
126 msgid "CONFORMING TO"
127 msgstr ""
128
129 #. type: Plain text
130 #: build/C/man3/bsd_signal.3:70
131 msgid ""
132 "4.2BSD, POSIX.1-2001.  POSIX.1-2008 removes the specification of "
133 "B<bsd_signal>(), recommending the use of B<sigaction>(2)  instead."
134 msgstr ""
135
136 #. type: SH
137 #: build/C/man3/bsd_signal.3:70 build/C/man2/eventfd.2:271 build/C/man2/getitimer.2:158 build/C/man2/kill.2:122 build/C/man2/killpg.2:115 build/C/man3/raise.3:66 build/C/man2/rt_sigqueueinfo.2:178 build/C/man2/s390_runtime_instr.2:85 build/C/man2/sgetmask.2:68 build/C/man2/sigaction.2:678 build/C/man2/sigaltstack.2:158 build/C/man2/signal.2:109 build/C/man2/signalfd.2:312 build/C/man3/sigpause.3:60 build/C/man2/sigpending.2:63 build/C/man2/sigprocmask.2:111 build/C/man3/sigqueue.3:116 build/C/man2/sigreturn.2:64 build/C/man3/sigset.3:190 build/C/man3/sigsetops.3:130 build/C/man2/sigsuspend.2:84 build/C/man3/sigvec.3:227 build/C/man3/sigwait.3:82 build/C/man2/sigwaitinfo.2:135 build/C/man3/sysv_signal.3:62 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:422 build/C/man2/wait4.2:147
138 #, no-wrap
139 msgid "NOTES"
140 msgstr ""
141
142 #. type: Plain text
143 #: build/C/man3/bsd_signal.3:76
144 msgid "Use of B<bsd_signal>()  should be avoided; use B<sigaction>(2)  instead."
145 msgstr ""
146
147 #. type: Plain text
148 #: build/C/man3/bsd_signal.3:87
149 msgid ""
150 "On modern Linux systems, B<bsd_signal>()  and B<signal>(2)  are equivalent.  "
151 "But on older systems, B<signal>(2)  provided unreliable signal semantics; "
152 "see B<signal>(2)  for details."
153 msgstr ""
154
155 #. type: Plain text
156 #: build/C/man3/bsd_signal.3:94 build/C/man3/sysv_signal.3:87
157 msgid ""
158 "The use of I<sighandler_t> is a GNU extension; this type is only defined if "
159 "the B<_GNU_SOURCE> feature test macro is defined."
160 msgstr ""
161
162 #. type: SH
163 #: build/C/man3/bsd_signal.3:94 build/C/man2/eventfd.2:417 build/C/man2/getitimer.2:239 build/C/man3/gsignal.3:103 build/C/man2/kill.2:170 build/C/man2/killpg.2:134 build/C/man2/pause.2:59 build/C/man2/prctl.2:970 build/C/man3/profil.3:79 build/C/man3/psignal.3:113 build/C/man3/raise.3:77 build/C/man2/rt_sigqueueinfo.2:188 build/C/man2/s390_runtime_instr.2:89 build/C/man2/sgetmask.2:80 build/C/man2/sigaction.2:791 build/C/man2/sigaltstack.2:232 build/C/man7/sigevent.7:132 build/C/man3/siginterrupt.3:91 build/C/man2/signal.2:275 build/C/man7/signal.7:850 build/C/man2/signalfd.2:433 build/C/man3/sigpause.3:98 build/C/man2/sigpending.2:84 build/C/man2/sigprocmask.2:141 build/C/man3/sigqueue.3:149 build/C/man2/sigreturn.2:74 build/C/man3/sigset.3:266 build/C/man3/sigsetops.3:168 build/C/man2/sigsuspend.2:106 build/C/man3/sigvec.3:252 build/C/man3/sigwait.3:89 build/C/man2/sigwaitinfo.2:187 build/C/man3/sysv_signal.3:87 build/C/man2/timer_create.2:399 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:619 build/C/man2/wait4.2:165
164 #, no-wrap
165 msgid "SEE ALSO"
166 msgstr ""
167
168 #. type: Plain text
169 #: build/C/man3/bsd_signal.3:99
170 msgid "B<sigaction>(2), B<signal>(2), B<sysv_signal>(3), B<signal>(7)"
171 msgstr ""
172
173 #. type: SH
174 #: build/C/man3/bsd_signal.3:99 build/C/man2/eventfd.2:428 build/C/man2/getitimer.2:246 build/C/man3/gsignal.3:107 build/C/man2/kill.2:180 build/C/man2/killpg.2:140 build/C/man2/pause.2:64 build/C/man2/prctl.2:973 build/C/man3/profil.3:84 build/C/man3/psignal.3:118 build/C/man3/raise.3:84 build/C/man2/rt_sigqueueinfo.2:196 build/C/man2/s390_runtime_instr.2:92 build/C/man2/sgetmask.2:83 build/C/man2/sigaction.2:810 build/C/man2/sigaltstack.2:239 build/C/man7/sigevent.7:142 build/C/man3/siginterrupt.3:93 build/C/man2/signal.2:294 build/C/man7/signal.7:883 build/C/man2/signalfd.2:446 build/C/man3/sigpause.3:106 build/C/man2/sigpending.2:92 build/C/man2/sigprocmask.2:152 build/C/man3/sigqueue.3:157 build/C/man2/sigreturn.2:79 build/C/man3/sigset.3:276 build/C/man3/sigsetops.3:173 build/C/man2/sigsuspend.2:116 build/C/man3/sigvec.3:262 build/C/man3/sigwait.3:97 build/C/man2/sigwaitinfo.2:199 build/C/man3/sysv_signal.3:92 build/C/man2/timer_create.2:414 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:631 build/C/man2/wait4.2:172
175 #, no-wrap
176 msgid "COLOPHON"
177 msgstr ""
178
179 #. type: Plain text
180 #: build/C/man3/bsd_signal.3:106 build/C/man2/eventfd.2:435 build/C/man2/getitimer.2:253 build/C/man3/gsignal.3:114 build/C/man2/kill.2:187 build/C/man2/killpg.2:147 build/C/man2/pause.2:71 build/C/man2/prctl.2:980 build/C/man3/profil.3:91 build/C/man3/psignal.3:125 build/C/man3/raise.3:91 build/C/man2/rt_sigqueueinfo.2:203 build/C/man2/s390_runtime_instr.2:99 build/C/man2/sgetmask.2:90 build/C/man2/sigaction.2:817 build/C/man2/sigaltstack.2:246 build/C/man7/sigevent.7:149 build/C/man3/siginterrupt.3:100 build/C/man2/signal.2:301 build/C/man7/signal.7:890 build/C/man2/signalfd.2:453 build/C/man3/sigpause.3:113 build/C/man2/sigpending.2:99 build/C/man2/sigprocmask.2:159 build/C/man3/sigqueue.3:164 build/C/man2/sigreturn.2:86 build/C/man3/sigset.3:283 build/C/man3/sigsetops.3:180 build/C/man2/sigsuspend.2:123 build/C/man3/sigvec.3:269 build/C/man3/sigwait.3:104 build/C/man2/sigwaitinfo.2:206 build/C/man3/sysv_signal.3:99 build/C/man2/timer_create.2:421 build/C/man2/timer_delete.2:82 build/C/man2/timer_getoverrun.2:148 build/C/man2/timer_settime.2:223 build/C/man2/timerfd_create.2:560 build/C/man2/tkill.2:143 build/C/man2/wait.2:638 build/C/man2/wait4.2:179
181 msgid ""
182 "This page is part of release 3.50 of the Linux I<man-pages> project.  A "
183 "description of the project, and information about reporting bugs, can be "
184 "found at http://www.kernel.org/doc/man-pages/."
185 msgstr ""
186
187 #. type: TH
188 #: build/C/man2/eventfd.2:22
189 #, no-wrap
190 msgid "EVENTFD"
191 msgstr ""
192
193 #. type: TH
194 #: build/C/man2/eventfd.2:22
195 #, no-wrap
196 msgid "2010-08-30"
197 msgstr ""
198
199 #. type: TH
200 #: 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/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
201 #, no-wrap
202 msgid "Linux"
203 msgstr ""
204
205 #. type: Plain text
206 #: build/C/man2/eventfd.2:25
207 msgid "eventfd - create a file descriptor for event notification"
208 msgstr ""
209
210 #. type: Plain text
211 #: build/C/man2/eventfd.2:27
212 msgid "B<#include E<lt>sys/eventfd.hE<gt>>"
213 msgstr ""
214
215 #. type: Plain text
216 #: build/C/man2/eventfd.2:29
217 msgid "B<int eventfd(unsigned int >I<initval>B<, int >I<flags>B<);>"
218 msgstr ""
219
220 #. type: Plain text
221 #: build/C/man2/eventfd.2:39
222 msgid ""
223 "B<eventfd>()  creates an \"eventfd object\" that can be used as an event "
224 "wait/notify mechanism by user-space applications, and by the kernel to "
225 "notify user-space applications of events.  The object contains an unsigned "
226 "64-bit integer (I<uint64_t>)  counter that is maintained by the kernel.  "
227 "This counter is initialized with the value specified in the argument "
228 "I<initval>."
229 msgstr ""
230
231 #. type: Plain text
232 #: build/C/man2/eventfd.2:44
233 msgid ""
234 "The following values may be bitwise ORed in I<flags> to change the behaviour "
235 "of B<eventfd>():"
236 msgstr ""
237
238 #. type: TP
239 #: build/C/man2/eventfd.2:44
240 #, no-wrap
241 msgid "B<EFD_CLOEXEC> (since Linux 2.6.27)"
242 msgstr ""
243
244 #. type: Plain text
245 #: build/C/man2/eventfd.2:54 build/C/man2/signalfd.2:95 build/C/man2/timerfd_create.2:103
246 msgid ""
247 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See "
248 "the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this "
249 "may be useful."
250 msgstr ""
251
252 #. type: TP
253 #: build/C/man2/eventfd.2:54
254 #, no-wrap
255 msgid "B<EFD_NONBLOCK> (since Linux 2.6.27)"
256 msgstr ""
257
258 #. type: Plain text
259 #: build/C/man2/eventfd.2:62 build/C/man2/signalfd.2:85 build/C/man2/timerfd_create.2:93
260 msgid ""
261 "Set the B<O_NONBLOCK> file status flag on the new open file description.  "
262 "Using this flag saves extra calls to B<fcntl>(2)  to achieve the same "
263 "result."
264 msgstr ""
265
266 #. type: TP
267 #: build/C/man2/eventfd.2:62
268 #, no-wrap
269 msgid "B<EFD_SEMAPHORE> (since Linux 2.6.30)"
270 msgstr ""
271
272 #. type: Plain text
273 #: build/C/man2/eventfd.2:66
274 msgid ""
275 "Provide semaphore-like semantics for reads from the new file descriptor.  "
276 "See below."
277 msgstr ""
278
279 #. type: Plain text
280 #: build/C/man2/eventfd.2:70 build/C/man2/signalfd.2:99
281 msgid ""
282 "In Linux up to version 2.6.26, the I<flags> argument is unused, and must be "
283 "specified as zero."
284 msgstr ""
285
286 #. type: Plain text
287 #: build/C/man2/eventfd.2:76
288 msgid ""
289 "As its return value, B<eventfd>()  returns a new file descriptor that can be "
290 "used to refer to the eventfd object.  The following operations can be "
291 "performed on the file descriptor:"
292 msgstr ""
293
294 #. type: TP
295 #: build/C/man2/eventfd.2:76 build/C/man2/signalfd.2:102 build/C/man2/timerfd_create.2:211
296 #, no-wrap
297 msgid "B<read>(2)"
298 msgstr ""
299
300 #. type: Plain text
301 #: build/C/man2/eventfd.2:86
302 msgid ""
303 "Each successful B<read>(2)  returns an 8-byte integer.  A B<read>(2)  will "
304 "fail with the error B<EINVAL> if the size of the supplied buffer is less "
305 "than 8 bytes."
306 msgstr ""
307
308 #. type: Plain text
309 #: build/C/man2/eventfd.2:91
310 msgid ""
311 "The value returned by B<read>(2)  is in host byte order, i.e., the native "
312 "byte order for integers on the host machine."
313 msgstr ""
314
315 #. type: Plain text
316 #: build/C/man2/eventfd.2:98
317 msgid ""
318 "The semantics of B<read>(2)  depend on whether the eventfd counter currently "
319 "has a nonzero value and whether the B<EFD_SEMAPHORE> flag was specified when "
320 "creating the eventfd file descriptor:"
321 msgstr ""
322
323 #. type: IP
324 #: 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:827 build/C/man2/prctl.2:832 build/C/man2/prctl.2:837 build/C/man2/prctl.2:847 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:221 build/C/man2/signal.2:225 build/C/man2/signal.2:264 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
325 #, no-wrap
326 msgid "*"
327 msgstr ""
328
329 #. type: Plain text
330 #: build/C/man2/eventfd.2:106
331 msgid ""
332 "If B<EFD_SEMAPHORE> was not specified and the eventfd counter has a nonzero "
333 "value, then a B<read>(2)  returns 8 bytes containing that value, and the "
334 "counter's value is reset to zero."
335 msgstr ""
336
337 #. type: Plain text
338 #: build/C/man2/eventfd.2:113
339 msgid ""
340 "If B<EFD_SEMAPHORE> was specified and the eventfd counter has a nonzero "
341 "value, then a B<read>(2)  returns 8 bytes containing the value 1, and the "
342 "counter's value is decremented by 1."
343 msgstr ""
344
345 #. type: Plain text
346 #: build/C/man2/eventfd.2:123
347 msgid ""
348 "If the eventfd counter is zero at the time of the call to B<read>(2), then "
349 "the call either blocks until the counter becomes nonzero (at which time, the "
350 "B<read>(2)  proceeds as described above)  or fails with the error B<EAGAIN> "
351 "if the file descriptor has been made nonblocking."
352 msgstr ""
353
354 #. type: TP
355 #: build/C/man2/eventfd.2:124
356 #, no-wrap
357 msgid "B<write>(2)"
358 msgstr ""
359
360 #. type: Plain text
361 #: build/C/man2/eventfd.2:141
362 msgid ""
363 "A B<write>(2)  call adds the 8-byte integer value supplied in its buffer to "
364 "the counter.  The maximum value that may be stored in the counter is the "
365 "largest unsigned 64-bit value minus 1 (i.e., 0xfffffffffffffffe).  If the "
366 "addition would cause the counter's value to exceed the maximum, then the "
367 "B<write>(2)  either blocks until a B<read>(2)  is performed on the file "
368 "descriptor, or fails with the error B<EAGAIN> if the file descriptor has "
369 "been made nonblocking."
370 msgstr ""
371
372 #. type: Plain text
373 #: build/C/man2/eventfd.2:148
374 msgid ""
375 "A B<write>(2)  will fail with the error B<EINVAL> if the size of the "
376 "supplied buffer is less than 8 bytes, or if an attempt is made to write the "
377 "value 0xffffffffffffffff."
378 msgstr ""
379
380 #. type: TP
381 #: build/C/man2/eventfd.2:148 build/C/man2/signalfd.2:140 build/C/man2/timerfd_create.2:244
382 #, no-wrap
383 msgid "B<poll>(2), B<select>(2) (and similar)"
384 msgstr ""
385
386 #. type: Plain text
387 #: build/C/man2/eventfd.2:157
388 msgid ""
389 "The returned file descriptor supports B<poll>(2)  (and analogously "
390 "B<epoll>(7))  and B<select>(2), as follows:"
391 msgstr ""
392
393 #. type: Plain text
394 #: build/C/man2/eventfd.2:168
395 msgid ""
396 "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the "
397 "B<poll>(2)  B<POLLIN> flag)  if the counter has a value greater than 0."
398 msgstr ""
399
400 #. type: Plain text
401 #: build/C/man2/eventfd.2:178
402 msgid ""
403 "The file descriptor is writable (the B<select>(2)  I<writefds> argument; the "
404 "B<poll>(2)  B<POLLOUT> flag)  if it is possible to write a value of at least "
405 "\"1\" without blocking."
406 msgstr ""
407
408 #. type: Plain text
409 #: build/C/man2/eventfd.2:198
410 msgid ""
411 "If an overflow of the counter value was detected, then B<select>(2)  "
412 "indicates the file descriptor as being both readable and writable, and "
413 "B<poll>(2)  returns a B<POLLERR> event.  As noted above, B<write>(2)  can "
414 "never overflow the counter.  However an overflow can occur if 2^64 eventfd "
415 "\"signal posts\" were performed by the KAIO subsystem (theoretically "
416 "possible, but practically unlikely).  If an overflow has occurred, then "
417 "B<read>(2)  will return that maximum I<uint64_t> value (i.e., "
418 "0xffffffffffffffff)."
419 msgstr ""
420
421 #. type: Plain text
422 #: build/C/man2/eventfd.2:205
423 msgid ""
424 "The eventfd file descriptor also supports the other file-descriptor "
425 "multiplexing APIs: B<pselect>(2)  and B<ppoll>(2)."
426 msgstr ""
427
428 #. type: TP
429 #: build/C/man2/eventfd.2:205 build/C/man2/signalfd.2:160 build/C/man2/timerfd_create.2:262
430 #, no-wrap
431 msgid "B<close>(2)"
432 msgstr ""
433
434 #. type: Plain text
435 #: build/C/man2/eventfd.2:210
436 msgid ""
437 "When the file descriptor is no longer required it should be closed.  When "
438 "all file descriptors associated with the same eventfd object have been "
439 "closed, the resources for object are freed by the kernel."
440 msgstr ""
441
442 #. type: Plain text
443 #: build/C/man2/eventfd.2:222
444 msgid ""
445 "A copy of the file descriptor created by B<eventfd>()  is inherited by the "
446 "child produced by B<fork>(2).  The duplicate file descriptor is associated "
447 "with the same eventfd object.  File descriptors created by B<eventfd>()  are "
448 "preserved across B<execve>(2), unless the close-on-exec flag has been set."
449 msgstr ""
450
451 #. type: Plain text
452 #: build/C/man2/eventfd.2:229
453 msgid ""
454 "On success, B<eventfd>()  returns a new eventfd file descriptor.  On error, "
455 "-1 is returned and I<errno> is set to indicate the error."
456 msgstr ""
457
458 #. type: TP
459 #: build/C/man2/eventfd.2:230 build/C/man2/getitimer.2:135 build/C/man2/kill.2:105 build/C/man2/killpg.2:95 build/C/man2/prctl.2:789 build/C/man2/prctl.2:794 build/C/man2/prctl.2:806 build/C/man2/prctl.2:811 build/C/man2/prctl.2:820 build/C/man2/prctl.2:860 build/C/man2/rt_sigqueueinfo.2:141 build/C/man2/s390_runtime_instr.2:67 build/C/man2/sigaction.2:668 build/C/man2/sigaltstack.2:142 build/C/man3/siginterrupt.3:79 build/C/man2/signal.2:103 build/C/man2/signalfd.2:271 build/C/man2/signalfd.2:279 build/C/man2/sigprocmask.2:104 build/C/man3/sigqueue.3:98 build/C/man3/sigsetops.3:124 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:415
460 #, no-wrap
461 msgid "B<EINVAL>"
462 msgstr ""
463
464 #. type: Plain text
465 #: build/C/man2/eventfd.2:234
466 msgid "An unsupported value was specified in I<flags>."
467 msgstr ""
468
469 #. type: TP
470 #: build/C/man2/eventfd.2:234 build/C/man2/signalfd.2:286 build/C/man2/timerfd_create.2:320
471 #, no-wrap
472 msgid "B<EMFILE>"
473 msgstr ""
474
475 #. type: Plain text
476 #: build/C/man2/eventfd.2:237
477 msgid "The per-process limit on open file descriptors has been reached."
478 msgstr ""
479
480 #. type: TP
481 #: build/C/man2/eventfd.2:237 build/C/man2/signalfd.2:289 build/C/man2/timerfd_create.2:323
482 #, no-wrap
483 msgid "B<ENFILE>"
484 msgstr ""
485
486 #. type: Plain text
487 #: build/C/man2/eventfd.2:241 build/C/man2/signalfd.2:293 build/C/man2/timerfd_create.2:327
488 msgid "The system-wide limit on the total number of open files has been reached."
489 msgstr ""
490
491 #. type: TP
492 #: build/C/man2/eventfd.2:241 build/C/man2/signalfd.2:293 build/C/man2/timerfd_create.2:327
493 #, no-wrap
494 msgid "B<ENODEV>"
495 msgstr ""
496
497 #. type: Plain text
498 #: build/C/man2/eventfd.2:249 build/C/man2/signalfd.2:296 build/C/man2/timerfd_create.2:330
499 msgid "Could not mount (internal) anonymous inode device."
500 msgstr ""
501
502 #. type: TP
503 #: build/C/man2/eventfd.2:249 build/C/man2/s390_runtime_instr.2:74 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
504 #, no-wrap
505 msgid "B<ENOMEM>"
506 msgstr ""
507
508 #. type: Plain text
509 #: build/C/man2/eventfd.2:253
510 msgid "There was insufficient memory to create a new eventfd file descriptor."
511 msgstr ""
512
513 #. type: SH
514 #: build/C/man2/eventfd.2:253 build/C/man2/prctl.2:951 build/C/man3/psignal.3:95 build/C/man2/rt_sigqueueinfo.2:169 build/C/man2/s390_runtime_instr.2:80 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
515 #, no-wrap
516 msgid "VERSIONS"
517 msgstr ""
518
519 #.  eventfd() is in glibc 2.7, but reportedly does not build
520 #. type: Plain text
521 #: build/C/man2/eventfd.2:266
522 msgid ""
523 "B<eventfd>()  is available on Linux since kernel 2.6.22.  Working support is "
524 "provided in glibc since version 2.8.  The B<eventfd2>()  system call (see "
525 "NOTES) is available on Linux since kernel 2.6.27.  Since version 2.9, the "
526 "glibc B<eventfd>()  wrapper will employ the B<eventfd2>()  system call, if "
527 "it is supported by the kernel."
528 msgstr ""
529
530 #. type: Plain text
531 #: build/C/man2/eventfd.2:271
532 msgid "B<eventfd>()  and B<eventfd2>()  are Linux-specific."
533 msgstr ""
534
535 #. type: Plain text
536 #: build/C/man2/eventfd.2:279
537 msgid ""
538 "Applications can use an eventfd file descriptor instead of a pipe (see "
539 "B<pipe>(2))  in all cases where a pipe is used simply to signal events.  The "
540 "kernel overhead of an eventfd file descriptor is much lower than that of a "
541 "pipe, and only one file descriptor is required (versus the two required for "
542 "a pipe)."
543 msgstr ""
544
545 #.  or eventually syslets/threadlets
546 #. type: Plain text
547 #: build/C/man2/eventfd.2:285
548 msgid ""
549 "When used in the kernel, an eventfd file descriptor can provide a bridge "
550 "from kernel to user space, allowing, for example, functionalities like KAIO "
551 "(kernel AIO)  to signal to a file descriptor that some operation is "
552 "complete."
553 msgstr ""
554
555 #. type: Plain text
556 #: build/C/man2/eventfd.2:302
557 msgid ""
558 "A key point about an eventfd file descriptor is that it can be monitored "
559 "just like any other file descriptor using B<select>(2), B<poll>(2), or "
560 "B<epoll>(7).  This means that an application can simultaneously monitor the "
561 "readiness of \"traditional\" files and the readiness of other kernel "
562 "mechanisms that support the eventfd interface.  (Without the B<eventfd>()  "
563 "interface, these mechanisms could not be multiplexed via B<select>(2), "
564 "B<poll>(2), or B<epoll>(7).)"
565 msgstr ""
566
567 #. type: SS
568 #: build/C/man2/eventfd.2:302 build/C/man2/signalfd.2:336
569 #, no-wrap
570 msgid "Underlying Linux system calls"
571 msgstr ""
572
573 #. type: Plain text
574 #: build/C/man2/eventfd.2:316
575 msgid ""
576 "There are two underlying Linux system calls: B<eventfd>()  and the more "
577 "recent B<eventfd2>().  The former system call does not implement a I<flags> "
578 "argument.  The latter system call implements the I<flags> values described "
579 "above.  The glibc wrapper function will use B<eventfd2>()  where it is "
580 "available."
581 msgstr ""
582
583 #. type: SS
584 #: build/C/man2/eventfd.2:316
585 #, no-wrap
586 msgid "Additional glibc features"
587 msgstr ""
588
589 #. type: Plain text
590 #: build/C/man2/eventfd.2:320
591 msgid ""
592 "The GNU C library defines an additional type, and two functions that attempt "
593 "to abstract some of the details of reading and writing on an eventfd file "
594 "descriptor:"
595 msgstr ""
596
597 #. type: Plain text
598 #: build/C/man2/eventfd.2:324
599 #, no-wrap
600 msgid "typedef uint64_t eventfd_t;\n"
601 msgstr ""
602
603 #. type: Plain text
604 #: build/C/man2/eventfd.2:327
605 #, no-wrap
606 msgid ""
607 "int eventfd_read(int fd, eventfd_t *value);\n"
608 "int eventfd_write(int fd, eventfd_t value);\n"
609 msgstr ""
610
611 #. type: Plain text
612 #: build/C/man2/eventfd.2:334
613 msgid ""
614 "The functions perform the read and write operations on an eventfd file "
615 "descriptor, returning 0 if the correct number of bytes was transferred, or "
616 "-1 otherwise."
617 msgstr ""
618
619 #. type: SH
620 #: build/C/man2/eventfd.2:334 build/C/man2/sigaction.2:788 build/C/man2/sigaltstack.2:215 build/C/man2/signalfd.2:360 build/C/man3/sigwait.3:86 build/C/man2/timer_create.2:253 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:536
621 #, no-wrap
622 msgid "EXAMPLE"
623 msgstr ""
624
625 #. type: Plain text
626 #: build/C/man2/eventfd.2:343
627 msgid ""
628 "The following program creates an eventfd file descriptor and then forks to "
629 "create a child process.  While the parent briefly sleeps, the child writes "
630 "each of the integers supplied in the program's command-line arguments to the "
631 "eventfd file descriptor.  When the parent has finished sleeping, it reads "
632 "from the eventfd file descriptor."
633 msgstr ""
634
635 #. type: Plain text
636 #: build/C/man2/eventfd.2:345
637 msgid "The following shell session shows a sample run of the program:"
638 msgstr ""
639
640 #. type: Plain text
641 #: build/C/man2/eventfd.2:357
642 #, no-wrap
643 msgid ""
644 "$B< ./a.out 1 2 4 7 14>\n"
645 "Child writing 1 to efd\n"
646 "Child writing 2 to efd\n"
647 "Child writing 4 to efd\n"
648 "Child writing 7 to efd\n"
649 "Child writing 14 to efd\n"
650 "Child completed write loop\n"
651 "Parent about to read\n"
652 "Parent read 28 (0x1c) from efd\n"
653 msgstr ""
654
655 #. type: SS
656 #: build/C/man2/eventfd.2:359 build/C/man2/signalfd.2:383 build/C/man2/timer_create.2:284 build/C/man2/timerfd_create.2:407 build/C/man2/wait.2:571
657 #, no-wrap
658 msgid "Program source"
659 msgstr ""
660
661 #. type: Plain text
662 #: build/C/man2/eventfd.2:367
663 #, no-wrap
664 msgid ""
665 "#include E<lt>sys/eventfd.hE<gt>\n"
666 "#include E<lt>unistd.hE<gt>\n"
667 "#include E<lt>stdlib.hE<gt>\n"
668 "#include E<lt>stdio.hE<gt>\n"
669 "#include E<lt>stdint.hE<gt>             /* Definition of uint64_t */\n"
670 msgstr ""
671
672 #. type: Plain text
673 #: build/C/man2/eventfd.2:370 build/C/man2/signalfd.2:394
674 #, no-wrap
675 msgid ""
676 "#define handle_error(msg) \\e\n"
677 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
678 msgstr ""
679
680 #. type: Plain text
681 #: build/C/man2/eventfd.2:377
682 #, no-wrap
683 msgid ""
684 "int\n"
685 "main(int argc, char *argv[])\n"
686 "{\n"
687 "    int efd, j;\n"
688 "    uint64_t u;\n"
689 "    ssize_t s;\n"
690 msgstr ""
691
692 #. type: Plain text
693 #: build/C/man2/eventfd.2:382
694 #, no-wrap
695 msgid ""
696 "    if (argc E<lt> 2) {\n"
697 "        fprintf(stderr, \"Usage: %s E<lt>numE<gt>...\\en\", argv[0]);\n"
698 "        exit(EXIT_FAILURE);\n"
699 "    }\n"
700 msgstr ""
701
702 #. type: Plain text
703 #: build/C/man2/eventfd.2:386
704 #, no-wrap
705 msgid ""
706 "    efd = eventfd(0, 0);\n"
707 "    if (efd == -1)\n"
708 "        handle_error(\"eventfd\");\n"
709 msgstr ""
710
711 #. type: Plain text
712 #: build/C/man2/eventfd.2:398
713 #, no-wrap
714 msgid ""
715 "    switch (fork()) {\n"
716 "    case 0:\n"
717 "        for (j = 1; j E<lt> argc; j++) {\n"
718 "            printf(\"Child writing %s to efd\\en\", argv[j]);\n"
719 "            u = strtoull(argv[j], NULL, 0);\n"
720 "                    /* strtoull() allows various bases */\n"
721 "            s = write(efd, &u, sizeof(uint64_t));\n"
722 "            if (s != sizeof(uint64_t))\n"
723 "                handle_error(\"write\");\n"
724 "        }\n"
725 "        printf(\"Child completed write loop\\en\");\n"
726 msgstr ""
727
728 #. type: Plain text
729 #: build/C/man2/eventfd.2:400
730 #, no-wrap
731 msgid "        exit(EXIT_SUCCESS);\n"
732 msgstr ""
733
734 #. type: Plain text
735 #: build/C/man2/eventfd.2:403
736 #, no-wrap
737 msgid ""
738 "    default:\n"
739 "        sleep(2);\n"
740 msgstr ""
741
742 #. type: Plain text
743 #: build/C/man2/eventfd.2:411
744 #, no-wrap
745 msgid ""
746 "        printf(\"Parent about to read\\en\");\n"
747 "        s = read(efd, &u, sizeof(uint64_t));\n"
748 "        if (s != sizeof(uint64_t))\n"
749 "            handle_error(\"read\");\n"
750 "        printf(\"Parent read %llu (0x%llx) from efd\\en\",\n"
751 "                (unsigned long long) u, (unsigned long long) u);\n"
752 "        exit(EXIT_SUCCESS);\n"
753 msgstr ""
754
755 #. type: Plain text
756 #: build/C/man2/eventfd.2:416
757 #, no-wrap
758 msgid ""
759 "    case -1:\n"
760 "        handle_error(\"fork\");\n"
761 "    }\n"
762 "}\n"
763 msgstr ""
764
765 #. type: Plain text
766 #: build/C/man2/eventfd.2:428
767 msgid ""
768 "B<futex>(2), B<pipe>(2), B<poll>(2), B<read>(2), B<select>(2), "
769 "B<signalfd>(2), B<timerfd_create>(2), B<write>(2), B<epoll>(7), "
770 "B<sem_overview>(7)"
771 msgstr ""
772
773 #. type: TH
774 #: build/C/man2/getitimer.2:12
775 #, no-wrap
776 msgid "GETITIMER"
777 msgstr ""
778
779 #. type: TH
780 #: build/C/man2/getitimer.2:12
781 #, no-wrap
782 msgid "2012-10-01"
783 msgstr ""
784
785 #. type: Plain text
786 #: build/C/man2/getitimer.2:15
787 msgid "getitimer, setitimer - get or set value of an interval timer"
788 msgstr ""
789
790 #. type: Plain text
791 #: build/C/man2/getitimer.2:18
792 #, no-wrap
793 msgid "B<#include E<lt>sys/time.hE<gt>>\n"
794 msgstr ""
795
796 #. type: Plain text
797 #: build/C/man2/getitimer.2:20
798 #, no-wrap
799 msgid "B<int getitimer(int >I<which>B<, struct itimerval *>I<curr_value>B<);>\n"
800 msgstr ""
801
802 #. type: Plain text
803 #: build/C/man2/getitimer.2:23
804 #, no-wrap
805 msgid ""
806 "B<int setitimer(int >I<which>B<, const struct itimerval *>I<new_value>B<,>\n"
807 "B<              struct itimerval *>I<old_value>B<);>\n"
808 msgstr ""
809
810 #. type: Plain text
811 #: build/C/man2/getitimer.2:29
812 msgid ""
813 "The system provides each process with three interval timers, each "
814 "decrementing in a distinct time domain.  When any timer expires, a signal is "
815 "sent to the process, and the timer (potentially) restarts."
816 msgstr ""
817
818 #. type: TP
819 #: build/C/man2/getitimer.2:29
820 #, no-wrap
821 msgid "B<ITIMER_REAL>"
822 msgstr ""
823
824 #. type: Plain text
825 #: build/C/man2/getitimer.2:34
826 msgid "decrements in real time, and delivers B<SIGALRM> upon expiration."
827 msgstr ""
828
829 #. type: TP
830 #: build/C/man2/getitimer.2:34
831 #, no-wrap
832 msgid "B<ITIMER_VIRTUAL>"
833 msgstr ""
834
835 #. type: Plain text
836 #: build/C/man2/getitimer.2:39
837 msgid ""
838 "decrements only when the process is executing, and delivers B<SIGVTALRM> "
839 "upon expiration."
840 msgstr ""
841
842 #. type: TP
843 #: build/C/man2/getitimer.2:39
844 #, no-wrap
845 msgid "B<ITIMER_PROF>"
846 msgstr ""
847
848 #. type: Plain text
849 #: build/C/man2/getitimer.2:49
850 msgid ""
851 "decrements both when the process executes and when the system is executing "
852 "on behalf of the process.  Coupled with B<ITIMER_VIRTUAL>, this timer is "
853 "usually used to profile the time spent by the application in user and kernel "
854 "space.  B<SIGPROF> is delivered upon expiration."
855 msgstr ""
856
857 #. type: Plain text
858 #: build/C/man2/getitimer.2:51
859 msgid "Timer values are defined by the following structures:"
860 msgstr ""
861
862 #. type: Plain text
863 #: build/C/man2/getitimer.2:59
864 #, no-wrap
865 msgid ""
866 "struct itimerval {\n"
867 "    struct timeval it_interval; /* next value */\n"
868 "    struct timeval it_value;    /* current value */\n"
869 "};\n"
870 msgstr ""
871
872 #. type: Plain text
873 #: build/C/man2/getitimer.2:64
874 #, no-wrap
875 msgid ""
876 "struct timeval {\n"
877 "    time_t      tv_sec;         /* seconds */\n"
878 "    suseconds_t tv_usec;        /* microseconds */\n"
879 "};\n"
880 msgstr ""
881
882 #. type: Plain text
883 #: build/C/man2/getitimer.2:86
884 msgid ""
885 "The function B<getitimer>()  fills the structure pointed to by I<curr_value> "
886 "with the current setting for the timer specified by I<which> (one of "
887 "B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, or B<ITIMER_PROF>).  The element "
888 "I<it_value> is set to the amount of time remaining on the timer, or zero if "
889 "the timer is disabled.  Similarly, I<it_interval> is set to the reset value."
890 msgstr ""
891
892 #. type: Plain text
893 #: build/C/man2/getitimer.2:94
894 msgid ""
895 "The function B<setitimer>()  sets the specified timer to the value in "
896 "I<new_value>.  If I<old_value> is non-NULL, the old value of the timer is "
897 "stored there."
898 msgstr ""
899
900 #. type: Plain text
901 #: build/C/man2/getitimer.2:104
902 msgid ""
903 "Timers decrement from I<it_value> to zero, generate a signal, and reset to "
904 "I<it_interval>.  A timer which is set to zero (I<it_value> is zero or the "
905 "timer expires and I<it_interval> is zero) stops."
906 msgstr ""
907
908 #. type: Plain text
909 #: build/C/man2/getitimer.2:110
910 msgid ""
911 "Both I<tv_sec> and I<tv_usec> are significant in determining the duration of "
912 "a timer."
913 msgstr ""
914
915 #. type: Plain text
916 #: build/C/man2/getitimer.2:122
917 msgid ""
918 "Timers will never expire before the requested time, but may expire some "
919 "(short) time afterward, which depends on the system timer resolution and on "
920 "the system load; see B<time>(7).  (But see BUGS below.)  Upon expiration, a "
921 "signal will be generated and the timer reset.  If the timer expires while "
922 "the process is active (always true for B<ITIMER_VIRTUAL>)  the signal will "
923 "be delivered immediately when generated.  Otherwise the delivery will be "
924 "offset by a small time dependent on the system loading."
925 msgstr ""
926
927 #. type: Plain text
928 #: build/C/man2/getitimer.2:127 build/C/man2/killpg.2:94 build/C/man2/tkill.2:99
929 msgid ""
930 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
931 "appropriately."
932 msgstr ""
933
934 #. type: TP
935 #: build/C/man2/getitimer.2:128 build/C/man2/prctl.2:785 build/C/man2/sigaction.2:664 build/C/man2/sigaltstack.2:138 build/C/man2/sigpending.2:57 build/C/man2/sigprocmask.2:97 build/C/man2/sigsuspend.2:75 build/C/man2/timer_settime.2:184 build/C/man2/timerfd_create.2:342
936 #, no-wrap
937 msgid "B<EFAULT>"
938 msgstr ""
939
940 #. type: Plain text
941 #: build/C/man2/getitimer.2:135 build/C/man2/timerfd_create.2:349
942 msgid "I<new_value>, I<old_value>, or I<curr_value> is not valid a pointer."
943 msgstr ""
944
945 #. type: Plain text
946 #: build/C/man2/getitimer.2:148
947 msgid ""
948 "I<which> is not one of B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, or B<ITIMER_PROF>; "
949 "or (since Linux 2.6.22) one of the I<tv_usec> fields in the structure "
950 "pointed to by I<new_value> contains a value outside the range 0 to 999999."
951 msgstr ""
952
953 #. type: Plain text
954 #: build/C/man2/getitimer.2:158
955 msgid ""
956 "POSIX.1-2001, SVr4, 4.4BSD (this call first appeared in 4.2BSD).  "
957 "POSIX.1-2008 marks B<getitimer>()  and B<setitimer>()  obsolete, "
958 "recommending the use of the POSIX timers API (B<timer_gettime>(2), "
959 "B<timer_settime>(2), etc.) instead."
960 msgstr ""
961
962 #. type: Plain text
963 #: build/C/man2/getitimer.2:164
964 msgid ""
965 "A child created via B<fork>(2)  does not inherit its parent's interval "
966 "timers.  Interval timers are preserved across an B<execve>(2)."
967 msgstr ""
968
969 #. type: Plain text
970 #: build/C/man2/getitimer.2:174
971 msgid ""
972 "POSIX.1 leaves the interaction between B<setitimer>()  and the three "
973 "interfaces B<alarm>(2), B<sleep>(3), and B<usleep>(3)  unspecified."
974 msgstr ""
975
976 #. type: Plain text
977 #: build/C/man2/getitimer.2:176
978 msgid "The standards are silent on the meaning of the call:"
979 msgstr ""
980
981 #. type: Plain text
982 #: build/C/man2/getitimer.2:178
983 #, no-wrap
984 msgid "    setitimer(which, NULL, &old_value);\n"
985 msgstr ""
986
987 #. type: Plain text
988 #: build/C/man2/getitimer.2:181
989 msgid ""
990 "Many systems (Solaris, the BSDs, and perhaps others)  treat this as "
991 "equivalent to:"
992 msgstr ""
993
994 #. type: Plain text
995 #: build/C/man2/getitimer.2:183
996 #, no-wrap
997 msgid "    getitimer(which, &old_value);\n"
998 msgstr ""
999
1000 #. type: Plain text
1001 #: build/C/man2/getitimer.2:189
1002 msgid ""
1003 "In Linux, this is treated as being equivalent to a call in which the "
1004 "I<new_value> fields are zero; that is, the timer is disabled.  I<Don't use "
1005 "this Linux misfeature>: it is nonportable and unnecessary."
1006 msgstr ""
1007
1008 #. type: SH
1009 #: build/C/man2/getitimer.2:189 build/C/man2/kill.2:160 build/C/man3/profil.3:70 build/C/man3/psignal.3:101 build/C/man2/sigaction.2:779 build/C/man2/signalfd.2:352 build/C/man2/sigpending.2:78 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:521
1010 #, no-wrap
1011 msgid "BUGS"
1012 msgstr ""
1013
1014 #. type: Plain text
1015 #: build/C/man2/getitimer.2:198
1016 msgid ""
1017 "The generation and delivery of a signal are distinct, and only one instance "
1018 "of each of the signals listed above may be pending for a process.  Under "
1019 "very heavy loading, an B<ITIMER_REAL> timer may expire before the signal "
1020 "from a previous expiration has been delivered.  The second signal in such an "
1021 "event will be lost."
1022 msgstr ""
1023
1024 #. type: Plain text
1025 #: build/C/man2/getitimer.2:213
1026 msgid ""
1027 "On Linux kernels before 2.6.16, timer values are represented in jiffies.  If "
1028 "a request is made set a timer with a value whose jiffies representation "
1029 "exceeds B<MAX_SEC_IN_JIFFIES> (defined in I<include/linux/jiffies.h>), then "
1030 "the timer is silently truncated to this ceiling value.  On Linux/i386 "
1031 "(where, since Linux 2.6.13, the default jiffy is 0.004 seconds), this means "
1032 "that the ceiling value for a timer is approximately 99.42 days.  Since Linux "
1033 "2.6.16, the kernel uses a different internal representation for times, and "
1034 "this ceiling is removed."
1035 msgstr ""
1036
1037 #.  4 Jul 2005: It looks like this bug may remain in 2.4.x.
1038 #.      http://lkml.org/lkml/2005/7/1/165
1039 #. type: Plain text
1040 #: build/C/man2/getitimer.2:220
1041 msgid ""
1042 "On certain systems (including i386), Linux kernels before version 2.6.12 "
1043 "have a bug which will produce premature timer expirations of up to one jiffy "
1044 "under some circumstances.  This bug is fixed in kernel 2.6.12."
1045 msgstr ""
1046
1047 #.  Bugzilla report 25 Apr 2006:
1048 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6443
1049 #.  "setitimer() should reject noncanonical arguments"
1050 #. type: Plain text
1051 #: build/C/man2/getitimer.2:239
1052 msgid ""
1053 "POSIX.1-2001 says that B<setitimer>()  should fail if a I<tv_usec> value is "
1054 "specified that is outside of the range 0 to 999999.  However, in kernels up "
1055 "to and including 2.6.21, Linux does not give an error, but instead silently "
1056 "adjusts the corresponding seconds value for the timer.  From kernel 2.6.22 "
1057 "onward, this nonconformance has been repaired: an improper I<tv_usec> value "
1058 "results in an B<EINVAL> error."
1059 msgstr ""
1060
1061 #. type: Plain text
1062 #: build/C/man2/getitimer.2:246
1063 msgid ""
1064 "B<gettimeofday>(2), B<sigaction>(2), B<signal>(2), B<timer_create>(2), "
1065 "B<timerfd_create>(2), B<time>(7)"
1066 msgstr ""
1067
1068 #. type: TH
1069 #: build/C/man3/gsignal.3:27
1070 #, no-wrap
1071 msgid "GSIGNAL"
1072 msgstr ""
1073
1074 #. type: TH
1075 #: build/C/man3/gsignal.3:27 build/C/man3/profil.3:28
1076 #, no-wrap
1077 msgid "2007-07-26"
1078 msgstr ""
1079
1080 #. type: Plain text
1081 #: build/C/man3/gsignal.3:30
1082 msgid "gsignal, ssignal - software signal facility"
1083 msgstr ""
1084
1085 #. type: Plain text
1086 #: 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
1087 #, no-wrap
1088 msgid "B<#include E<lt>signal.hE<gt>>\n"
1089 msgstr ""
1090
1091 #. type: Plain text
1092 #: build/C/man3/gsignal.3:35
1093 #, no-wrap
1094 msgid "B<typedef void (*sighandler_t)(int);>\n"
1095 msgstr ""
1096
1097 #. type: Plain text
1098 #: build/C/man3/gsignal.3:37
1099 #, no-wrap
1100 msgid "B<int gsignal(int >I<signum>B<);>\n"
1101 msgstr ""
1102
1103 #. type: Plain text
1104 #: build/C/man3/gsignal.3:39
1105 #, no-wrap
1106 msgid "B<sighandler_t ssignal(int >I<signum>B<, sighandler_t >I<action>B<);>\n"
1107 msgstr ""
1108
1109 #. type: Plain text
1110 #: build/C/man3/gsignal.3:44 build/C/man2/kill.2:59 build/C/man2/killpg.2:53 build/C/man3/profil.3:40 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:67 build/C/man2/wait4.2:53
1111 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1112 msgstr ""
1113
1114 #. type: Plain text
1115 #: build/C/man3/gsignal.3:49
1116 msgid "B<gsignal>(), B<ssignal>(): _SVID_SOURCE"
1117 msgstr ""
1118
1119 #. type: Plain text
1120 #: build/C/man3/gsignal.3:57
1121 msgid ""
1122 "Don't use these functions under Linux.  Due to a historical mistake, under "
1123 "Linux these functions are aliases for B<raise>(3)  and B<signal>(2), "
1124 "respectively."
1125 msgstr ""
1126
1127 #. type: Plain text
1128 #: build/C/man3/gsignal.3:95
1129 msgid ""
1130 "Elsewhere, on System V-like systems, these functions implement software "
1131 "signaling, entirely independent of the classical B<signal>(2)  and "
1132 "B<kill>(2)  functions.  The function B<ssignal>()  defines the action to "
1133 "take when the software signal with number I<signum> is raised using the "
1134 "function B<gsignal>(), and returns the previous such action or B<SIG_DFL>.  "
1135 "The function B<gsignal>()  does the following: if no action (or the action "
1136 "B<SIG_DFL>)  was specified for I<signum>, then it does nothing and returns "
1137 "0.  If the action B<SIG_IGN> was specified for I<signum>, then it does "
1138 "nothing and returns 1.  Otherwise, it resets the action to B<SIG_DFL> and "
1139 "calls the action function with argument I<signum>, and returns the value "
1140 "returned by that function.  The range of possible values I<signum> varies "
1141 "(often 1-15 or 1-17)."
1142 msgstr ""
1143
1144 #. type: Plain text
1145 #: build/C/man3/gsignal.3:103
1146 msgid ""
1147 "These functions are available under AIX, DG/UX, HP-UX, SCO, Solaris, Tru64.  "
1148 "They are called obsolete under most of these systems, and are broken under "
1149 "Linux libc and glibc.  Some systems also have B<gsignal_r>()  and "
1150 "B<ssignal_r>()."
1151 msgstr ""
1152
1153 #. type: Plain text
1154 #: build/C/man3/gsignal.3:107
1155 msgid "B<kill>(2), B<signal>(2), B<raise>(3)"
1156 msgstr ""
1157
1158 #. type: TH
1159 #: build/C/man2/kill.2:44
1160 #, no-wrap
1161 msgid "KILL"
1162 msgstr ""
1163
1164 #. type: TH
1165 #: build/C/man2/kill.2:44
1166 #, no-wrap
1167 msgid "2013-02-05"
1168 msgstr ""
1169
1170 #. type: Plain text
1171 #: build/C/man2/kill.2:47
1172 msgid "kill - send signal to a process"
1173 msgstr ""
1174
1175 #. type: Plain text
1176 #: build/C/man2/kill.2:50
1177 #, no-wrap
1178 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
1179 msgstr ""
1180
1181 #. type: Plain text
1182 #: build/C/man2/kill.2:54
1183 #, no-wrap
1184 msgid "B<int kill(pid_t >I<pid>B<, int >I<sig>B<);>\n"
1185 msgstr ""
1186
1187 #. type: Plain text
1188 #: build/C/man2/kill.2:64
1189 msgid "B<kill>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
1190 msgstr ""
1191
1192 #. type: Plain text
1193 #: build/C/man2/kill.2:70
1194 msgid ""
1195 "The B<kill>()  system call can be used to send any signal to any process "
1196 "group or process."
1197 msgstr ""
1198
1199 #. type: Plain text
1200 #: build/C/man2/kill.2:73
1201 msgid ""
1202 "If I<pid> is positive, then signal I<sig> is sent to the process with the ID "
1203 "specified by I<pid>."
1204 msgstr ""
1205
1206 #. type: Plain text
1207 #: build/C/man2/kill.2:76
1208 msgid ""
1209 "If I<pid> equals 0, then I<sig> is sent to every process in the process "
1210 "group of the calling process."
1211 msgstr ""
1212
1213 #. type: Plain text
1214 #: build/C/man2/kill.2:80
1215 msgid ""
1216 "If I<pid> equals -1, then I<sig> is sent to every process for which the "
1217 "calling process has permission to send signals, except for process 1 "
1218 "(I<init>), but see below."
1219 msgstr ""
1220
1221 #. type: Plain text
1222 #: build/C/man2/kill.2:83
1223 msgid ""
1224 "If I<pid> is less than -1, then I<sig> is sent to every process in the "
1225 "process group whose ID is I<-pid>."
1226 msgstr ""
1227
1228 #. type: Plain text
1229 #: build/C/man2/kill.2:88
1230 msgid ""
1231 "If I<sig> is 0, then no signal is sent, but error checking is still "
1232 "performed; this can be used to check for the existence of a process ID or "
1233 "process group ID."
1234 msgstr ""
1235
1236 #. type: Plain text
1237 #: build/C/man2/kill.2:99 build/C/man2/killpg.2:89
1238 msgid ""
1239 "For a process to have permission to send a signal it must either be "
1240 "privileged (under Linux: have the B<CAP_KILL> capability), or the real or "
1241 "effective user ID of the sending process must equal the real or saved "
1242 "set-user-ID of the target process.  In the case of B<SIGCONT> it suffices "
1243 "when the sending and receiving processes belong to the same session."
1244 msgstr ""
1245
1246 #. type: Plain text
1247 #: build/C/man2/kill.2:104
1248 msgid ""
1249 "On success (at least one signal was sent), zero is returned.  On error, -1 "
1250 "is returned, and I<errno> is set appropriately."
1251 msgstr ""
1252
1253 #. type: Plain text
1254 #: build/C/man2/kill.2:108
1255 msgid "An invalid signal was specified."
1256 msgstr ""
1257
1258 #. type: TP
1259 #: build/C/man2/kill.2:108 build/C/man2/killpg.2:99 build/C/man2/prctl.2:870 build/C/man2/prctl.2:882 build/C/man2/prctl.2:892 build/C/man2/prctl.2:900 build/C/man2/rt_sigqueueinfo.2:148 build/C/man2/sigaltstack.2:151 build/C/man3/sigqueue.3:102 build/C/man2/tkill.2:103
1260 #, no-wrap
1261 msgid "B<EPERM>"
1262 msgstr ""
1263
1264 #. type: Plain text
1265 #: build/C/man2/kill.2:112 build/C/man2/killpg.2:103
1266 msgid ""
1267 "The process does not have permission to send the signal to any of the target "
1268 "processes."
1269 msgstr ""
1270
1271 #. type: TP
1272 #: build/C/man2/kill.2:112 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
1273 #, no-wrap
1274 msgid "B<ESRCH>"
1275 msgstr ""
1276
1277 #. type: Plain text
1278 #: build/C/man2/kill.2:120
1279 msgid ""
1280 "The pid or process group does not exist.  Note that an existing process "
1281 "might be a zombie, a process which already committed termination, but has "
1282 "not yet been B<wait>(2)ed for."
1283 msgstr ""
1284
1285 #. type: Plain text
1286 #: build/C/man2/kill.2:122 build/C/man2/pause.2:59 build/C/man2/wait.2:422
1287 msgid "SVr4, 4.3BSD, POSIX.1-2001."
1288 msgstr ""
1289
1290 #. type: Plain text
1291 #: build/C/man2/kill.2:130
1292 msgid ""
1293 "The only signals that can be sent to process ID 1, the I<init> process, are "
1294 "those for which I<init> has explicitly installed signal handlers.  This is "
1295 "done to assure the system is not brought down accidentally."
1296 msgstr ""
1297
1298 #. type: Plain text
1299 #: build/C/man2/kill.2:136
1300 msgid ""
1301 "POSIX.1-2001 requires that I<kill(-1,sig)> send I<sig> to all processes that "
1302 "the calling process may send signals to, except possibly for some "
1303 "implementation-defined system processes.  Linux allows a process to signal "
1304 "itself, but on Linux the call I<kill(-1,sig)> does not signal the calling "
1305 "process."
1306 msgstr ""
1307
1308 #. type: Plain text
1309 #: build/C/man2/kill.2:146
1310 msgid ""
1311 "POSIX.1-2001 requires that if a process sends a signal to itself, and the "
1312 "sending thread does not have the signal blocked, and no other thread has it "
1313 "unblocked or is waiting for it in B<sigwait>(3), at least one unblocked "
1314 "signal must be delivered to the sending thread before the B<kill>()  "
1315 "returns."
1316 msgstr ""
1317
1318 #. type: SS
1319 #: build/C/man2/kill.2:146 build/C/man3/sigpause.3:77 build/C/man2/wait.2:476
1320 #, no-wrap
1321 msgid "Linux notes"
1322 msgstr ""
1323
1324 #.  In the 0.* kernels things chopped and changed quite
1325 #.  a bit - MTK, 24 Jul 02
1326 #. type: Plain text
1327 #: build/C/man2/kill.2:160
1328 msgid ""
1329 "Across different kernel versions, Linux has enforced different rules for the "
1330 "permissions required for an unprivileged process to send a signal to another "
1331 "process.  In kernels 1.0 to 1.2.2, a signal could be sent if the effective "
1332 "user ID of the sender matched that of the receiver, or the real user ID of "
1333 "the sender matched that of the receiver.  From kernel 1.2.3 until 1.3.77, a "
1334 "signal could be sent if the effective user ID of the sender matched either "
1335 "the real or effective user ID of the receiver.  The current rules, which "
1336 "conform to POSIX.1-2001, were adopted in kernel 1.3.78."
1337 msgstr ""
1338
1339 #. type: Plain text
1340 #: build/C/man2/kill.2:170
1341 msgid ""
1342 "In 2.6 kernels up to and including 2.6.7, there was a bug that meant that "
1343 "when sending signals to a process group, B<kill>()  failed with the error "
1344 "B<EPERM> if the caller did not have permission to send the signal to I<any> "
1345 "(rather than I<all>) of the members of the process group.  Notwithstanding "
1346 "this error return, the signal was still delivered to all of the processes "
1347 "for which the caller had permission to signal."
1348 msgstr ""
1349
1350 #. type: Plain text
1351 #: build/C/man2/kill.2:180
1352 msgid ""
1353 "B<_exit>(2), B<killpg>(2), B<signal>(2), B<tkill>(2), B<exit>(3), "
1354 "B<sigqueue>(3), B<capabilities>(7), B<credentials>(7), B<signal>(7)"
1355 msgstr ""
1356
1357 #. type: TH
1358 #: build/C/man2/killpg.2:42
1359 #, no-wrap
1360 msgid "KILLPG"
1361 msgstr ""
1362
1363 #. type: TH
1364 #: build/C/man2/killpg.2:42 build/C/man3/sigset.3:26
1365 #, no-wrap
1366 msgid "2010-09-20"
1367 msgstr ""
1368
1369 #. type: Plain text
1370 #: build/C/man2/killpg.2:45
1371 msgid "killpg - send signal to a process group"
1372 msgstr ""
1373
1374 #. type: Plain text
1375 #: build/C/man2/killpg.2:49
1376 msgid "B<int killpg(int >I<pgrp>B<, int >I<sig>B<);>"
1377 msgstr ""
1378
1379 #. type: TP
1380 #: build/C/man2/killpg.2:55
1381 #, no-wrap
1382 msgid "B<killpg>():"
1383 msgstr ""
1384
1385 #. type: Plain text
1386 #: build/C/man2/killpg.2:59 build/C/man2/sigaltstack.2:46 build/C/man3/siginterrupt.3:51 build/C/man2/wait4.2:60
1387 msgid ""
1388 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
1389 "_XOPEN_SOURCE_EXTENDED"
1390 msgstr ""
1391
1392 #. type: Plain text
1393 #: build/C/man2/killpg.2:69
1394 msgid ""
1395 "B<killpg>()  sends the signal I<sig> to the process group I<pgrp>.  See "
1396 "B<signal>(7)  for a list of signals."
1397 msgstr ""
1398
1399 #. type: Plain text
1400 #: build/C/man2/killpg.2:78
1401 msgid ""
1402 "If I<pgrp> is 0, B<killpg>()  sends the signal to the calling process's "
1403 "process group.  (POSIX says: If I<pgrp> is less than or equal to 1, the "
1404 "behavior is undefined.)"
1405 msgstr ""
1406
1407 #. type: Plain text
1408 #: build/C/man2/killpg.2:99
1409 msgid "I<Sig> is not a valid signal number."
1410 msgstr ""
1411
1412 #. type: Plain text
1413 #: build/C/man2/killpg.2:107
1414 msgid "No process can be found in the process group specified by I<pgrp>."
1415 msgstr ""
1416
1417 #. type: Plain text
1418 #: build/C/man2/killpg.2:111
1419 msgid ""
1420 "The process group was given as 0 but the sending process does not have a "
1421 "process group."
1422 msgstr ""
1423
1424 #. type: Plain text
1425 #: build/C/man2/killpg.2:115
1426 msgid ""
1427 "SVr4, 4.4BSD (the B<killpg>()  function call first appeared in 4BSD), "
1428 "POSIX.1-2001."
1429 msgstr ""
1430
1431 #. type: Plain text
1432 #: build/C/man2/killpg.2:129
1433 msgid ""
1434 "There are various differences between the permission checking in BSD-type "
1435 "systems and System V-type systems.  See the POSIX rationale for B<kill>().  "
1436 "A difference not mentioned by POSIX concerns the return value B<EPERM>: BSD "
1437 "documents that no signal is sent and B<EPERM> returned when the permission "
1438 "check failed for at least one target process, while POSIX documents B<EPERM> "
1439 "only when the permission check failed for all target processes."
1440 msgstr ""
1441
1442 #. type: Plain text
1443 #: build/C/man2/killpg.2:134
1444 msgid ""
1445 "On Linux, B<killpg>()  is implemented as a library function that makes the "
1446 "call I<kill(-pgrp,\\ sig)>."
1447 msgstr ""
1448
1449 #. type: Plain text
1450 #: build/C/man2/killpg.2:140
1451 msgid ""
1452 "B<getpgrp>(2), B<kill>(2), B<signal>(2), B<capabilities>(7), "
1453 "B<credentials>(7)"
1454 msgstr ""
1455
1456 #. type: TH
1457 #: build/C/man2/pause.2:30
1458 #, no-wrap
1459 msgid "PAUSE"
1460 msgstr ""
1461
1462 #. type: TH
1463 #: build/C/man2/pause.2:30
1464 #, no-wrap
1465 msgid "2008-10-06"
1466 msgstr ""
1467
1468 #. type: Plain text
1469 #: build/C/man2/pause.2:33
1470 msgid "pause - wait for signal"
1471 msgstr ""
1472
1473 #. type: Plain text
1474 #: build/C/man2/pause.2:35 build/C/man3/profil.3:33
1475 msgid "B<#include E<lt>unistd.hE<gt>>"
1476 msgstr ""
1477
1478 #. type: Plain text
1479 #: build/C/man2/pause.2:37
1480 msgid "B<int pause(void);>"
1481 msgstr ""
1482
1483 #. type: Plain text
1484 #: build/C/man2/pause.2:42
1485 msgid ""
1486 "B<pause>()  causes the calling process (or thread) to sleep until a signal "
1487 "is delivered that either terminates the process or causes the invocation of "
1488 "a signal-catching function."
1489 msgstr ""
1490
1491 #.  .BR ERESTARTNOHAND .
1492 #. type: Plain text
1493 #: build/C/man2/pause.2:53
1494 msgid ""
1495 "B<pause>()  only returns when a signal was caught and the signal-catching "
1496 "function returned.  In this case B<pause>()  returns -1, and I<errno> is set "
1497 "to B<EINTR>."
1498 msgstr ""
1499
1500 #. type: TP
1501 #: build/C/man2/pause.2:54 build/C/man2/sigsuspend.2:79 build/C/man2/sigwaitinfo.2:123 build/C/man2/wait.2:408
1502 #, no-wrap
1503 msgid "B<EINTR>"
1504 msgstr ""
1505
1506 #. type: Plain text
1507 #: build/C/man2/pause.2:57
1508 msgid "a signal was caught and the signal-catching function returned."
1509 msgstr ""
1510
1511 #. type: Plain text
1512 #: build/C/man2/pause.2:64
1513 msgid "B<kill>(2), B<select>(2), B<signal>(2), B<sigsuspend>(2)"
1514 msgstr ""
1515
1516 #. type: TH
1517 #: build/C/man2/prctl.2:52
1518 #, no-wrap
1519 msgid "PRCTL"
1520 msgstr ""
1521
1522 #. type: TH
1523 #: build/C/man2/prctl.2:52
1524 #, no-wrap
1525 msgid "2013-02-25"
1526 msgstr ""
1527
1528 #. type: Plain text
1529 #: build/C/man2/prctl.2:55
1530 msgid "prctl - operations on a process"
1531 msgstr ""
1532
1533 #. type: Plain text
1534 #: build/C/man2/prctl.2:58
1535 #, no-wrap
1536 msgid "B<#include E<lt>sys/prctl.hE<gt>>\n"
1537 msgstr ""
1538
1539 #. type: Plain text
1540 #: build/C/man2/prctl.2:61
1541 #, no-wrap
1542 msgid ""
1543 "B<int prctl(int >I<option>B<, unsigned long >I<arg2>B<, unsigned long "
1544 ">I<arg3>B<,>\n"
1545 "B<          unsigned long >I<arg4>B<, unsigned long >I<arg5>B<);>\n"
1546 msgstr ""
1547
1548 #. type: Plain text
1549 #: build/C/man2/prctl.2:68
1550 msgid ""
1551 "B<prctl>()  is called with a first argument describing what to do (with "
1552 "values defined in I<E<lt>linux/prctl.hE<gt>>), and further arguments with a "
1553 "significance depending on the first one.  The first argument can be:"
1554 msgstr ""
1555
1556 #. type: TP
1557 #: build/C/man2/prctl.2:68
1558 #, no-wrap
1559 msgid "B<PR_CAPBSET_READ> (since Linux 2.6.25)"
1560 msgstr ""
1561
1562 #. type: Plain text
1563 #: build/C/man2/prctl.2:80
1564 msgid ""
1565 "Return (as the function result) 1 if the capability specified in I<arg2> is "
1566 "in the calling thread's capability bounding set, or 0 if it is not.  (The "
1567 "capability constants are defined in I<E<lt>linux/capability.hE<gt>>.)  The "
1568 "capability bounding set dictates whether the process can receive the "
1569 "capability through a file's permitted capability set on a subsequent call to "
1570 "B<execve>(2)."
1571 msgstr ""
1572
1573 #. type: Plain text
1574 #: build/C/man2/prctl.2:85
1575 msgid ""
1576 "If the capability specified in I<arg2> is not valid, then the call fails "
1577 "with the error B<EINVAL>."
1578 msgstr ""
1579
1580 #. type: TP
1581 #: build/C/man2/prctl.2:85
1582 #, no-wrap
1583 msgid "B<PR_CAPBSET_DROP> (since Linux 2.6.25)"
1584 msgstr ""
1585
1586 #. type: Plain text
1587 #: build/C/man2/prctl.2:94
1588 msgid ""
1589 "If the calling thread has the B<CAP_SETPCAP> capability, then drop the "
1590 "capability specified by I<arg2> from the calling thread's capability "
1591 "bounding set.  Any children of the calling thread will inherit the newly "
1592 "reduced bounding set."
1593 msgstr ""
1594
1595 #. type: Plain text
1596 #: build/C/man2/prctl.2:106
1597 msgid ""
1598 "The call fails with the error: B<EPERM> if the calling thread does not have "
1599 "the B<CAP_SETPCAP>; B<EINVAL> if I<arg2> does not represent a valid "
1600 "capability; or B<EINVAL> if file capabilities are not enabled in the kernel, "
1601 "in which case bounding sets are not supported."
1602 msgstr ""
1603
1604 #. type: TP
1605 #: build/C/man2/prctl.2:106
1606 #, no-wrap
1607 msgid "B<PR_SET_CHILD_SUBREAPER> (since Linux 3.4)"
1608 msgstr ""
1609
1610 #.  commit ebec18a6d3aa1e7d84aab16225e87fd25170ec2b
1611 #. type: Plain text
1612 #: build/C/man2/prctl.2:131
1613 msgid ""
1614 "If I<arg2> is nonzero, set the \"child subreaper\" attribute of the calling "
1615 "process; if I<arg2> is zero, unset the attribute.  When a process is marked "
1616 "as a child subreaper, all of the children that it creates, and their "
1617 "descendants, will be marked as having a subreaper.  In effect, a subreaper "
1618 "fulfills the role of B<init>(1)  for its descendant processes.  Upon "
1619 "termination of a process that is orphaned (i.e., its immediate parent has "
1620 "already terminated)  and marked as having a subreaper, the nearest still "
1621 "living ancestor subreaper will receive a B<SIGCHLD> signal and be able to "
1622 "B<wait>(2)  on the process to discover its termination status."
1623 msgstr ""
1624
1625 #. type: TP
1626 #: build/C/man2/prctl.2:131
1627 #, no-wrap
1628 msgid "B<PR_GET_CHILD_SUBREAPER> (since Linux 3.4)"
1629 msgstr ""
1630
1631 #. type: Plain text
1632 #: build/C/man2/prctl.2:136
1633 msgid ""
1634 "Return the \"child subreaper\" setting of the caller, in the location "
1635 "pointed to by I<(int\\ *) arg2>."
1636 msgstr ""
1637
1638 #. type: TP
1639 #: build/C/man2/prctl.2:136
1640 #, no-wrap
1641 msgid "B<PR_SET_DUMPABLE> (since Linux 2.3.20)"
1642 msgstr ""
1643
1644 #.  See http://marc.theaimsgroup.com/?l=linux-kernel&m=115270289030630&w=2
1645 #.  Subject:    Fix prctl privilege escalation (CVE-2006-2451)
1646 #.  From:       Marcel Holtmann <marcel () holtmann ! org>
1647 #.  Date:       2006-07-12 11:12:00
1648 #. type: Plain text
1649 #: build/C/man2/prctl.2:162
1650 msgid ""
1651 "Set the state of the flag determining whether core dumps are produced for "
1652 "the calling process upon delivery of a signal whose default behavior is to "
1653 "produce a core dump.  (Normally, this flag is set for a process by default, "
1654 "but it is cleared when a set-user-ID or set-group-ID program is executed and "
1655 "also by various system calls that manipulate process UIDs and GIDs).  In "
1656 "kernels up to and including 2.6.12, I<arg2> must be either 0 (process is not "
1657 "dumpable) or 1 (process is dumpable).  Between kernels 2.6.13 and 2.6.17, "
1658 "the value 2 was also permitted, which caused any binary which normally would "
1659 "not be dumped to be dumped readable by root only; for security reasons, this "
1660 "feature has been removed.  (See also the description of "
1661 "I</proc/sys/fs/suid_dumpable> in B<proc>(5).)  Processes that are not "
1662 "dumpable can not be attached via B<ptrace>(2)  B<PTRACE_ATTACH>."
1663 msgstr ""
1664
1665 #. type: TP
1666 #: build/C/man2/prctl.2:162
1667 #, no-wrap
1668 msgid "B<PR_GET_DUMPABLE> (since Linux 2.3.20)"
1669 msgstr ""
1670
1671 #.  Since Linux 2.6.13, the dumpable flag can have the value 2,
1672 #.  but in 2.6.13 PR_GET_DUMPABLE simply returns 1 if the dumpable
1673 #.  flags has a nonzero value.  This was fixed in 2.6.14.
1674 #. type: Plain text
1675 #: build/C/man2/prctl.2:169
1676 msgid ""
1677 "Return (as the function result) the current state of the calling process's "
1678 "dumpable flag."
1679 msgstr ""
1680
1681 #. type: TP
1682 #: build/C/man2/prctl.2:169
1683 #, no-wrap
1684 msgid "B<PR_SET_ENDIAN> (since Linux 2.6.18, PowerPC only)"
1685 msgstr ""
1686
1687 #.  Respectively 0, 1, 2
1688 #. type: Plain text
1689 #: build/C/man2/prctl.2:179
1690 msgid ""
1691 "Set the endian-ness of the calling process to the value given in I<arg2>, "
1692 "which should be one of the following: B<PR_ENDIAN_BIG>, B<PR_ENDIAN_LITTLE>, "
1693 "or B<PR_ENDIAN_PPC_LITTLE> (PowerPC pseudo little endian)."
1694 msgstr ""
1695
1696 #. type: TP
1697 #: build/C/man2/prctl.2:179
1698 #, no-wrap
1699 msgid "B<PR_GET_ENDIAN> (since Linux 2.6.18, PowerPC only)"
1700 msgstr ""
1701
1702 #. type: Plain text
1703 #: build/C/man2/prctl.2:184
1704 msgid ""
1705 "Return the endian-ness of the calling process, in the location pointed to by "
1706 "I<(int\\ *) arg2>."
1707 msgstr ""
1708
1709 #. type: TP
1710 #: build/C/man2/prctl.2:184
1711 #, no-wrap
1712 msgid "B<PR_SET_FPEMU> (since Linux 2.4.18, 2.5.9, only on ia64)"
1713 msgstr ""
1714
1715 #. type: Plain text
1716 #: build/C/man2/prctl.2:191
1717 msgid ""
1718 "Set floating-point emulation control bits to I<arg2>.  Pass "
1719 "B<PR_FPEMU_NOPRINT> to silently emulate fp operations accesses, or "
1720 "B<PR_FPEMU_SIGFPE> to not emulate fp operations and send B<SIGFPE> instead."
1721 msgstr ""
1722
1723 #. type: TP
1724 #: build/C/man2/prctl.2:191
1725 #, no-wrap
1726 msgid "B<PR_GET_FPEMU> (since Linux 2.4.18, 2.5.9, only on ia64)"
1727 msgstr ""
1728
1729 #. type: Plain text
1730 #: build/C/man2/prctl.2:196
1731 msgid ""
1732 "Return floating-point emulation control bits, in the location pointed to by "
1733 "I<(int\\ *) arg2>."
1734 msgstr ""
1735
1736 #. type: TP
1737 #: build/C/man2/prctl.2:196
1738 #, no-wrap
1739 msgid "B<PR_SET_FPEXC> (since Linux 2.4.21, 2.5.32, only on PowerPC)"
1740 msgstr ""
1741
1742 #. type: Plain text
1743 #: build/C/man2/prctl.2:209
1744 msgid ""
1745 "Set floating-point exception mode to I<arg2>.  Pass B<PR_FP_EXC_SW_ENABLE> "
1746 "to use FPEXC for FP exception enables, B<PR_FP_EXC_DIV> for floating-point "
1747 "divide by zero, B<PR_FP_EXC_OVF> for floating-point overflow, "
1748 "B<PR_FP_EXC_UND> for floating-point underflow, B<PR_FP_EXC_RES> for "
1749 "floating-point inexact result, B<PR_FP_EXC_INV> for floating-point invalid "
1750 "operation, B<PR_FP_EXC_DISABLED> for FP exceptions disabled, "
1751 "B<PR_FP_EXC_NONRECOV> for async nonrecoverable exception mode, "
1752 "B<PR_FP_EXC_ASYNC> for async recoverable exception mode, "
1753 "B<PR_FP_EXC_PRECISE> for precise exception mode."
1754 msgstr ""
1755
1756 #. type: TP
1757 #: build/C/man2/prctl.2:209
1758 #, no-wrap
1759 msgid "B<PR_GET_FPEXC> (since Linux 2.4.21, 2.5.32, only on PowerPC)"
1760 msgstr ""
1761
1762 #. type: Plain text
1763 #: build/C/man2/prctl.2:214
1764 msgid ""
1765 "Return floating-point exception mode, in the location pointed to by I<(int\\ "
1766 "*) arg2>."
1767 msgstr ""
1768
1769 #. type: TP
1770 #: build/C/man2/prctl.2:214
1771 #, no-wrap
1772 msgid "B<PR_SET_KEEPCAPS> (since Linux 2.2.18)"
1773 msgstr ""
1774
1775 #. type: Plain text
1776 #: build/C/man2/prctl.2:232
1777 msgid ""
1778 "Set the state of the thread's \"keep capabilities\" flag, which determines "
1779 "whether the threads's permitted capability set is cleared when a change is "
1780 "made to the threads's user IDs such that the threads's real UID, effective "
1781 "UID, and saved set-user-ID all become nonzero when at least one of them "
1782 "previously had the value 0.  By default, the permitted capability set is "
1783 "cleared when such a change is made; setting the \"keep capabilities\" flag "
1784 "prevents it from being cleared.  I<arg2> must be either 0 (permitted "
1785 "capabilities are cleared)  or 1 (permitted capabilities are kept).  (A "
1786 "thread's I<effective> capability set is always cleared when such a "
1787 "credential change is made, regardless of the setting of the \"keep "
1788 "capabilities\" flag.)  The \"keep capabilities\" value will be reset to 0 on "
1789 "subsequent calls to B<execve>(2)."
1790 msgstr ""
1791
1792 #. type: TP
1793 #: build/C/man2/prctl.2:232
1794 #, no-wrap
1795 msgid "B<PR_GET_KEEPCAPS> (since Linux 2.2.18)"
1796 msgstr ""
1797
1798 #. type: Plain text
1799 #: build/C/man2/prctl.2:236
1800 msgid ""
1801 "Return (as the function result) the current state of the calling threads's "
1802 "\"keep capabilities\" flag."
1803 msgstr ""
1804
1805 #. type: TP
1806 #: build/C/man2/prctl.2:236
1807 #, no-wrap
1808 msgid "B<PR_SET_NAME> (since Linux 2.6.9)"
1809 msgstr ""
1810
1811 #.  TASK_COMM_LEN in include/linux/sched.h
1812 #. type: Plain text
1813 #: build/C/man2/prctl.2:244
1814 msgid ""
1815 "Set the process name for the calling thread, using the value in the location "
1816 "pointed to by I<(char\\ *) arg2>.  The name can be up to 16 bytes long, and "
1817 "should be null-terminated if it contains fewer bytes."
1818 msgstr ""
1819
1820 #. type: TP
1821 #: build/C/man2/prctl.2:244
1822 #, no-wrap
1823 msgid "B<PR_GET_NAME> (since Linux 2.6.11)"
1824 msgstr ""
1825
1826 #. type: Plain text
1827 #: build/C/man2/prctl.2:251
1828 msgid ""
1829 "Return the name for the calling thread, in the buffer pointed to by "
1830 "I<(char\\ *) arg2>.  The buffer should allow space for up to 16 bytes; the "
1831 "returned string will be null-terminated if it is shorter than that."
1832 msgstr ""
1833
1834 #. type: TP
1835 #: build/C/man2/prctl.2:251
1836 #, no-wrap
1837 msgid "B<PR_SET_NO_NEW_PRIVS> (since Linux 3.5)"
1838 msgstr ""
1839
1840 #. type: Plain text
1841 #: build/C/man2/prctl.2:274
1842 msgid ""
1843 "Set the calling process's I<no_new_privs> bit to the value in I<arg2>.  With "
1844 "I<no_new_privs> set to 1, B<execve>(2)  promises not to grant privileges to "
1845 "do anything that could not have been done without the B<execve>(2)  call "
1846 "(for example, rendering the set-user-ID and set-group-ID permission bits, "
1847 "and file capabilities non-functional).  Once set, this bit cannot be unset.  "
1848 "The setting of this bit is inherited by children created by B<fork>(2)  and "
1849 "B<clone>(2), and preserved across B<execve>(2)."
1850 msgstr ""
1851
1852 #. type: Plain text
1853 #: build/C/man2/prctl.2:277
1854 msgid ""
1855 "For more information, see the kernel source file "
1856 "I<Documentation/prctl/no_new_privs.txt>."
1857 msgstr ""
1858
1859 #. type: TP
1860 #: build/C/man2/prctl.2:277
1861 #, no-wrap
1862 msgid "B<PR_GET_NO_NEW_PRIVS> (since Linux 3.5)"
1863 msgstr ""
1864
1865 #. type: Plain text
1866 #: build/C/man2/prctl.2:288
1867 msgid ""
1868 "Return the value of the I<no_new_privs> bit for the current process.  A "
1869 "value of 0 indicates the regular B<execve>(2)  behavior.  A value of 1 "
1870 "indicates B<execve>(2)  will operate in the privilege-restricting mode "
1871 "described above."
1872 msgstr ""
1873
1874 #. type: TP
1875 #: build/C/man2/prctl.2:288
1876 #, no-wrap
1877 msgid "B<PR_SET_PDEATHSIG> (since Linux 2.1.57)"
1878 msgstr ""
1879
1880 #. type: Plain text
1881 #: build/C/man2/prctl.2:299
1882 msgid ""
1883 "Set the parent process death signal of the calling process to I<arg2> "
1884 "(either a signal value in the range 1..maxsig, or 0 to clear).  This is the "
1885 "signal that the calling process will get when its parent dies.  This value "
1886 "is cleared for the child of a B<fork>(2)  and (since Linux 2.4.36 / 2.6.23)  "
1887 "when executing a set-user-ID or set-group-ID binary."
1888 msgstr ""
1889
1890 #. type: TP
1891 #: build/C/man2/prctl.2:299
1892 #, no-wrap
1893 msgid "B<PR_GET_PDEATHSIG> (since Linux 2.3.15)"
1894 msgstr ""
1895
1896 #. type: Plain text
1897 #: build/C/man2/prctl.2:304
1898 msgid ""
1899 "Return the current value of the parent process death signal, in the location "
1900 "pointed to by I<(int\\ *) arg2>."
1901 msgstr ""
1902
1903 #. type: TP
1904 #: build/C/man2/prctl.2:304
1905 #, no-wrap
1906 msgid "B<PR_SET_PTRACER> (since Linux 3.4)"
1907 msgstr ""
1908
1909 #.  commit 2d514487faf188938a4ee4fb3464eeecfbdcf8eb
1910 #.  commit bf06189e4d14641c0148bea16e9dd24943862215
1911 #. type: Plain text
1912 #: build/C/man2/prctl.2:329
1913 msgid ""
1914 "This is only meaningful when the Yama LSM is enabled and in mode 1 "
1915 "(\"restricted ptrace\", visible via I</proc/sys/kernel/yama/ptrace_scope>).  "
1916 "When a \"ptracer process ID\" is passed in I<arg2>, the caller is declaring "
1917 "that the ptracer process can B<ptrace>(2)  the calling process as if it were "
1918 "a direct process ancestor.  Each B<PR_SET_PTRACER> operation replaces the "
1919 "previous \"ptracer process ID\".  Employing B<PR_SET_PTRACER> with I<arg2> "
1920 "set to 0 clears the caller's \"ptracer process ID\".  If I<arg2> is "
1921 "B<PR_SET_PTRACER_ANY,> the ptrace restrictions introduced by Yama are "
1922 "effectively disabled for the calling process."
1923 msgstr ""
1924
1925 #. type: Plain text
1926 #: build/C/man2/prctl.2:332
1927 msgid ""
1928 "For further information, see the kernel source file "
1929 "I<Documentation/security/Yama.txt>."
1930 msgstr ""
1931
1932 #. type: TP
1933 #: build/C/man2/prctl.2:332
1934 #, no-wrap
1935 msgid "B<PR_SET_SECCOMP> (since Linux 2.6.23)"
1936 msgstr ""
1937
1938 #.  See http://thread.gmane.org/gmane.linux.kernel/542632
1939 #.  [PATCH 0 of 2] seccomp updates
1940 #.  andrea@cpushare.com
1941 #. type: Plain text
1942 #: build/C/man2/prctl.2:343
1943 msgid ""
1944 "Set the secure computing (seccomp) mode for the calling thread, to limit the "
1945 "available system calls.  The seccomp mode is selected via I<arg2>.  (The "
1946 "seccomp constants are defined in I<E<lt>linux/seccomp.hE<gt>>.)"
1947 msgstr ""
1948
1949 #. type: Plain text
1950 #: build/C/man2/prctl.2:364
1951 msgid ""
1952 "With I<arg2> set to B<SECCOMP_MODE_STRICT> the only system calls that the "
1953 "thread is permitted to make are B<read>(2), B<write>(2), B<_exit>(2), and "
1954 "B<sigreturn>(2).  Other system calls result in the delivery of a B<SIGKILL> "
1955 "signal.  Strict secure computing mode is useful for number-crunching "
1956 "applications that may need to execute untrusted byte code, perhaps obtained "
1957 "by reading from a pipe or socket.  This operation is only available if the "
1958 "kernel is configured with B<CONFIG_SECCOMP> enabled."
1959 msgstr ""
1960
1961 #. type: Plain text
1962 #: build/C/man2/prctl.2:379
1963 msgid ""
1964 "With I<arg2> set to B<SECCOMP_MODE_FILTER> (since Linux 3.5)  the system "
1965 "calls allowed are defined by a pointer to a Berkeley Packet Filter passed in "
1966 "I<arg3>.  This argument is a pointer to I<struct sock_fprog>; it can be "
1967 "designed to filter arbitrary system calls and system call arguments.  This "
1968 "mode is only available if the kernel is configured with "
1969 "B<CONFIG_SECCOMP_FILTER> enabled."
1970 msgstr ""
1971
1972 #. type: Plain text
1973 #: build/C/man2/prctl.2:394
1974 msgid ""
1975 "If B<SECCOMP_MODE_FILTER> filters permit B<fork>(2), then the seccomp mode "
1976 "is inherited by children created by B<fork>(2); if B<execve>(2)  is "
1977 "permitted, then the seccomp mode is preserved across B<execve>(2).  If the "
1978 "filters permit B<prctl>()  calls, then additional filters can be added; they "
1979 "are run in order until the first non-allow result is seen."
1980 msgstr ""
1981
1982 #. type: Plain text
1983 #: build/C/man2/prctl.2:397
1984 msgid ""
1985 "For further information, see the kernel source file "
1986 "I<Documentation/prctl/seccomp_filter.txt>."
1987 msgstr ""
1988
1989 #. type: TP
1990 #: build/C/man2/prctl.2:397
1991 #, no-wrap
1992 msgid "B<PR_GET_SECCOMP> (since Linux 2.6.23)"
1993 msgstr ""
1994
1995 #. type: Plain text
1996 #: build/C/man2/prctl.2:412
1997 msgid ""
1998 "Return the secure computing mode of the calling thread.  If the caller is "
1999 "not in secure computing mode, this operation returns 0; if the caller is in "
2000 "strict secure computing mode, then the B<prctl>()  call will cause a "
2001 "B<SIGKILL> signal to be sent to the process.  If the caller is in filter "
2002 "mode, and this system call is allowed by the seccomp filters, it returns 2.  "
2003 "This operation is only available if the kernel is configured with "
2004 "B<CONFIG_SECCOMP> enabled."
2005 msgstr ""
2006
2007 #. type: TP
2008 #: build/C/man2/prctl.2:412
2009 #, no-wrap
2010 msgid "B<PR_SET_SECUREBITS> (since Linux 2.6.26)"
2011 msgstr ""
2012
2013 #. type: Plain text
2014 #: build/C/man2/prctl.2:418
2015 msgid ""
2016 "Set the \"securebits\" flags of the calling thread to the value supplied in "
2017 "I<arg2>.  See B<capabilities>(7)."
2018 msgstr ""
2019
2020 #. type: TP
2021 #: build/C/man2/prctl.2:418
2022 #, no-wrap
2023 msgid "B<PR_GET_SECUREBITS> (since Linux 2.6.26)"
2024 msgstr ""
2025
2026 #. type: Plain text
2027 #: build/C/man2/prctl.2:424
2028 msgid ""
2029 "Return (as the function result)  the \"securebits\" flags of the calling "
2030 "thread.  See B<capabilities>(7)."
2031 msgstr ""
2032
2033 #. type: TP
2034 #: build/C/man2/prctl.2:424
2035 #, no-wrap
2036 msgid "B<PR_GET_TID_ADDRESS> (since Linux 3.5)"
2037 msgstr ""
2038
2039 #.  commit 300f786b2683f8bb1ec0afb6e1851183a479c86d
2040 #. type: Plain text
2041 #: build/C/man2/prctl.2:439
2042 msgid ""
2043 "Retrieve the I<clear_child_tid> address set by B<set_tid_address>(2)  and "
2044 "the B<clone>(2)  B<CLONE_CHILD_CLEARTID> flag, in the location pointed to by "
2045 "I<(int\\ **)\\ arg2>.  This feature is available only if the kernel is built "
2046 "with the B<CONFIG_CHECKPOINT_RESTORE> option enabled."
2047 msgstr ""
2048
2049 #. type: TP
2050 #: build/C/man2/prctl.2:439
2051 #, no-wrap
2052 msgid "B<PR_SET_TIMERSLACK> (since Linux 2.6.28)"
2053 msgstr ""
2054
2055 #.  See https://lwn.net/Articles/369549/
2056 #.  commit 6976675d94042fbd446231d1bd8b7de71a980ada
2057 #.  It seems that it's not possible to set the timer slack to zero;
2058 #.  The minimum value is 1? Seems a little strange.
2059 #. type: Plain text
2060 #: build/C/man2/prctl.2:458
2061 msgid ""
2062 "Set the current timer slack for the calling thread to the nanosecond value "
2063 "supplied in I<arg2>.  If I<arg2> is less than or equal to zero, reset the "
2064 "current timer slack to the thread's default timer slack value.  The timer "
2065 "slack is used by the kernel to group timer expirations for the calling "
2066 "thread that are close to one another; as a consequence, timer expirations "
2067 "for the thread may be up to the specified number of nanoseconds late (but "
2068 "will never expire early).  Grouping timer expirations can help reduce system "
2069 "power consumption by minimizing CPU wake-ups."
2070 msgstr ""
2071
2072 #.  List obtained by grepping for futex usage in glibc source
2073 #. type: Plain text
2074 #: build/C/man2/prctl.2:478
2075 msgid ""
2076 "The timer expirations affected by timer slack are those set by B<select>(2), "
2077 "B<pselect>(2), B<poll>(2), B<ppoll>(2), B<epoll_wait>(2), B<epoll_pwait>(2), "
2078 "B<clock_nanosleep>(2), B<nanosleep>(2), and B<futex>(2)  (and thus the "
2079 "library functions implemented via futexes, including "
2080 "B<pthread_cond_timedwait>(3), B<pthread_mutex_timedlock>(3), "
2081 "B<pthread_rwlock_timedrdlock>(3), B<pthread_rwlock_timedwrlock>(3), and "
2082 "B<sem_timedwait>(3))."
2083 msgstr ""
2084
2085 #. type: Plain text
2086 #: build/C/man2/prctl.2:482
2087 msgid ""
2088 "Timer slack is not applied to threads that are scheduled under a realtime "
2089 "scheduling policy (see B<sched_setscheduler>(2))."
2090 msgstr ""
2091
2092 #. type: Plain text
2093 #: build/C/man2/prctl.2:499
2094 msgid ""
2095 "Each thread has two associated timer slack values: a \"default\" value, and "
2096 "a \"current\" value.  The current value is the one that governs grouping of "
2097 "timer expirations.  When a new thread is created, the two timer slack values "
2098 "are made the same as the current value of the creating thread.  Thereafter, "
2099 "a thread can adjust its current timer slack value via B<PR_SET_TIMERSLACK> "
2100 "(the default value can't be changed).  The timer slack values of I<init> "
2101 "(PID 1), the ancestor of all processes, are 50,000 nanoseconds (50 "
2102 "microseconds).  The timer slack values are preserved across B<execve>(2)."
2103 msgstr ""
2104
2105 #. type: TP
2106 #: build/C/man2/prctl.2:499
2107 #, no-wrap
2108 msgid "B<PR_GET_TIMERSLACK> (since Linux 2.6.28)"
2109 msgstr ""
2110
2111 #. type: Plain text
2112 #: build/C/man2/prctl.2:502
2113 msgid "Return the current timer slack value of the calling thread."
2114 msgstr ""
2115
2116 #. type: TP
2117 #: build/C/man2/prctl.2:502
2118 #, no-wrap
2119 msgid "B<PR_SET_TIMING> (since Linux 2.6.0-test4)"
2120 msgstr ""
2121
2122 #.  0
2123 #.  1
2124 #.  PR_TIMING_TIMESTAMP doesn't do anything in 2.6.26-rc8,
2125 #.  and looking at the patch history, it appears
2126 #.  that it never did anything.
2127 #. type: Plain text
2128 #: build/C/man2/prctl.2:519
2129 msgid ""
2130 "Set whether to use (normal, traditional) statistical process timing or "
2131 "accurate timestamp-based process timing, by passing B<PR_TIMING_STATISTICAL> "
2132 "or B<PR_TIMING_TIMESTAMP> to I<arg2>.  B<PR_TIMING_TIMESTAMP> is not "
2133 "currently implemented (attempting to set this mode will yield the error "
2134 "B<EINVAL>)."
2135 msgstr ""
2136
2137 #. type: TP
2138 #: build/C/man2/prctl.2:519
2139 #, no-wrap
2140 msgid "B<PR_GET_TIMING> (since Linux 2.6.0-test4)"
2141 msgstr ""
2142
2143 #. type: Plain text
2144 #: build/C/man2/prctl.2:523
2145 msgid ""
2146 "Return (as the function result) which process timing method is currently in "
2147 "use."
2148 msgstr ""
2149
2150 #. type: TP
2151 #: build/C/man2/prctl.2:523
2152 #, no-wrap
2153 msgid "B<PR_TASK_PERF_EVENTS_DISABLE> (since Linux 2.6.31)"
2154 msgstr ""
2155
2156 #. type: Plain text
2157 #: build/C/man2/prctl.2:532
2158 msgid ""
2159 "Disable all performance counters attached to the calling process, regardless "
2160 "of whether the counters were created by this process or another process.  "
2161 "Performance counters created by the calling process for other processes are "
2162 "unaffected.  For more information on performance counters, see the Linux "
2163 "kernel source file I<tools/perf/design.txt>."
2164 msgstr ""
2165
2166 #.  commit 1d1c7ddbfab358445a542715551301b7fc363e28
2167 #. type: Plain text
2168 #: build/C/man2/prctl.2:538
2169 msgid ""
2170 "Originally called B<PR_TASK_PERF_COUNTERS_DISABLE>; renamed (with same "
2171 "numerical value)  in Linux 2.6.32."
2172 msgstr ""
2173
2174 #. type: TP
2175 #: build/C/man2/prctl.2:538
2176 #, no-wrap
2177 msgid "B<PR_TASK_PERF_EVENTS_ENABLE> (since Linux 2.6.31)"
2178 msgstr ""
2179
2180 #. type: Plain text
2181 #: build/C/man2/prctl.2:543
2182 msgid ""
2183 "The converse of B<PR_TASK_PERF_EVENTS_DISABLE>; enable performance counters "
2184 "attached to the calling process."
2185 msgstr ""
2186
2187 #.  commit 1d1c7ddbfab358445a542715551301b7fc363e28
2188 #.  commit cdd6c482c9ff9c55475ee7392ec8f672eddb7be6
2189 #. type: Plain text
2190 #: build/C/man2/prctl.2:550
2191 msgid "Originally called B<PR_TASK_PERF_COUNTERS_ENABLE>; renamed in Linux 2.6.32."
2192 msgstr ""
2193
2194 #. type: TP
2195 #: build/C/man2/prctl.2:550
2196 #, no-wrap
2197 msgid "B<PR_SET_TSC> (since Linux 2.6.26, x86 only)"
2198 msgstr ""
2199
2200 #. type: Plain text
2201 #: build/C/man2/prctl.2:563
2202 msgid ""
2203 "Set the state of the flag determining whether the timestamp counter can be "
2204 "read by the process.  Pass B<PR_TSC_ENABLE> to I<arg2> to allow it to be "
2205 "read, or B<PR_TSC_SIGSEGV> to generate a B<SIGSEGV> when the process tries "
2206 "to read the timestamp counter."
2207 msgstr ""
2208
2209 #. type: TP
2210 #: build/C/man2/prctl.2:563
2211 #, no-wrap
2212 msgid "B<PR_GET_TSC> (since Linux 2.6.26, x86 only)"
2213 msgstr ""
2214
2215 #. type: Plain text
2216 #: build/C/man2/prctl.2:569
2217 msgid ""
2218 "Return the state of the flag determining whether the timestamp counter can "
2219 "be read, in the location pointed to by I<(int\\ *) arg2>."
2220 msgstr ""
2221
2222 #. type: TP
2223 #: build/C/man2/prctl.2:569
2224 #, no-wrap
2225 msgid "B<PR_SET_UNALIGN>"
2226 msgstr ""
2227
2228 #. type: Plain text
2229 #: build/C/man2/prctl.2:579
2230 msgid ""
2231 "(Only on: ia64, since Linux 2.3.48; parisc, since Linux 2.6.15; PowerPC, "
2232 "since Linux 2.6.18; Alpha, since Linux 2.6.22)  Set unaligned access control "
2233 "bits to I<arg2>.  Pass B<PR_UNALIGN_NOPRINT> to silently fix up unaligned "
2234 "user accesses, or B<PR_UNALIGN_SIGBUS> to generate B<SIGBUS> on unaligned "
2235 "user access."
2236 msgstr ""
2237
2238 #. type: TP
2239 #: build/C/man2/prctl.2:579
2240 #, no-wrap
2241 msgid "B<PR_GET_UNALIGN>"
2242 msgstr ""
2243
2244 #. type: Plain text
2245 #: build/C/man2/prctl.2:586
2246 msgid ""
2247 "(see B<PR_SET_UNALIGN> for information on versions and architectures)  "
2248 "Return unaligned access control bits, in the location pointed to by I<(int\\ "
2249 "*) arg2>."
2250 msgstr ""
2251
2252 #. type: TP
2253 #: build/C/man2/prctl.2:586
2254 #, no-wrap
2255 msgid "B<PR_MCE_KILL> (since Linux 2.6.32)"
2256 msgstr ""
2257
2258 #. type: Plain text
2259 #: build/C/man2/prctl.2:626
2260 msgid ""
2261 "Set the machine check memory corruption kill policy for the current thread.  "
2262 "If I<arg2> is B<PR_MCE_KILL_CLEAR>, clear the thread memory corruption kill "
2263 "policy and use the system-wide default.  (The system-wide default is defined "
2264 "by I</proc/sys/vm/memory_failure_early_kill>; see B<proc>(5).)  If I<arg2> "
2265 "is B<PR_MCE_KILL_SET>, use a thread-specific memory corruption kill policy.  "
2266 "In this case, I<arg3> defines whether the policy is I<early kill> "
2267 "(B<PR_MCE_KILL_EARLY>), I<late kill> (B<PR_MCE_KILL_LATE>), or the "
2268 "system-wide default (B<PR_MCE_KILL_DEFAULT>).  Early kill means that the "
2269 "thread receives a B<SIGBUS> signal as soon as hardware memory corruption is "
2270 "detected inside its address space.  In late kill mode, the process is only "
2271 "killed when it accesses a corrupted page.  See B<sigaction>(2)  for more "
2272 "information on the B<SIGBUS> signal.  The policy is inherited by children.  "
2273 "The remaining unused B<prctl>()  arguments must be zero for future "
2274 "compatibility."
2275 msgstr ""
2276
2277 #. type: TP
2278 #: build/C/man2/prctl.2:626
2279 #, no-wrap
2280 msgid "B<PR_MCE_KILL_GET> (since Linux 2.6.32)"
2281 msgstr ""
2282
2283 #. type: Plain text
2284 #: build/C/man2/prctl.2:632
2285 msgid ""
2286 "Return the current per-process machine check kill policy.  All unused "
2287 "B<prctl>()  arguments must be zero."
2288 msgstr ""
2289
2290 #. type: TP
2291 #: build/C/man2/prctl.2:632
2292 #, no-wrap
2293 msgid "B<PR_SET_MM> (since Linux 3.3)"
2294 msgstr ""
2295
2296 #. type: Plain text
2297 #: build/C/man2/prctl.2:652
2298 msgid ""
2299 "Modify certain kernel memory map descriptor fields of the calling process.  "
2300 "Usually these fields are set by the kernel and dynamic loader (see "
2301 "B<ld.so>(8)  for more information) and a regular application should not use "
2302 "this feature.  However, there are cases, such as self-modifying programs, "
2303 "where a program might find it useful to change its own memory map.  This "
2304 "feature is available only if the kernel is built with the "
2305 "B<CONFIG_CHECKPOINT_RESTORE> option enabled.  The calling process must have "
2306 "the B<CAP_SYS_RESOURCE> capability.  The value in I<arg2> is one of the "
2307 "options below, while I<arg3> provides a new value for the option."
2308 msgstr ""
2309
2310 #. type: TP
2311 #: build/C/man2/prctl.2:653
2312 #, no-wrap
2313 msgid "B<PR_SET_MM_START_CODE>"
2314 msgstr ""
2315
2316 #. type: Plain text
2317 #: build/C/man2/prctl.2:662
2318 msgid ""
2319 "Set the address above which the program text can run.  The corresponding "
2320 "memory area must be readable and executable, but not writable or sharable "
2321 "(see B<mprotect>(2)  and B<mmap>(2)  for more information)."
2322 msgstr ""
2323
2324 #. type: TP
2325 #: build/C/man2/prctl.2:662
2326 #, no-wrap
2327 msgid "B<PR_SET_MM_END_CODE>"
2328 msgstr ""
2329
2330 #. type: Plain text
2331 #: build/C/man2/prctl.2:667
2332 msgid ""
2333 "Set the address below which the program text can run.  The corresponding "
2334 "memory area must be readable and executable, but not writable or sharable."
2335 msgstr ""
2336
2337 #. type: TP
2338 #: build/C/man2/prctl.2:667
2339 #, no-wrap
2340 msgid "B<PR_SET_MM_START_DATA>"
2341 msgstr ""
2342
2343 #. type: Plain text
2344 #: build/C/man2/prctl.2:673
2345 msgid ""
2346 "Set the address above which initialized and uninitialized (bss) data are "
2347 "placed.  The corresponding memory area must be readable and writable, but "
2348 "not executable or sharable."
2349 msgstr ""
2350
2351 #. type: TP
2352 #: build/C/man2/prctl.2:673
2353 #, no-wrap
2354 msgid "B<PR_SET_MM_END_DATA>"
2355 msgstr ""
2356
2357 #. type: Plain text
2358 #: build/C/man2/prctl.2:679
2359 msgid ""
2360 "Set the address below which initialized and uninitialized (bss) data are "
2361 "placed.  The corresponding memory area must be readable and writable, but "
2362 "not executable or sharable."
2363 msgstr ""
2364
2365 #. type: TP
2366 #: build/C/man2/prctl.2:679
2367 #, no-wrap
2368 msgid "B<PR_SET_MM_START_STACK>"
2369 msgstr ""
2370
2371 #. type: Plain text
2372 #: build/C/man2/prctl.2:683
2373 msgid ""
2374 "Set the start address of the stack.  The corresponding memory area must be "
2375 "readable and writable."
2376 msgstr ""
2377
2378 #. type: TP
2379 #: build/C/man2/prctl.2:683
2380 #, no-wrap
2381 msgid "B<PR_SET_MM_START_BRK>"
2382 msgstr ""
2383
2384 #. type: Plain text
2385 #: build/C/man2/prctl.2:695
2386 msgid ""
2387 "Set the address above which the program heap can be expanded with B<brk>(2)  "
2388 "call.  The address must be greater than the ending address of the current "
2389 "program data segment.  In addition, the combined size of the resulting heap "
2390 "and the size of the data segment can't exceed the B<RLIMIT_DATA> resource "
2391 "limit (see B<setrlimit>(2))."
2392 msgstr ""
2393
2394 #. type: TP
2395 #: build/C/man2/prctl.2:695
2396 #, no-wrap
2397 msgid "B<PR_SET_MM_BRK>"
2398 msgstr ""
2399
2400 #.  FIXME The following (until ========) is not yet in mainline kernel,
2401 #.  so commented out for the moment.
2402 #.  .TP
2403 #.  .BR PR_SET_MM_ARG_START
2404 #.  Set the address above which the program command line is placed.
2405 #.  .TP
2406 #.  .BR PR_SET_MM_ARG_END
2407 #.  Set the address below which the program command line is placed.
2408 #.  .TP
2409 #.  .BR PR_SET_MM_ENV_START
2410 #.  Set the address above which the program environment is placed.
2411 #.  .TP
2412 #.  .BR PR_SET_MM_ENV_END
2413 #.  Set the address below which the program environment is placed.
2414 #.  .IP
2415 #.  The address passed with
2416 #.  .BR PR_SET_MM_ARG_START ,
2417 #.  .BR PR_SET_MM_ARG_END ,
2418 #.  .BR PR_SET_MM_ENV_START ,
2419 #.  and
2420 #.  .BR PR_SET_MM_ENV_END
2421 #.  should belong to a process stack area.
2422 #.  Thus, the corresponding memory area must be readable, writable, and
2423 #.  (depending on the kernel configuration) have the
2424 #.  .BR MAP_GROWSDOWN
2425 #.  attribute set (see
2426 #.  .BR mmap (2)).
2427 #.  .TP
2428 #.  .BR PR_SET_MM_AUXV
2429 #.  Set a new auxiliary vector.
2430 #.  The
2431 #.  .I arg3
2432 #.  argument should provide the address of the vector.
2433 #.  The
2434 #.  .I arg4
2435 #.  is the size of the vector.
2436 #.  .TP
2437 #.  .BR PR_SET_MM_EXE_FILE
2438 #.  Supersede the
2439 #.  .IR /proc/pid/exe
2440 #.  symbolic link with a new one pointing to a new executable file
2441 #.  identified by the file descriptor provided in
2442 #.  .I arg3
2443 #.  argument.
2444 #.  The file descriptor should be obtained with a regular
2445 #.  .BR open (2)
2446 #.  call.
2447 #.  .IP
2448 #.  To change the symbolic link, one needs to unmap all existing
2449 #.  executable memory areas, including those created by the kernel itself
2450 #.  (for example the kernel usually creates at least one executable
2451 #.  memory area for the ELF
2452 #.  .IR .text
2453 #.  section).
2454 #.  .IP
2455 #.  The second limitation is that such transitions can be done only once
2456 #.  in a process life time.
2457 #.  Any further attempts will be rejected.
2458 #.  This should help system administrators to monitor unusual
2459 #.  symbolic-link transitions over all process running in a system.
2460 #.  ========== END FIXME
2461 #. type: Plain text
2462 #: build/C/man2/prctl.2:764
2463 msgid ""
2464 "Set the current B<brk>(2)  value.  The requirements for the address are the "
2465 "same as for the B<PR_SET_MM_START_BRK> option."
2466 msgstr ""
2467
2468 #. type: Plain text
2469 #: build/C/man2/prctl.2:784
2470 msgid ""
2471 "On success, B<PR_GET_DUMPABLE>, B<PR_GET_KEEPCAPS>, B<PR_GET_NO_NEW_PRIVS>, "
2472 "B<PR_CAPBSET_READ>, B<PR_GET_TIMING>, B<PR_GET_SECUREBITS>, "
2473 "B<PR_MCE_KILL_GET>, and (if it returns)  B<PR_GET_SECCOMP> return the "
2474 "nonnegative values described above.  All other I<option> values return 0 on "
2475 "success.  On error, -1 is returned, and I<errno> is set appropriately."
2476 msgstr ""
2477
2478 #. type: Plain text
2479 #: build/C/man2/prctl.2:789
2480 msgid "I<arg2> is an invalid address."
2481 msgstr ""
2482
2483 #. type: Plain text
2484 #: build/C/man2/prctl.2:794
2485 msgid "The value of I<option> is not recognized."
2486 msgstr ""
2487
2488 #. type: Plain text
2489 #: build/C/man2/prctl.2:806
2490 msgid ""
2491 "I<option> is B<PR_MCE_KILL> or B<PR_MCE_KILL_GET> or B<PR_SET_MM>, and "
2492 "unused B<prctl>()  arguments were not specified as zero."
2493 msgstr ""
2494
2495 #. type: Plain text
2496 #: build/C/man2/prctl.2:811
2497 msgid "I<arg2> is not valid value for this I<option>."
2498 msgstr ""
2499
2500 #. type: Plain text
2501 #: build/C/man2/prctl.2:820
2502 msgid ""
2503 "I<option> is B<PR_SET_SECCOMP> or B<PR_GET_SECCOMP>, and the kernel was not "
2504 "configured with B<CONFIG_SECCOMP>."
2505 msgstr ""
2506
2507 #. type: Plain text
2508 #: build/C/man2/prctl.2:826
2509 msgid "I<option> is B<PR_SET_MM>, and one of the following is true"
2510 msgstr ""
2511
2512 #. type: Plain text
2513 #: build/C/man2/prctl.2:832
2514 msgid "I<arg4> or I<arg5> is nonzero;"
2515 msgstr ""
2516
2517 #. type: Plain text
2518 #: build/C/man2/prctl.2:837
2519 msgid ""
2520 "I<arg3> is greater than B<TASK_SIZE> (the limit on the size of the user "
2521 "address space for this architecture);"
2522 msgstr ""
2523
2524 #. type: Plain text
2525 #: build/C/man2/prctl.2:847
2526 msgid ""
2527 "I<arg2> is B<PR_SET_MM_START_CODE>, B<PR_SET_MM_END_CODE>, "
2528 "B<PR_SET_MM_START_DATA>, B<PR_SET_MM_END_DATA>, or B<PR_SET_MM_START_STACK,> "
2529 "and the permissions of the corresponding memory area are not as required;"
2530 msgstr ""
2531
2532 #. type: Plain text
2533 #: build/C/man2/prctl.2:859
2534 msgid ""
2535 "I<arg2> is B<PR_SET_MM_START_BRK> or B<PR_SET_MM_BRK>, and I<arg3> is less "
2536 "than or equal to the end of the data segment or specifies a value that would "
2537 "cause the B<RLIMIT_DATA> resource limit to be exceeded."
2538 msgstr ""
2539
2540 #. type: Plain text
2541 #: build/C/man2/prctl.2:870
2542 msgid ""
2543 "I<option> is B<PR_SET_PTRACER> and I<arg2> is not 0, B<PR_SET_PTRACER_ANY>, "
2544 "or the PID of an existing process."
2545 msgstr ""
2546
2547 #. type: Plain text
2548 #: build/C/man2/prctl.2:882
2549 msgid ""
2550 "I<option> is B<PR_SET_SECUREBITS>, and the caller does not have the "
2551 "B<CAP_SETPCAP> capability, or tried to unset a \"locked\" flag, or tried to "
2552 "set a flag whose corresponding locked flag was set (see B<capabilities>(7))."
2553 msgstr ""
2554
2555 #. type: Plain text
2556 #: build/C/man2/prctl.2:892
2557 msgid ""
2558 "I<option> is B<PR_SET_KEEPCAPS>, and the callers's "
2559 "B<SECURE_KEEP_CAPS_LOCKED> flag is set (see B<capabilities>(7))."
2560 msgstr ""
2561
2562 #. type: Plain text
2563 #: build/C/man2/prctl.2:900
2564 msgid ""
2565 "I<option> is B<PR_CAPBSET_DROP>, and the caller does not have the "
2566 "B<CAP_SETPCAP> capability."
2567 msgstr ""
2568
2569 #.  FIXME The following (until ========) is not yet in mainline kernel,
2570 #.  so commented out for the moment.
2571 #.  .TP
2572 #.  .B EACCES
2573 #.  .I option
2574 #.  is
2575 #.  .BR PR_SET_MM ,
2576 #.  and
2577 #.  .I arg3
2578 #.  is
2579 #.  .BR PR_SET_MM_EXE_FILE ,
2580 #.  the file is not executable.
2581 #.  .TP
2582 #.  .B EBUSY
2583 #.  .I option
2584 #.  is
2585 #.  .BR PR_SET_MM ,
2586 #.  .I arg3
2587 #.  is
2588 #.  .BR PR_SET_MM_EXE_FILE ,
2589 #.  and this the second attempt to change the
2590 #.  .I /proc/pid/exe
2591 #.  symbolic link, which is prohibited.
2592 #.  .TP
2593 #.  .B EBADF
2594 #.  .I option
2595 #.  is
2596 #.  .BR PR_SET_MM ,
2597 #.  .I arg3
2598 #.  is
2599 #.  .BR PR_SET_MM_EXE_FILE ,
2600 #.  and the file descriptor passed in
2601 #.  .I arg4
2602 #.  is not valid.
2603 #.  ========== END FIXME
2604 #.  The following can't actually happen, because prctl() in
2605 #.  seccomp mode will cause SIGKILL.
2606 #.  .TP
2607 #.  .B EPERM
2608 #.  .I option
2609 #.  is
2610 #.  .BR PR_SET_SECCOMP ,
2611 #.  and secure computing mode is already 1.
2612 #. type: Plain text
2613 #: build/C/man2/prctl.2:951
2614 msgid ""
2615 "I<option> is B<PR_SET_MM>, and the caller does not have the "
2616 "B<CAP_SYS_RESOURCE> capability."
2617 msgstr ""
2618
2619 #.  The library interface was added in glibc 2.0.6
2620 #. type: Plain text
2621 #: build/C/man2/prctl.2:956
2622 msgid "The B<prctl>()  system call was introduced in Linux 2.1.57."
2623 msgstr ""
2624
2625 #. type: Plain text
2626 #: build/C/man2/prctl.2:963
2627 msgid ""
2628 "This call is Linux-specific.  IRIX has a B<prctl>()  system call (also "
2629 "introduced in Linux 2.1.44 as irix_prctl on the MIPS architecture), with "
2630 "prototype"
2631 msgstr ""
2632
2633 #. type: Plain text
2634 #: build/C/man2/prctl.2:965
2635 msgid "B<ptrdiff_t prctl(int >I<option>B<, int >I<arg2>B<, int >I<arg3>B<);>"
2636 msgstr ""
2637
2638 #. type: Plain text
2639 #: build/C/man2/prctl.2:970
2640 msgid ""
2641 "and options to get the maximum number of processes per user, get the maximum "
2642 "number of processors the calling process can use, find out whether a "
2643 "specified process is currently blocked, get or set the maximum stack size, "
2644 "and so on."
2645 msgstr ""
2646
2647 #. type: Plain text
2648 #: build/C/man2/prctl.2:973
2649 msgid "B<signal>(2), B<core>(5)"
2650 msgstr ""
2651
2652 #. type: TH
2653 #: build/C/man3/profil.3:28
2654 #, no-wrap
2655 msgid "PROFIL"
2656 msgstr ""
2657
2658 #. type: Plain text
2659 #: build/C/man3/profil.3:31
2660 msgid "profil - execution time profile"
2661 msgstr ""
2662
2663 #. type: Plain text
2664 #: build/C/man3/profil.3:36
2665 msgid ""
2666 "B<int profil(unsigned short *>I<buf>B<, size_t >I<bufsiz>B<, size_t "
2667 ">I<offset>B<, unsigned int >I<scale>B<);>"
2668 msgstr ""
2669
2670 #. type: Plain text
2671 #: build/C/man3/profil.3:44
2672 msgid "B<profil>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
2673 msgstr ""
2674
2675 #. type: Plain text
2676 #: build/C/man3/profil.3:66
2677 msgid ""
2678 "This routine provides a means to find out in what areas your program spends "
2679 "most of its time.  The argument I<buf> points to I<bufsiz> bytes of core.  "
2680 "Every virtual 10 milliseconds, the user's program counter (PC)  is examined: "
2681 "I<offset> is subtracted and the result is multiplied by I<scale> and divided "
2682 "by 65536.  If the resulting value is less than I<bufsiz>, then the "
2683 "corresponding entry in I<buf> is incremented.  If I<buf> is NULL, profiling "
2684 "is disabled."
2685 msgstr ""
2686
2687 #. type: Plain text
2688 #: build/C/man3/profil.3:68
2689 msgid "Zero is always returned."
2690 msgstr ""
2691
2692 #. type: Plain text
2693 #: build/C/man3/profil.3:70
2694 msgid "Similar to a call in SVr4 (but not POSIX.1-2001)."
2695 msgstr ""
2696
2697 #. type: Plain text
2698 #: build/C/man3/profil.3:76
2699 msgid ""
2700 "B<profil>()  cannot be used on a program that also uses B<ITIMER_PROF> "
2701 "interval timers (see B<setitimer>(2))."
2702 msgstr ""
2703
2704 #. type: Plain text
2705 #: build/C/man3/profil.3:79
2706 msgid ""
2707 "True kernel profiling provides more accurate results.  Libc 4.4 contained a "
2708 "kernel patch providing a system call profil."
2709 msgstr ""
2710
2711 #. type: Plain text
2712 #: build/C/man3/profil.3:84
2713 msgid "B<gprof>(1), B<setitimer>(2), B<sigaction>(2), B<signal>(2)"
2714 msgstr ""
2715
2716 #. type: TH
2717 #: build/C/man3/psignal.3:30
2718 #, no-wrap
2719 msgid "PSIGNAL"
2720 msgstr ""
2721
2722 #. type: TH
2723 #: build/C/man3/psignal.3:30
2724 #, no-wrap
2725 msgid "2010-10-06"
2726 msgstr ""
2727
2728 #. type: TH
2729 #: build/C/man3/psignal.3:30 build/C/man3/raise.3:29 build/C/man7/sigevent.7:26
2730 #, no-wrap
2731 msgid "GNU"
2732 msgstr ""
2733
2734 #. type: Plain text
2735 #: build/C/man3/psignal.3:33
2736 msgid "psignal, psiginfo - print signal message"
2737 msgstr ""
2738
2739 #. type: Plain text
2740 #: build/C/man3/psignal.3:39
2741 #, no-wrap
2742 msgid ""
2743 "B<void psignal(int >I<sig>B<, const char *>I<s>B<);>\n"
2744 "B<void psiginfo(const siginfo_t *>I<pinfo>B<, const char *>I<s>B<);>\n"
2745 msgstr ""
2746
2747 #. type: Plain text
2748 #: build/C/man3/psignal.3:41
2749 #, no-wrap
2750 msgid "B<extern const char *const >I<sys_siglist>B<[];>\n"
2751 msgstr ""
2752
2753 #. type: Plain text
2754 #: build/C/man3/psignal.3:50
2755 msgid "B<psignal>(): _SVID_SOURCE || _BSD_SOURCE"
2756 msgstr ""
2757
2758 #. type: Plain text
2759 #: build/C/man3/psignal.3:53
2760 msgid ""
2761 "B<psiginfo>(): _XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ "
2762 "200809L"
2763 msgstr ""
2764
2765 #. type: Plain text
2766 #: build/C/man3/psignal.3:56
2767 msgid "I<sys_siglist>: _BSD_SOURCE"
2768 msgstr ""
2769
2770 #. type: Plain text
2771 #: build/C/man3/psignal.3:65
2772 msgid ""
2773 "The B<psignal>()  function displays a message on I<stderr> consisting of the "
2774 "string I<s>, a colon, a space, a string describing the signal number I<sig>, "
2775 "and a trailing newline.  If the string I<s> is NULL or empty, the colon and "
2776 "space are omitted.  If I<sig> is invalid, the message displayed will "
2777 "indicate an unknown signal."
2778 msgstr ""
2779
2780 #. type: Plain text
2781 #: build/C/man3/psignal.3:86
2782 msgid ""
2783 "The B<psiginfo>()  function is like B<psignal>(), except that it displays "
2784 "information about the signal described by I<pinfo>, which should point to a "
2785 "valid I<siginfo_t> structure.  As well as the signal description, "
2786 "B<psiginfo>()  displays information about the origin of the signal, and "
2787 "other information relevant to the signal (e.g., the relevant memory address "
2788 "for hardware-generated signals, the child process ID for B<SIGCHLD>, and the "
2789 "user ID and process ID of the sender, for signals set using B<kill>(2)  or "
2790 "B<sigqueue>(3))."
2791 msgstr ""
2792
2793 #. type: Plain text
2794 #: build/C/man3/psignal.3:89
2795 msgid ""
2796 "The array I<sys_siglist> holds the signal description strings indexed by "
2797 "signal number."
2798 msgstr ""
2799
2800 #. type: Plain text
2801 #: build/C/man3/psignal.3:95
2802 msgid "The B<psignal>()  and B<psiginfo>()  functions return no value."
2803 msgstr ""
2804
2805 #. type: Plain text
2806 #: build/C/man3/psignal.3:99
2807 msgid "The B<psiginfo>()  function was added to glibc in version 2.10."
2808 msgstr ""
2809
2810 #. type: Plain text
2811 #: build/C/man3/psignal.3:101
2812 msgid "POSIX.1-2008, 4.3BSD."
2813 msgstr ""
2814
2815 #. type: Plain text
2816 #: build/C/man3/psignal.3:105
2817 msgid "In glibc versions up to 2.12, B<psiginfo>()  had the following bugs:"
2818 msgstr ""
2819
2820 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12107
2821 #.  Reportedly now fixed; check glibc 2.13
2822 #. type: Plain text
2823 #: build/C/man3/psignal.3:109
2824 msgid "In some circumstances, a trailing newline is not printed."
2825 msgstr ""
2826
2827 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12108
2828 #.  Reportedly now fixed; check glibc 2.13
2829 #. type: Plain text
2830 #: build/C/man3/psignal.3:113
2831 msgid "Additional details are not displayed for real-time signals."
2832 msgstr ""
2833
2834 #. type: Plain text
2835 #: build/C/man3/psignal.3:118
2836 msgid "B<sigaction>(2), B<perror>(3), B<strsignal>(3), B<signal>(7)"
2837 msgstr ""
2838
2839 #. type: TH
2840 #: build/C/man3/raise.3:29
2841 #, no-wrap
2842 msgid "RAISE"
2843 msgstr ""
2844
2845 #. type: TH
2846 #: build/C/man3/raise.3:29
2847 #, no-wrap
2848 msgid "2012-04-20"
2849 msgstr ""
2850
2851 #. type: Plain text
2852 #: build/C/man3/raise.3:32
2853 msgid "raise - send a signal to the caller"
2854 msgstr ""
2855
2856 #. type: Plain text
2857 #: build/C/man3/raise.3:37
2858 #, no-wrap
2859 msgid "B<int raise(int >I<sig>B<);>\n"
2860 msgstr ""
2861
2862 #. type: Plain text
2863 #: build/C/man3/raise.3:43
2864 msgid ""
2865 "The B<raise>()  function sends a signal to the calling process or thread.  "
2866 "In a single-threaded program it is equivalent to"
2867 msgstr ""
2868
2869 #. type: Plain text
2870 #: build/C/man3/raise.3:47
2871 #, no-wrap
2872 msgid "kill(getpid(), sig);\n"
2873 msgstr ""
2874
2875 #. type: Plain text
2876 #: build/C/man3/raise.3:51
2877 msgid "In a multithreaded program it is equivalent to"
2878 msgstr ""
2879
2880 #. type: Plain text
2881 #: build/C/man3/raise.3:55
2882 #, no-wrap
2883 msgid "pthread_kill(pthread_self(), sig);\n"
2884 msgstr ""
2885
2886 #. type: Plain text
2887 #: build/C/man3/raise.3:61
2888 msgid ""
2889 "If the signal causes a handler to be called, B<raise>()  will only return "
2890 "after the signal handler has returned."
2891 msgstr ""
2892
2893 #. type: Plain text
2894 #: build/C/man3/raise.3:64
2895 msgid "B<raise>()  returns 0 on success, and nonzero for failure."
2896 msgstr ""
2897
2898 #. type: Plain text
2899 #: build/C/man3/raise.3:66 build/C/man2/signal.2:109
2900 msgid "C89, C99, POSIX.1-2001."
2901 msgstr ""
2902
2903 #.  2.3.2 used the obsolete tkill(), if available.
2904 #. type: Plain text
2905 #: build/C/man3/raise.3:77
2906 msgid ""
2907 "Since version 2.3.3, glibc implements B<raise>()  by calling B<tgkill>(2), "
2908 "if the kernel supports that system call.  Older glibc versions implemented "
2909 "B<raise>()  using B<kill>(2)."
2910 msgstr ""
2911
2912 #. type: Plain text
2913 #: build/C/man3/raise.3:84
2914 msgid ""
2915 "B<getpid>(2), B<kill>(2), B<sigaction>(2), B<signal>(2), B<pthread_kill>(3), "
2916 "B<signal>(7)"
2917 msgstr ""
2918
2919 #. type: TH
2920 #: build/C/man2/rt_sigqueueinfo.2:25
2921 #, no-wrap
2922 msgid "RT_SIGQUEUEINFO"
2923 msgstr ""
2924
2925 #. type: TH
2926 #: build/C/man2/rt_sigqueueinfo.2:25 build/C/man2/sgetmask.2:26 build/C/man2/tkill.2:29
2927 #, no-wrap
2928 msgid "2012-07-13"
2929 msgstr ""
2930
2931 #. type: Plain text
2932 #: build/C/man2/rt_sigqueueinfo.2:28
2933 msgid "rt_sigqueueinfo, rt_tgsigqueueinfo - queue a signal and data"
2934 msgstr ""
2935
2936 #. type: Plain text
2937 #: build/C/man2/rt_sigqueueinfo.2:31
2938 #, no-wrap
2939 msgid ""
2940 "B<int rt_sigqueueinfo(pid_t >I<tgid>B<, int >I<sig>B<, siginfo_t "
2941 "*>I<uinfo>B<);>\n"
2942 msgstr ""
2943
2944 #. type: Plain text
2945 #: build/C/man2/rt_sigqueueinfo.2:34
2946 #, no-wrap
2947 msgid ""
2948 "B<int rt_tgsigqueueinfo(pid_t >I<tgid>B<, pid_t >I<tid>B<, int >I<sig>B<,>\n"
2949 "B<                      siginfo_t *>I<uinfo>B<);>\n"
2950 msgstr ""
2951
2952 #. type: Plain text
2953 #: build/C/man2/rt_sigqueueinfo.2:38 build/C/man2/sgetmask.2:36 build/C/man2/tkill.2:41
2954 msgid "I<Note>: There are no glibc wrappers for these system calls; see NOTES."
2955 msgstr ""
2956
2957 #. type: Plain text
2958 #: build/C/man2/rt_sigqueueinfo.2:50
2959 msgid ""
2960 "The B<rt_sigqueueinfo>()  and B<rt_tgsigqueueinfo>()  system calls are the "
2961 "low-level interfaces used to send a signal plus data to a process or "
2962 "thread.  The receiver of the signal can obtain the accompanying data by "
2963 "establishing a signal handler with the B<sigaction>(2)  B<SA_SIGINFO> flag."
2964 msgstr ""
2965
2966 #. type: Plain text
2967 #: build/C/man2/rt_sigqueueinfo.2:56
2968 msgid ""
2969 "These system calls are not intended for direct application use; they are "
2970 "provided to allow the implementation of B<sigqueue>(3)  and "
2971 "B<pthread_sigqueue>(3)."
2972 msgstr ""
2973
2974 #. type: Plain text
2975 #: build/C/man2/rt_sigqueueinfo.2:68
2976 msgid ""
2977 "The B<rt_sigqueueinfo>()  system call sends the signal I<sig> to the thread "
2978 "group with the ID I<tgid>.  (The term \"thread group\" is synonymous with "
2979 "\"process\", and I<tid> corresponds to the traditional UNIX process ID.)  "
2980 "The signal will be delivered to an arbitrary member of the thread group "
2981 "(i.e., one of the threads that is not currently blocking the signal)."
2982 msgstr ""
2983
2984 #. type: Plain text
2985 #: build/C/man2/rt_sigqueueinfo.2:79
2986 msgid ""
2987 "The I<uinfo> argument specifies the data to accompany the signal.  This "
2988 "argument is a pointer to a structure of type I<siginfo_t>, described in "
2989 "B<sigaction>(2)  (and defined by including I<E<lt>sigaction.hE<gt>>).  The "
2990 "caller should set the following fields in this structure:"
2991 msgstr ""
2992
2993 #. type: TP
2994 #: build/C/man2/rt_sigqueueinfo.2:79 build/C/man7/sigevent.7:88 build/C/man2/wait.2:314
2995 #, no-wrap
2996 msgid "I<si_code>"
2997 msgstr ""
2998
2999 #.  tkill(2) or
3000 #. type: Plain text
3001 #: build/C/man2/rt_sigqueueinfo.2:95
3002 msgid ""
3003 "This must be one of the B<SI_*> codes in the Linux kernel source file "
3004 "I<include/asm-generic/siginfo.h>, with the restriction that the code must be "
3005 "negative (i.e., cannot be B<SI_USER>, which is used by the kernel to "
3006 "indicate a signal sent by B<kill>(2))  and cannot (since Linux 2.6.39) be "
3007 "B<SI_TKILL> (which is used by the kernel to indicate a signal sent using "
3008 "B<tgkill>(2))."
3009 msgstr ""
3010
3011 #. type: TP
3012 #: build/C/man2/rt_sigqueueinfo.2:95 build/C/man2/wait.2:293
3013 #, no-wrap
3014 msgid "I<si_pid>"
3015 msgstr ""
3016
3017 #. type: Plain text
3018 #: build/C/man2/rt_sigqueueinfo.2:99
3019 msgid "This should be set to a process ID, typically the process ID of the sender."
3020 msgstr ""
3021
3022 #. type: TP
3023 #: build/C/man2/rt_sigqueueinfo.2:99 build/C/man2/wait.2:296
3024 #, no-wrap
3025 msgid "I<si_uid>"
3026 msgstr ""
3027
3028 #. type: Plain text
3029 #: build/C/man2/rt_sigqueueinfo.2:103
3030 msgid "This should be set to a user ID, typically the real user ID of the sender."
3031 msgstr ""
3032
3033 #. type: TP
3034 #: build/C/man2/rt_sigqueueinfo.2:103 build/C/man7/sigevent.7:96
3035 #, no-wrap
3036 msgid "I<si_value>"
3037 msgstr ""
3038
3039 #. type: Plain text
3040 #: build/C/man2/rt_sigqueueinfo.2:110
3041 msgid ""
3042 "This field contains the user data to accompany the signal.  For more "
3043 "information, see the description of the last (I<union sigval>)  argument of "
3044 "B<sigqueue>(3)."
3045 msgstr ""
3046
3047 #. type: Plain text
3048 #: build/C/man2/rt_sigqueueinfo.2:117
3049 msgid ""
3050 "Internally, the kernel sets the I<si_signo> field to the value specified in "
3051 "I<sig>, so that the receiver of the signal can also obtain the signal number "
3052 "via that field."
3053 msgstr ""
3054
3055 #. type: Plain text
3056 #: build/C/man2/rt_sigqueueinfo.2:129
3057 msgid ""
3058 "The B<rt_tgsigqueueinfo>()  system call is like B<rt_sigqueueinfo>(), but "
3059 "sends the signal and data to the single thread specified by the combination "
3060 "of I<tgid>, a thread group ID, and I<tid>, a thread in that thread group."
3061 msgstr ""
3062
3063 #. type: Plain text
3064 #: build/C/man2/rt_sigqueueinfo.2:134
3065 msgid ""
3066 "On success, these system calls return 0.  On error, they return -1 and "
3067 "I<errno> is set to indicate the error."
3068 msgstr ""
3069
3070 #. type: TP
3071 #: 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
3072 #, no-wrap
3073 msgid "B<EAGAIN>"
3074 msgstr ""
3075
3076 #. type: Plain text
3077 #: build/C/man2/rt_sigqueueinfo.2:141 build/C/man3/sigqueue.3:98
3078 msgid ""
3079 "The limit of signals which may be queued has been reached.  (See "
3080 "B<signal>(7)  for further information.)"
3081 msgstr ""
3082
3083 #. type: Plain text
3084 #: build/C/man2/rt_sigqueueinfo.2:148
3085 msgid "I<sig>, I<tgid>, or I<tid> was invalid."
3086 msgstr ""
3087
3088 #. type: Plain text
3089 #: build/C/man2/rt_sigqueueinfo.2:156
3090 msgid ""
3091 "The caller does not have permission to send the signal to the target.  For "
3092 "the required permissions, see B<kill>(2).  Or: I<uinfo-E<gt>si_code> is "
3093 "invalid."
3094 msgstr ""
3095
3096 #. type: Plain text
3097 #: build/C/man2/rt_sigqueueinfo.2:162
3098 msgid "B<rt_sigqueueinfo>(): No thread group matching I<tgid> was found."
3099 msgstr ""
3100
3101 #. type: Plain text
3102 #: build/C/man2/rt_sigqueueinfo.2:169
3103 msgid "B<rt_tgsigqueinfo>(): No thread matching I<tgid> and I<tid> was found."
3104 msgstr ""
3105
3106 #. type: Plain text
3107 #: build/C/man2/rt_sigqueueinfo.2:176
3108 msgid ""
3109 "The B<rt_sigqueueinfo>()  system call was added to Linux in version 2.2.  "
3110 "The B<rt_tgsigqueueinfo>()  system call was added to Linux in version "
3111 "2.6.31."
3112 msgstr ""
3113
3114 #. type: Plain text
3115 #: build/C/man2/rt_sigqueueinfo.2:178 build/C/man2/sgetmask.2:68 build/C/man2/timerfd_create.2:373
3116 msgid "These system calls are Linux-specific."
3117 msgstr ""
3118
3119 #. type: Plain text
3120 #: build/C/man2/rt_sigqueueinfo.2:183
3121 msgid ""
3122 "Since these system calls are not intended for application use, there are no "
3123 "glibc wrapper functions; use B<syscall>(2)  in the unlikely case that you "
3124 "want to call them directly."
3125 msgstr ""
3126
3127 #. type: Plain text
3128 #: build/C/man2/rt_sigqueueinfo.2:188
3129 msgid ""
3130 "As with B<kill>(2), the null signal (0) can be used to check if the "
3131 "specified process or thread exists."
3132 msgstr ""
3133
3134 #. type: Plain text
3135 #: build/C/man2/rt_sigqueueinfo.2:196
3136 msgid ""
3137 "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<tgkill>(2), "
3138 "B<pthread_sigqueue>(3), B<sigqueue>(3), B<signal>(7)"
3139 msgstr ""
3140
3141 #. type: TH
3142 #: build/C/man2/s390_runtime_instr.2:26
3143 #, no-wrap
3144 msgid "S390_RUNTIME_INSTR"
3145 msgstr ""
3146
3147 #. type: TH
3148 #: build/C/man2/s390_runtime_instr.2:26
3149 #, no-wrap
3150 msgid "2012-12-17"
3151 msgstr ""
3152
3153 #. type: Plain text
3154 #: build/C/man2/s390_runtime_instr.2:29
3155 msgid "s390_runtime_instr - enable/disable s390 CPU run-time instrumentation"
3156 msgstr ""
3157
3158 #. type: Plain text
3159 #: build/C/man2/s390_runtime_instr.2:32
3160 #, no-wrap
3161 msgid "B<#include E<lt>asm/runtime_instr.hE<gt>>\n"
3162 msgstr ""
3163
3164 #. type: Plain text
3165 #: build/C/man2/s390_runtime_instr.2:34
3166 #, no-wrap
3167 msgid "B<int s390_runtime_instr(int >I<command>B<, int >I<signum>B<);>\n"
3168 msgstr ""
3169
3170 #. type: Plain text
3171 #: build/C/man2/s390_runtime_instr.2:40
3172 msgid ""
3173 "The B<s390_runtime_instr>()  system call starts or stops CPU run-time "
3174 "instrumentation for the calling thread."
3175 msgstr ""
3176
3177 #. type: Plain text
3178 #: build/C/man2/s390_runtime_instr.2:48
3179 msgid ""
3180 "The I<command> argument controls whether run-time instrumentation is started "
3181 "(B<S390_RUNTIME_INSTR_START>, 1) or stopped (B<S390_RUNTIME_INSTR_STOP>, 2) "
3182 "for the calling thread."
3183 msgstr ""
3184
3185 #. type: Plain text
3186 #: build/C/man2/s390_runtime_instr.2:55
3187 msgid ""
3188 "The I<signum> argument specifies the number of a real-time signal.  The "
3189 "real-time signal is sent to the thread if the run-time instrumentation "
3190 "buffer is full or if the run-time-instrumentation-halted interrupt occurred."
3191 msgstr ""
3192
3193 #. type: Plain text
3194 #: build/C/man2/s390_runtime_instr.2:66
3195 msgid ""
3196 "On success, B<s390_runtime_instr>()  returns 0 and enables the thread for "
3197 "run-time instrumentation by assigning the thread a default run-time "
3198 "instrumentation control block.  The caller can then read and modify the "
3199 "control block and start the run-time instrumentation.  On error, -1 is "
3200 "returned and I<errno> is set to one of the error codes listed below."
3201 msgstr ""
3202
3203 #. type: Plain text
3204 #: build/C/man2/s390_runtime_instr.2:74
3205 msgid ""
3206 "The value specified in I<command> is not a valid command or the value "
3207 "specified in I<signum> is not a real-time signal number."
3208 msgstr ""
3209
3210 #. type: Plain text
3211 #: build/C/man2/s390_runtime_instr.2:77
3212 msgid "Allocating memory for the run-time instrumentation control block failed."
3213 msgstr ""
3214
3215 #. type: TP
3216 #: build/C/man2/s390_runtime_instr.2:77
3217 #, no-wrap
3218 msgid "B<EOPNOTSUPP>"
3219 msgstr ""
3220
3221 #. type: Plain text
3222 #: build/C/man2/s390_runtime_instr.2:80
3223 msgid "The run-time instrumentation facility is not available."
3224 msgstr ""
3225
3226 #. type: Plain text
3227 #: build/C/man2/s390_runtime_instr.2:82
3228 msgid "This system call is available since Linux 3.7."
3229 msgstr ""
3230
3231 #. type: Plain text
3232 #: build/C/man2/s390_runtime_instr.2:85
3233 msgid ""
3234 "This Linux-specific system call is only available on the s390 architecture.  "
3235 "The run-time instrumentation facility is available beginning with System z "
3236 "EC12."
3237 msgstr ""
3238
3239 #. type: Plain text
3240 #: build/C/man2/s390_runtime_instr.2:89
3241 msgid ""
3242 "Glibc does not provide a wrapper for this system call, use B<syscall>(2)  to "
3243 "call it."
3244 msgstr ""
3245
3246 #. type: Plain text
3247 #: build/C/man2/s390_runtime_instr.2:92
3248 msgid "B<syscall>(2), B<signal>(7)"
3249 msgstr ""
3250
3251 #. type: TH
3252 #: build/C/man2/sgetmask.2:26
3253 #, no-wrap
3254 msgid "SGETMASK"
3255 msgstr ""
3256
3257 #. type: Plain text
3258 #: build/C/man2/sgetmask.2:29
3259 msgid "sgetmask, ssetmask - manipulation of signal mask (obsolete)"
3260 msgstr ""
3261
3262 #. type: Plain text
3263 #: build/C/man2/sgetmask.2:31
3264 msgid "B<long sgetmask(void);>"
3265 msgstr ""
3266
3267 #. type: Plain text
3268 #: build/C/man2/sgetmask.2:33
3269 msgid "B<long ssetmask(long >I<newmask>B<);>"
3270 msgstr ""
3271
3272 #. type: Plain text
3273 #: build/C/man2/sgetmask.2:42
3274 msgid ""
3275 "These system calls are obsolete.  I<Do not use them>; use B<sigprocmask>(2)  "
3276 "instead."
3277 msgstr ""
3278
3279 #. type: Plain text
3280 #: build/C/man2/sgetmask.2:45
3281 msgid "B<sgetmask>()  returns the signal mask of the calling process."
3282 msgstr ""
3283
3284 #. type: Plain text
3285 #: build/C/man2/sgetmask.2:50
3286 msgid ""
3287 "B<ssetmask>()  sets the signal mask of the calling process to the value "
3288 "given in I<newmask>.  The previous signal mask is returned."
3289 msgstr ""
3290
3291 #. type: Plain text
3292 #: build/C/man2/sgetmask.2:59
3293 msgid ""
3294 "The signal masks dealt with by these two system calls are plain bit masks "
3295 "(unlike the I<sigset_t> used by B<sigprocmask>(2)); use B<sigmask>(3)  to "
3296 "create and inspect these masks."
3297 msgstr ""
3298
3299 #. type: Plain text
3300 #: build/C/man2/sgetmask.2:64
3301 msgid ""
3302 "B<sgetmask>()  always successfully returns the signal mask.  B<ssetmask>()  "
3303 "always succeeds, and returns the previous signal mask."
3304 msgstr ""
3305
3306 #. type: Plain text
3307 #: build/C/man2/sgetmask.2:66
3308 msgid "These system calls always succeed."
3309 msgstr ""
3310
3311 #. type: Plain text
3312 #: build/C/man2/sgetmask.2:72
3313 msgid ""
3314 "Glibc does not provide wrappers for these obsolete system calls; in the "
3315 "unlikely event that you want to call them, use B<syscall>(2)."
3316 msgstr ""
3317
3318 #. type: Plain text
3319 #: build/C/man2/sgetmask.2:75
3320 msgid ""
3321 "These system calls are unaware of signal numbers greater than 31 (i.e., "
3322 "real-time signals)."
3323 msgstr ""
3324
3325 #. type: Plain text
3326 #: build/C/man2/sgetmask.2:80
3327 msgid "It is not possible to block B<SIGSTOP> or B<SIGKILL>."
3328 msgstr ""
3329
3330 #. type: Plain text
3331 #: build/C/man2/sgetmask.2:83
3332 msgid "B<sigprocmask>(2), B<signal>(7)"
3333 msgstr ""
3334
3335 #. type: TH
3336 #: build/C/man2/sigaction.2:47
3337 #, no-wrap
3338 msgid "SIGACTION"
3339 msgstr ""
3340
3341 #. type: TH
3342 #: build/C/man2/sigaction.2:47
3343 #, no-wrap
3344 msgid "2013-02-12"
3345 msgstr ""
3346
3347 #. type: Plain text
3348 #: build/C/man2/sigaction.2:50
3349 msgid "sigaction - examine and change a signal action"
3350 msgstr ""
3351
3352 #. type: Plain text
3353 #: build/C/man2/sigaction.2:56
3354 #, no-wrap
3355 msgid ""
3356 "B<int sigaction(int >I<signum>B<, const struct sigaction *>I<act>B<,>\n"
3357 "B<              struct sigaction *>I<oldact>B<);>\n"
3358 msgstr ""
3359
3360 #. type: Plain text
3361 #: build/C/man2/sigaction.2:66
3362 msgid ""
3363 "B<sigaction>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
3364 "_POSIX_SOURCE"
3365 msgstr ""
3366
3367 #. type: Plain text
3368 #: build/C/man2/sigaction.2:69
3369 msgid "I<siginfo_t>: _POSIX_C_SOURCE E<gt>= 199309L"
3370 msgstr ""
3371
3372 #. type: Plain text
3373 #: build/C/man2/sigaction.2:78
3374 msgid ""
3375 "The B<sigaction>()  system call is used to change the action taken by a "
3376 "process on receipt of a specific signal.  (See B<signal>(7)  for an overview "
3377 "of signals.)"
3378 msgstr ""
3379
3380 #. type: Plain text
3381 #: build/C/man2/sigaction.2:84
3382 msgid ""
3383 "I<signum> specifies the signal and can be any valid signal except B<SIGKILL> "
3384 "and B<SIGSTOP>."
3385 msgstr ""
3386
3387 #. type: Plain text
3388 #: build/C/man2/sigaction.2:95
3389 msgid ""
3390 "If I<act> is non-NULL, the new action for signal I<signum> is installed from "
3391 "I<act>.  If I<oldact> is non-NULL, the previous action is saved in "
3392 "I<oldact>."
3393 msgstr ""
3394
3395 #. type: Plain text
3396 #: build/C/man2/sigaction.2:99
3397 msgid "The I<sigaction> structure is defined as something like:"
3398 msgstr ""
3399
3400 #. type: Plain text
3401 #: build/C/man2/sigaction.2:109
3402 #, no-wrap
3403 msgid ""
3404 "struct sigaction {\n"
3405 "    void     (*sa_handler)(int);\n"
3406 "    void     (*sa_sigaction)(int, siginfo_t *, void *);\n"
3407 "    sigset_t   sa_mask;\n"
3408 "    int        sa_flags;\n"
3409 "    void     (*sa_restorer)(void);\n"
3410 "};\n"
3411 msgstr ""
3412
3413 #. type: Plain text
3414 #: build/C/man2/sigaction.2:116
3415 msgid ""
3416 "On some architectures a union is involved: do not assign to both "
3417 "I<sa_handler> and I<sa_sigaction>."
3418 msgstr ""
3419
3420 #. type: Plain text
3421 #: build/C/man2/sigaction.2:123
3422 msgid ""
3423 "The I<sa_restorer> element is obsolete and should not be used.  POSIX does "
3424 "not specify a I<sa_restorer> element."
3425 msgstr ""
3426
3427 #. type: Plain text
3428 #: build/C/man2/sigaction.2:133
3429 msgid ""
3430 "I<sa_handler> specifies the action to be associated with I<signum> and may "
3431 "be B<SIG_DFL> for the default action, B<SIG_IGN> to ignore this signal, or a "
3432 "pointer to a signal handling function.  This function receives the signal "
3433 "number as its only argument."
3434 msgstr ""
3435
3436 #. type: Plain text
3437 #: build/C/man2/sigaction.2:155
3438 msgid ""
3439 "If B<SA_SIGINFO> is specified in I<sa_flags>, then I<sa_sigaction> (instead "
3440 "of I<sa_handler>)  specifies the signal-handling function for I<signum>.  "
3441 "This function receives the signal number as its first argument, a pointer to "
3442 "a I<siginfo_t> as its second argument and a pointer to a I<ucontext_t> (cast "
3443 "to I<void\\ *>) as its third argument.  (Commonly, the handler function "
3444 "doesn't make any use of the third argument.  See B<getcontext>(3)  for "
3445 "further information about I<ucontext_t>.)"
3446 msgstr ""
3447
3448 #. type: Plain text
3449 #: build/C/man2/sigaction.2:165
3450 msgid ""
3451 "I<sa_mask> specifies a mask of signals which should be blocked (i.e., added "
3452 "to the signal mask of the thread in which the signal handler is invoked)  "
3453 "during execution of the signal handler.  In addition, the signal which "
3454 "triggered the handler will be blocked, unless the B<SA_NODEFER> flag is "
3455 "used."
3456 msgstr ""
3457
3458 #. type: Plain text
3459 #: build/C/man2/sigaction.2:169
3460 msgid ""
3461 "I<sa_flags> specifies a set of flags which modify the behavior of the "
3462 "signal.  It is formed by the bitwise OR of zero or more of the following:"
3463 msgstr ""
3464
3465 #. type: TP
3466 #: build/C/man2/sigaction.2:170
3467 #, no-wrap
3468 msgid "B<SA_NOCLDSTOP>"
3469 msgstr ""
3470
3471 #. type: Plain text
3472 #: build/C/man2/sigaction.2:187
3473 msgid ""
3474 "If I<signum> is B<SIGCHLD>, do not receive notification when child processes "
3475 "stop (i.e., when they receive one of B<SIGSTOP>, B<SIGTSTP>, B<SIGTTIN> or "
3476 "B<SIGTTOU>)  or resume (i.e., they receive B<SIGCONT>)  (see B<wait>(2)).  "
3477 "This flag is only meaningful when establishing a handler for B<SIGCHLD>."
3478 msgstr ""
3479
3480 #. type: TP
3481 #: build/C/man2/sigaction.2:187
3482 #, no-wrap
3483 msgid "B<SA_NOCLDWAIT> (since Linux 2.6)"
3484 msgstr ""
3485
3486 #.  To be precise: Linux 2.5.60 -- MTK
3487 #. type: Plain text
3488 #: build/C/man2/sigaction.2:201
3489 msgid ""
3490 "If I<signum> is B<SIGCHLD>, do not transform children into zombies when they "
3491 "terminate.  See also B<waitpid>(2).  This flag is only meaningful when "
3492 "establishing a handler for B<SIGCHLD>, or when setting that signal's "
3493 "disposition to B<SIG_DFL>."
3494 msgstr ""
3495
3496 #. type: Plain text
3497 #: build/C/man2/sigaction.2:213
3498 msgid ""
3499 "If the B<SA_NOCLDWAIT> flag is set when establishing a handler for "
3500 "B<SIGCHLD>, POSIX.1 leaves it unspecified whether a B<SIGCHLD> signal is "
3501 "generated when a child process terminates.  On Linux, a B<SIGCHLD> signal is "
3502 "generated in this case; on some other implementations, it is not."
3503 msgstr ""
3504
3505 #. type: TP
3506 #: build/C/man2/sigaction.2:213
3507 #, no-wrap
3508 msgid "B<SA_NODEFER>"
3509 msgstr ""
3510
3511 #. type: Plain text
3512 #: build/C/man2/sigaction.2:220
3513 msgid ""
3514 "Do not prevent the signal from being received from within its own signal "
3515 "handler.  This flag is only meaningful when establishing a signal handler.  "
3516 "B<SA_NOMASK> is an obsolete, nonstandard synonym for this flag."
3517 msgstr ""
3518
3519 #. type: TP
3520 #: build/C/man2/sigaction.2:220
3521 #, no-wrap
3522 msgid "B<SA_ONSTACK>"
3523 msgstr ""
3524
3525 #. type: Plain text
3526 #: build/C/man2/sigaction.2:226
3527 msgid ""
3528 "Call the signal handler on an alternate signal stack provided by "
3529 "B<sigaltstack>(2).  If an alternate stack is not available, the default "
3530 "stack will be used.  This flag is only meaningful when establishing a signal "
3531 "handler."
3532 msgstr ""
3533
3534 #. type: TP
3535 #: build/C/man2/sigaction.2:226
3536 #, no-wrap
3537 msgid "B<SA_RESETHAND>"
3538 msgstr ""
3539
3540 #. type: Plain text
3541 #: build/C/man2/sigaction.2:232
3542 msgid ""
3543 "Restore the signal action to the default upon entry to the signal handler.  "
3544 "This flag is only meaningful when establishing a signal handler.  "
3545 "B<SA_ONESHOT> is an obsolete, nonstandard synonym for this flag."
3546 msgstr ""
3547
3548 #. type: TP
3549 #: build/C/man2/sigaction.2:232
3550 #, no-wrap
3551 msgid "B<SA_RESTART>"
3552 msgstr ""
3553
3554 #. type: Plain text
3555 #: build/C/man2/sigaction.2:240
3556 msgid ""
3557 "Provide behavior compatible with BSD signal semantics by making certain "
3558 "system calls restartable across signals.  This flag is only meaningful when "
3559 "establishing a signal handler.  See B<signal>(7)  for a discussion of system "
3560 "call restarting."
3561 msgstr ""
3562
3563 #. type: TP
3564 #: build/C/man2/sigaction.2:240
3565 #, no-wrap
3566 msgid "B<SA_SIGINFO> (since Linux 2.2)"
3567 msgstr ""
3568
3569 #.  (The
3570 #.  .I sa_sigaction
3571 #.  field was added in Linux 2.1.86.)
3572 #. type: Plain text
3573 #: build/C/man2/sigaction.2:251
3574 msgid ""
3575 "The signal handler takes three arguments, not one.  In this case, "
3576 "I<sa_sigaction> should be set instead of I<sa_handler>.  This flag is only "
3577 "meaningful when establishing a signal handler."
3578 msgstr ""
3579
3580 #. type: Plain text
3581 #: build/C/man2/sigaction.2:258
3582 msgid ""
3583 "The I<siginfo_t> argument to I<sa_sigaction> is a struct with the following "
3584 "elements:"
3585 msgstr ""
3586
3587 #.  FIXME
3588 #.  si_trapno seems to be only used on SPARC and Alpha;
3589 #.  this page could use a little more detail on its purpose there.
3590 #.  In the kernel: si_tid
3591 #. type: Plain text
3592 #: build/C/man2/sigaction.2:289
3593 #, no-wrap
3594 msgid ""
3595 "siginfo_t {\n"
3596 "    int      si_signo;    /* Signal number */\n"
3597 "    int      si_errno;    /* An errno value */\n"
3598 "    int      si_code;     /* Signal code */\n"
3599 "    int      si_trapno;   /* Trap number that caused\n"
3600 "                             hardware-generated signal\n"
3601 "                             (unused on most architectures) */\n"
3602 "    pid_t    si_pid;      /* Sending process ID */\n"
3603 "    uid_t    si_uid;      /* Real user ID of sending process */\n"
3604 "    int      si_status;   /* Exit value or signal */\n"
3605 "    clock_t  si_utime;    /* User time consumed */\n"
3606 "    clock_t  si_stime;    /* System time consumed */\n"
3607 "    sigval_t si_value;    /* Signal value */\n"
3608 "    int      si_int;      /* POSIX.1b signal */\n"
3609 "    void    *si_ptr;      /* POSIX.1b signal */\n"
3610 "    int      si_overrun;  /* Timer overrun count; POSIX.1b timers */\n"
3611 "    int      si_timerid;  /* Timer ID; POSIX.1b timers */\n"
3612 "    void    *si_addr;     /* Memory location which caused fault */\n"
3613 "    long     si_band;     /* Band event (was I<int> in\n"
3614 "                             glibc 2.3.2 and earlier) */\n"
3615 "    int      si_fd;       /* File descriptor */\n"
3616 "    short    si_addr_lsb; /* Least significant bit of address\n"
3617 "                             (since kernel 2.6.32) */\n"
3618 "}\n"
3619 msgstr ""
3620
3621 #. type: Plain text
3622 #: build/C/man2/sigaction.2:298
3623 msgid ""
3624 "I<si_signo>, I<si_errno> and I<si_code> are defined for all signals.  "
3625 "(I<si_errno> is generally unused on Linux.)  The rest of the struct may be a "
3626 "union, so that one should only read the fields that are meaningful for the "
3627 "given signal:"
3628 msgstr ""
3629
3630 #. type: Plain text
3631 #: build/C/man2/sigaction.2:313
3632 msgid ""
3633 "Signals sent with B<kill>(2)  and B<sigqueue>(3)  fill in I<si_pid> and "
3634 "I<si_uid>.  In addition, signals sent with B<sigqueue>(3)  fill in I<si_int> "
3635 "and I<si_ptr> with the values specified by the sender of the signal; see "
3636 "B<sigqueue>(3)  for more details."
3637 msgstr ""
3638
3639 #. type: Plain text
3640 #: build/C/man2/sigaction.2:329
3641 msgid ""
3642 "Signals sent by POSIX.1b timers (since Linux 2.6) fill in I<si_overrun> and "
3643 "I<si_timerid>.  The I<si_timerid> field is an internal ID used by the kernel "
3644 "to identify the timer; it is not the same as the timer ID returned by "
3645 "B<timer_create>(2).  The I<si_overrun> field is the timer overrun count; "
3646 "this is the same information as is obtained by a call to "
3647 "B<timer_getoverrun>(2).  These fields are nonstandard Linux extensions."
3648 msgstr ""
3649
3650 #. type: Plain text
3651 #: build/C/man2/sigaction.2:344
3652 msgid ""
3653 "Signals sent for message queue notification (see the description of "
3654 "B<SIGEV_SIGNAL> in B<mq_notify>(3))  fill in I<si_int>/I<si_ptr>, with the "
3655 "I<sigev_value> supplied to B<mq_notify>(3); I<si_pid>, with the process ID "
3656 "of the message sender; and I<si_uid>, with the real user ID of the message "
3657 "sender."
3658 msgstr ""
3659
3660 #.  FIXME .
3661 #.  When si_utime and si_stime where originally implemented, the
3662 #.  measurement unit was HZ, which was the same as clock ticks
3663 #.  (sysconf(_SC_CLK_TCK)).  In 2.6, HZ became configurable, and
3664 #.  was *still* used as the unit to return the info these fields,
3665 #.  with the result that the field values depended on the the
3666 #.  configured HZ.  Of course, the should have been measured in
3667 #.  USER_HZ instead, so that sysconf(_SC_CLK_TCK) could be used to
3668 #.  convert to seconds.  I have a queued patch to fix this:
3669 #.  http://thread.gmane.org/gmane.linux.kernel/698061/ .
3670 #.  This patch made it into 2.6.27.
3671 #.  But note that these fields still don't return the times of
3672 #.  waited-for children (as is done by getrusage() and times()
3673 #.  and wait4()).  Solaris 8 does include child times.
3674 #. type: Plain text
3675 #: build/C/man2/sigaction.2:391
3676 msgid ""
3677 "B<SIGCHLD> fills in I<si_pid>, I<si_uid>, I<si_status>, I<si_utime> and "
3678 "I<si_stime>, providing information about the child.  The I<si_pid> field is "
3679 "the process ID of the child; I<si_uid> is the child's real user ID.  The "
3680 "I<si_status> field contains the exit status of the child (if I<si_code> is "
3681 "B<CLD_EXITED>), or the signal number that caused the process to change "
3682 "state.  The I<si_utime> and I<si_stime> contain the user and system CPU time "
3683 "used by the child process; these fields do not include the times used by "
3684 "waited-for children (unlike B<getrusage>(2)  and B<time>(2)).  In kernels up "
3685 "to 2.6, and since 2.6.27, these fields report CPU time in units of "
3686 "I<sysconf(_SC_CLK_TCK)>.  In 2.6 kernels before 2.6.27, a bug meant that "
3687 "these fields reported time in units of the (configurable) system jiffy (see "
3688 "B<time>(7))."
3689 msgstr ""
3690
3691 #.  FIXME SIGTRAP also sets the following for ptrace_notify() ?
3692 #.      info.si_code = exit_code;
3693 #.      info.si_pid = task_pid_vnr(current);
3694 #.      info.si_uid = current_uid();  /* Real UID */
3695 #. type: Plain text
3696 #: build/C/man2/sigaction.2:427
3697 msgid ""
3698 "B<SIGILL>, B<SIGFPE>, B<SIGSEGV>, B<SIGBUS>, and B<SIGTRAP> fill in "
3699 "I<si_addr> with the address of the fault.  On some architectures, these "
3700 "signals also fill in the I<si_trapno> filed.  Some suberrors of B<SIGBUS>, "
3701 "in particular B<BUS_MCEERR_AO> and B<BUS_MCEERR_AR>, also fill in "
3702 "I<si_addr_lsb>.  This field indicates the least significant bit of the "
3703 "reported address and therefore the extent of the corruption.  For example, "
3704 "if a full page was corrupted, I<si_addr_lsb> contains "
3705 "I<log2(sysconf(_SC_PAGESIZE))>.  B<BUS_MCERR_*> and I<si_addr_lsb> are "
3706 "Linux-specific extensions."
3707 msgstr ""
3708
3709 #. type: Plain text
3710 #: build/C/man2/sigaction.2:441
3711 msgid ""
3712 "B<SIGIO>/B<SIGPOLL> (the two names are synonyms on Linux)  fills in "
3713 "I<si_band> and I<si_fd>.  The I<si_band> event is a bit mask containing the "
3714 "same values as are filled in the I<revents> field by B<poll>(2).  The "
3715 "I<si_fd> field indicates the file descriptor for which the I/O event "
3716 "occurred."
3717 msgstr ""
3718
3719 #. type: Plain text
3720 #: build/C/man2/sigaction.2:448
3721 msgid ""
3722 "I<si_code> is a value (not a bit mask)  indicating why this signal was "
3723 "sent.  The following list shows the values which can be placed in I<si_code> "
3724 "for any signal, along with reason that the signal was generated."
3725 msgstr ""
3726
3727 #. type: TP
3728 #: build/C/man2/sigaction.2:449
3729 #, no-wrap
3730 msgid "B<SI_USER>"
3731 msgstr ""
3732
3733 #. type: TP
3734 #: build/C/man2/sigaction.2:452 build/C/man7/signal.7:111
3735 #, no-wrap
3736 msgid "B<kill>(2)"
3737 msgstr ""
3738
3739 #. type: TP
3740 #: build/C/man2/sigaction.2:452
3741 #, no-wrap
3742 msgid "B<SI_KERNEL>"
3743 msgstr ""
3744
3745 #. type: Plain text
3746 #: build/C/man2/sigaction.2:455
3747 msgid "Sent by the kernel."
3748 msgstr ""
3749
3750 #. type: TP
3751 #: build/C/man2/sigaction.2:455
3752 #, no-wrap
3753 msgid "B<SI_QUEUE>"
3754 msgstr ""
3755
3756 #. type: TP
3757 #: build/C/man2/sigaction.2:458 build/C/man7/signal.7:128
3758 #, no-wrap
3759 msgid "B<sigqueue>(3)"
3760 msgstr ""
3761
3762 #. type: TP
3763 #: build/C/man2/sigaction.2:458
3764 #, no-wrap
3765 msgid "B<SI_TIMER>"
3766 msgstr ""
3767
3768 #. type: Plain text
3769 #: build/C/man2/sigaction.2:461
3770 msgid "POSIX timer expired"
3771 msgstr ""
3772
3773 #. type: TP
3774 #: build/C/man2/sigaction.2:461
3775 #, no-wrap
3776 msgid "B<SI_MESGQ>"
3777 msgstr ""
3778
3779 #. type: Plain text
3780 #: build/C/man2/sigaction.2:465
3781 msgid "POSIX message queue state changed (since Linux 2.6.6); see B<mq_notify>(3)"
3782 msgstr ""
3783
3784 #. type: TP
3785 #: build/C/man2/sigaction.2:465
3786 #, no-wrap
3787 msgid "B<SI_ASYNCIO>"
3788 msgstr ""
3789
3790 #. type: Plain text
3791 #: build/C/man2/sigaction.2:468
3792 msgid "AIO completed"
3793 msgstr ""
3794
3795 #. type: TP
3796 #: build/C/man2/sigaction.2:468
3797 #, no-wrap
3798 msgid "B<SI_SIGIO>"
3799 msgstr ""
3800
3801 #. type: Plain text
3802 #: build/C/man2/sigaction.2:477
3803 msgid ""
3804 "Queued B<SIGIO> (only in kernels up to Linux 2.2; from Linux 2.4 onward "
3805 "B<SIGIO>/B<SIGPOLL> fills in I<si_code> as described below)."
3806 msgstr ""
3807
3808 #. type: TP
3809 #: build/C/man2/sigaction.2:477
3810 #, no-wrap
3811 msgid "B<SI_TKILL>"
3812 msgstr ""
3813
3814 #.  SI_DETHREAD is defined in 2.6.9 sources, but isn't implemented
3815 #.  It appears to have been an idea that was tried during 2.5.6
3816 #.  through to 2.5.24 and then was backed out.
3817 #. type: Plain text
3818 #: build/C/man2/sigaction.2:486
3819 msgid "B<tkill>(2)  or B<tgkill>(2)  (since Linux 2.4.19)"
3820 msgstr ""
3821
3822 #. type: Plain text
3823 #: build/C/man2/sigaction.2:493
3824 msgid "The following values can be placed in I<si_code> for a B<SIGILL> signal:"
3825 msgstr ""
3826
3827 #. type: TP
3828 #: build/C/man2/sigaction.2:494
3829 #, no-wrap
3830 msgid "B<ILL_ILLOPC>"
3831 msgstr ""
3832
3833 #. type: Plain text
3834 #: build/C/man2/sigaction.2:497
3835 msgid "illegal opcode"
3836 msgstr ""
3837
3838 #. type: TP
3839 #: build/C/man2/sigaction.2:497
3840 #, no-wrap
3841 msgid "B<ILL_ILLOPN>"
3842 msgstr ""
3843
3844 #. type: Plain text
3845 #: build/C/man2/sigaction.2:500
3846 msgid "illegal operand"
3847 msgstr ""
3848
3849 #. type: TP
3850 #: build/C/man2/sigaction.2:500
3851 #, no-wrap
3852 msgid "B<ILL_ILLADR>"
3853 msgstr ""
3854
3855 #. type: Plain text
3856 #: build/C/man2/sigaction.2:503
3857 msgid "illegal addressing mode"
3858 msgstr ""
3859
3860 #. type: TP
3861 #: build/C/man2/sigaction.2:503
3862 #, no-wrap
3863 msgid "B<ILL_ILLTRP>"
3864 msgstr ""
3865
3866 #. type: Plain text
3867 #: build/C/man2/sigaction.2:506
3868 msgid "illegal trap"
3869 msgstr ""
3870
3871 #. type: TP
3872 #: build/C/man2/sigaction.2:506
3873 #, no-wrap
3874 msgid "B<ILL_PRVOPC>"
3875 msgstr ""
3876
3877 #. type: Plain text
3878 #: build/C/man2/sigaction.2:509
3879 msgid "privileged opcode"
3880 msgstr ""
3881
3882 #. type: TP
3883 #: build/C/man2/sigaction.2:509
3884 #, no-wrap
3885 msgid "B<ILL_PRVREG>"
3886 msgstr ""
3887
3888 #. type: Plain text
3889 #: build/C/man2/sigaction.2:512
3890 msgid "privileged register"
3891 msgstr ""
3892
3893 #. type: TP
3894 #: build/C/man2/sigaction.2:512
3895 #, no-wrap
3896 msgid "B<ILL_COPROC>"
3897 msgstr ""
3898
3899 #. type: Plain text
3900 #: build/C/man2/sigaction.2:515
3901 msgid "coprocessor error"
3902 msgstr ""
3903
3904 #. type: TP
3905 #: build/C/man2/sigaction.2:515
3906 #, no-wrap
3907 msgid "B<ILL_BADSTK>"
3908 msgstr ""
3909
3910 #. type: Plain text
3911 #: build/C/man2/sigaction.2:518
3912 msgid "internal stack error"
3913 msgstr ""
3914
3915 #. type: Plain text
3916 #: build/C/man2/sigaction.2:525
3917 msgid "The following values can be placed in I<si_code> for a B<SIGFPE> signal:"
3918 msgstr ""
3919
3920 #. type: TP
3921 #: build/C/man2/sigaction.2:526
3922 #, no-wrap
3923 msgid "B<FPE_INTDIV>"
3924 msgstr ""
3925
3926 #. type: Plain text
3927 #: build/C/man2/sigaction.2:529
3928 msgid "integer divide by zero"
3929 msgstr ""
3930
3931 #. type: TP
3932 #: build/C/man2/sigaction.2:529
3933 #, no-wrap
3934 msgid "B<FPE_INTOVF>"
3935 msgstr ""
3936
3937 #. type: Plain text
3938 #: build/C/man2/sigaction.2:532
3939 msgid "integer overflow"
3940 msgstr ""
3941
3942 #. type: TP
3943 #: build/C/man2/sigaction.2:532
3944 #, no-wrap
3945 msgid "B<FPE_FLTDIV>"
3946 msgstr ""
3947
3948 #. type: Plain text
3949 #: build/C/man2/sigaction.2:535
3950 msgid "floating-point divide by zero"
3951 msgstr ""
3952
3953 #. type: TP
3954 #: build/C/man2/sigaction.2:535
3955 #, no-wrap
3956 msgid "B<FPE_FLTOVF>"
3957 msgstr ""
3958
3959 #. type: Plain text
3960 #: build/C/man2/sigaction.2:538
3961 msgid "floating-point overflow"
3962 msgstr ""
3963
3964 #. type: TP
3965 #: build/C/man2/sigaction.2:538
3966 #, no-wrap
3967 msgid "B<FPE_FLTUND>"
3968 msgstr ""
3969
3970 #. type: Plain text
3971 #: build/C/man2/sigaction.2:541
3972 msgid "floating-point underflow"
3973 msgstr ""
3974
3975 #. type: TP
3976 #: build/C/man2/sigaction.2:541
3977 #, no-wrap
3978 msgid "B<FPE_FLTRES>"
3979 msgstr ""
3980
3981 #. type: Plain text
3982 #: build/C/man2/sigaction.2:544
3983 msgid "floating-point inexact result"
3984 msgstr ""
3985
3986 #. type: TP
3987 #: build/C/man2/sigaction.2:544
3988 #, no-wrap
3989 msgid "B<FPE_FLTINV>"
3990 msgstr ""
3991
3992 #. type: Plain text
3993 #: build/C/man2/sigaction.2:547
3994 msgid "floating-point invalid operation"
3995 msgstr ""
3996
3997 #. type: TP
3998 #: build/C/man2/sigaction.2:547
3999 #, no-wrap
4000 msgid "B<FPE_FLTSUB>"
4001 msgstr ""
4002
4003 #. type: Plain text
4004 #: build/C/man2/sigaction.2:550
4005 msgid "subscript out of range"
4006 msgstr ""
4007
4008 #. type: Plain text
4009 #: build/C/man2/sigaction.2:557
4010 msgid "The following values can be placed in I<si_code> for a B<SIGSEGV> signal:"
4011 msgstr ""
4012
4013 #. type: TP
4014 #: build/C/man2/sigaction.2:558
4015 #, no-wrap
4016 msgid "B<SEGV_MAPERR>"
4017 msgstr ""
4018
4019 #. type: Plain text
4020 #: build/C/man2/sigaction.2:561
4021 msgid "address not mapped to object"
4022 msgstr ""
4023
4024 #. type: TP
4025 #: build/C/man2/sigaction.2:561
4026 #, no-wrap
4027 msgid "B<SEGV_ACCERR>"
4028 msgstr ""
4029
4030 #. type: Plain text
4031 #: build/C/man2/sigaction.2:564
4032 msgid "invalid permissions for mapped object"
4033 msgstr ""
4034
4035 #. type: Plain text
4036 #: build/C/man2/sigaction.2:571
4037 msgid "The following values can be placed in I<si_code> for a B<SIGBUS> signal:"
4038 msgstr ""
4039
4040 #. type: TP
4041 #: build/C/man2/sigaction.2:572
4042 #, no-wrap
4043 msgid "B<BUS_ADRALN>"
4044 msgstr ""
4045
4046 #. type: Plain text
4047 #: build/C/man2/sigaction.2:575
4048 msgid "invalid address alignment"
4049 msgstr ""
4050
4051 #. type: TP
4052 #: build/C/man2/sigaction.2:575
4053 #, no-wrap
4054 msgid "B<BUS_ADRERR>"
4055 msgstr ""
4056
4057 #. type: Plain text
4058 #: build/C/man2/sigaction.2:578
4059 msgid "nonexistent physical address"
4060 msgstr ""
4061
4062 #. type: TP
4063 #: build/C/man2/sigaction.2:578
4064 #, no-wrap
4065 msgid "B<BUS_OBJERR>"
4066 msgstr ""
4067
4068 #. type: Plain text
4069 #: build/C/man2/sigaction.2:581
4070 msgid "object-specific hardware error"
4071 msgstr ""
4072
4073 #. type: TP
4074 #: build/C/man2/sigaction.2:581
4075 #, no-wrap
4076 msgid "B<BUS_MCEERR_AR> (since Linux 2.6.32)"
4077 msgstr ""
4078
4079 #. type: Plain text
4080 #: build/C/man2/sigaction.2:584
4081 msgid "Hardware memory error consumed on a machine check; action required."
4082 msgstr ""
4083
4084 #. type: TP
4085 #: build/C/man2/sigaction.2:584
4086 #, no-wrap
4087 msgid "B<BUS_MCEERR_AO> (since Linux 2.6.32)"
4088 msgstr ""
4089
4090 #. type: Plain text
4091 #: build/C/man2/sigaction.2:587
4092 msgid "Hardware memory error detected in process but not consumed; action optional."
4093 msgstr ""
4094
4095 #. type: Plain text
4096 #: build/C/man2/sigaction.2:594
4097 msgid "The following values can be placed in I<si_code> for a B<SIGTRAP> signal:"
4098 msgstr ""
4099
4100 #. type: TP
4101 #: build/C/man2/sigaction.2:595
4102 #, no-wrap
4103 msgid "B<TRAP_BRKPT>"
4104 msgstr ""
4105
4106 #. type: Plain text
4107 #: build/C/man2/sigaction.2:598
4108 msgid "process breakpoint"
4109 msgstr ""
4110
4111 #. type: TP
4112 #: build/C/man2/sigaction.2:598
4113 #, no-wrap
4114 msgid "B<TRAP_TRACE>"
4115 msgstr ""
4116
4117 #. type: Plain text
4118 #: build/C/man2/sigaction.2:601
4119 msgid "process trace trap"
4120 msgstr ""
4121
4122 #. type: TP
4123 #: build/C/man2/sigaction.2:601
4124 #, no-wrap
4125 msgid "B<TRAP_BRANCH> (since Linux 2.4)"
4126 msgstr ""
4127
4128 #. type: Plain text
4129 #: build/C/man2/sigaction.2:604
4130 msgid "process taken branch trap"
4131 msgstr ""
4132
4133 #. type: TP
4134 #: build/C/man2/sigaction.2:604
4135 #, no-wrap
4136 msgid "B<TRAP_HWBKPT> (since Linux 2.4)"
4137 msgstr ""
4138
4139 #. type: Plain text
4140 #: build/C/man2/sigaction.2:607
4141 msgid "hardware breakpoint/watchpoint"
4142 msgstr ""
4143
4144 #. type: Plain text
4145 #: build/C/man2/sigaction.2:614
4146 msgid "The following values can be placed in I<si_code> for a B<SIGCHLD> signal:"
4147 msgstr ""
4148
4149 #. type: TP
4150 #: build/C/man2/sigaction.2:615
4151 #, no-wrap
4152 msgid "B<CLD_EXITED>"
4153 msgstr ""
4154
4155 #. type: Plain text
4156 #: build/C/man2/sigaction.2:618
4157 msgid "child has exited"
4158 msgstr ""
4159
4160 #. type: TP
4161 #: build/C/man2/sigaction.2:618
4162 #, no-wrap
4163 msgid "B<CLD_KILLED>"
4164 msgstr ""
4165
4166 #. type: Plain text
4167 #: build/C/man2/sigaction.2:621
4168 msgid "child was killed"
4169 msgstr ""
4170
4171 #. type: TP
4172 #: build/C/man2/sigaction.2:621
4173 #, no-wrap
4174 msgid "B<CLD_DUMPED>"
4175 msgstr ""
4176
4177 #. type: Plain text
4178 #: build/C/man2/sigaction.2:624
4179 msgid "child terminated abnormally"
4180 msgstr ""
4181
4182 #. type: TP
4183 #: build/C/man2/sigaction.2:624
4184 #, no-wrap
4185 msgid "B<CLD_TRAPPED>"
4186 msgstr ""
4187
4188 #. type: Plain text
4189 #: build/C/man2/sigaction.2:627
4190 msgid "traced child has trapped"
4191 msgstr ""
4192
4193 #. type: TP
4194 #: build/C/man2/sigaction.2:627
4195 #, no-wrap
4196 msgid "B<CLD_STOPPED>"
4197 msgstr ""
4198
4199 #. type: Plain text
4200 #: build/C/man2/sigaction.2:630
4201 msgid "child has stopped"
4202 msgstr ""
4203
4204 #. type: TP
4205 #: build/C/man2/sigaction.2:630
4206 #, no-wrap
4207 msgid "B<CLD_CONTINUED>"
4208 msgstr ""
4209
4210 #. type: Plain text
4211 #: build/C/man2/sigaction.2:633
4212 msgid "stopped child has continued (since Linux 2.6.9)"
4213 msgstr ""
4214
4215 #. type: Plain text
4216 #: build/C/man2/sigaction.2:640
4217 msgid ""
4218 "The following values can be placed in I<si_code> for a B<SIGIO>/B<SIGPOLL> "
4219 "signal:"
4220 msgstr ""
4221
4222 #. type: TP
4223 #: build/C/man2/sigaction.2:641
4224 #, no-wrap
4225 msgid "B<POLL_IN>"
4226 msgstr ""
4227
4228 #. type: Plain text
4229 #: build/C/man2/sigaction.2:644
4230 msgid "data input available"
4231 msgstr ""
4232
4233 #. type: TP
4234 #: build/C/man2/sigaction.2:644
4235 #, no-wrap
4236 msgid "B<POLL_OUT>"
4237 msgstr ""
4238
4239 #. type: Plain text
4240 #: build/C/man2/sigaction.2:647
4241 msgid "output buffers available"
4242 msgstr ""
4243
4244 #. type: TP
4245 #: build/C/man2/sigaction.2:647
4246 #, no-wrap
4247 msgid "B<POLL_MSG>"
4248 msgstr ""
4249
4250 #. type: Plain text
4251 #: build/C/man2/sigaction.2:650
4252 msgid "input message available"
4253 msgstr ""
4254
4255 #. type: TP
4256 #: build/C/man2/sigaction.2:650
4257 #, no-wrap
4258 msgid "B<POLL_ERR>"
4259 msgstr ""
4260
4261 #. type: Plain text
4262 #: build/C/man2/sigaction.2:653
4263 msgid "I/O error"
4264 msgstr ""
4265
4266 #. type: TP
4267 #: build/C/man2/sigaction.2:653
4268 #, no-wrap
4269 msgid "B<POLL_PRI>"
4270 msgstr ""
4271
4272 #. type: Plain text
4273 #: build/C/man2/sigaction.2:656
4274 msgid "high priority input available"
4275 msgstr ""
4276
4277 #. type: TP
4278 #: build/C/man2/sigaction.2:656
4279 #, no-wrap
4280 msgid "B<POLL_HUP>"
4281 msgstr ""
4282
4283 #. type: Plain text
4284 #: build/C/man2/sigaction.2:659
4285 msgid "device disconnected"
4286 msgstr ""
4287
4288 #. type: Plain text
4289 #: build/C/man2/sigaction.2:663
4290 msgid "B<sigaction>()  returns 0 on success and -1 on error."
4291 msgstr ""
4292
4293 #. type: Plain text
4294 #: build/C/man2/sigaction.2:668
4295 msgid ""
4296 "I<act> or I<oldact> points to memory which is not a valid part of the "
4297 "process address space."
4298 msgstr ""
4299
4300 #. type: Plain text
4301 #: build/C/man2/sigaction.2:675
4302 msgid ""
4303 "An invalid signal was specified.  This will also be generated if an attempt "
4304 "is made to change the action for B<SIGKILL> or B<SIGSTOP>, which cannot be "
4305 "caught or ignored."
4306 msgstr ""
4307
4308 #.  SVr4 does not document the EINTR condition.
4309 #. type: Plain text
4310 #: build/C/man2/sigaction.2:678
4311 msgid "POSIX.1-2001, SVr4."
4312 msgstr ""
4313
4314 #. type: Plain text
4315 #: build/C/man2/sigaction.2:686 build/C/man7/signal.7:105
4316 msgid ""
4317 "A child created via B<fork>(2)  inherits a copy of its parent's signal "
4318 "dispositions.  During an B<execve>(2), the dispositions of handled signals "
4319 "are reset to the default; the dispositions of ignored signals are left "
4320 "unchanged."
4321 msgstr ""
4322
4323 #. type: Plain text
4324 #: build/C/man2/sigaction.2:704 build/C/man2/signal.2:131
4325 msgid ""
4326 "According to POSIX, the behavior of a process is undefined after it ignores "
4327 "a B<SIGFPE>, B<SIGILL>, or B<SIGSEGV> signal that was not generated by "
4328 "B<kill>(2)  or B<raise>(3).  Integer division by zero has undefined result.  "
4329 "On some architectures it will generate a B<SIGFPE> signal.  (Also dividing "
4330 "the most negative integer by -1 may generate B<SIGFPE>.)  Ignoring this "
4331 "signal might lead to an endless loop."
4332 msgstr ""
4333
4334 #. type: Plain text
4335 #: build/C/man2/sigaction.2:721
4336 msgid ""
4337 "POSIX.1-1990 disallowed setting the action for B<SIGCHLD> to B<SIG_IGN>.  "
4338 "POSIX.1-2001 allows this possibility, so that ignoring B<SIGCHLD> can be "
4339 "used to prevent the creation of zombies (see B<wait>(2)).  Nevertheless, the "
4340 "historical BSD and System V behaviors for ignoring B<SIGCHLD> differ, so "
4341 "that the only completely portable method of ensuring that terminated "
4342 "children do not become zombies is to catch the B<SIGCHLD> signal and perform "
4343 "a B<wait>(2)  or similar."
4344 msgstr ""
4345
4346 #. type: Plain text
4347 #: build/C/man2/sigaction.2:734
4348 msgid ""
4349 "POSIX.1-1990 only specified B<SA_NOCLDSTOP>.  POSIX.1-2001 added "
4350 "B<SA_NOCLDWAIT>, B<SA_RESETHAND>, B<SA_NODEFER>, and B<SA_SIGINFO>.  Use of "
4351 "these latter values in I<sa_flags> may be less portable in applications "
4352 "intended for older UNIX implementations."
4353 msgstr ""
4354
4355 #. type: Plain text
4356 #: build/C/man2/sigaction.2:738
4357 msgid "The B<SA_RESETHAND> flag is compatible with the SVr4 flag of the same name."
4358 msgstr ""
4359
4360 #. type: Plain text
4361 #: build/C/man2/sigaction.2:748
4362 msgid ""
4363 "The B<SA_NODEFER> flag is compatible with the SVr4 flag of the same name "
4364 "under kernels 1.3.9 and newer.  On older kernels the Linux implementation "
4365 "allowed the receipt of any signal, not just the one we are installing "
4366 "(effectively overriding any I<sa_mask> settings)."
4367 msgstr ""
4368
4369 #. type: Plain text
4370 #: build/C/man2/sigaction.2:754
4371 msgid ""
4372 "B<sigaction>()  can be called with a NULL second argument to query the "
4373 "current signal handler.  It can also be used to check whether a given signal "
4374 "is valid for the current machine by calling it with NULL second and third "
4375 "arguments."
4376 msgstr ""
4377
4378 #. type: Plain text
4379 #: build/C/man2/sigaction.2:760
4380 msgid ""
4381 "It is not possible to block B<SIGKILL> or B<SIGSTOP> (by specifying them in "
4382 "I<sa_mask>).  Attempts to do so are silently ignored."
4383 msgstr ""
4384
4385 #. type: Plain text
4386 #: build/C/man2/sigaction.2:764 build/C/man2/sigpending.2:67 build/C/man2/sigprocmask.2:141 build/C/man2/sigsuspend.2:106
4387 msgid "See B<sigsetops>(3)  for details on manipulating signal sets."
4388 msgstr ""
4389
4390 #. type: Plain text
4391 #: build/C/man2/sigaction.2:769
4392 msgid ""
4393 "See B<signal>(7)  for a list of the async-signal-safe functions that can be "
4394 "safely called inside from inside a signal handler."
4395 msgstr ""
4396
4397 #. type: SS
4398 #: build/C/man2/sigaction.2:769
4399 #, no-wrap
4400 msgid "Undocumented"
4401 msgstr ""
4402
4403 #. type: Plain text
4404 #: build/C/man2/sigaction.2:779
4405 msgid ""
4406 "Before the introduction of B<SA_SIGINFO> it was also possible to get some "
4407 "additional information, namely by using a I<sa_handler> with second argument "
4408 "of type I<struct sigcontext>.  See the relevant Linux kernel sources for "
4409 "details.  This use is obsolete now."
4410 msgstr ""
4411
4412 #. type: Plain text
4413 #: build/C/man2/sigaction.2:788
4414 msgid ""
4415 "In kernels up to and including 2.6.13, specifying B<SA_NODEFER> in "
4416 "I<sa_flags> prevents not only the delivered signal from being masked during "
4417 "execution of the handler, but also the signals specified in I<sa_mask>.  "
4418 "This bug was fixed in kernel 2.6.14."
4419 msgstr ""
4420
4421 #. type: Plain text
4422 #: build/C/man2/sigaction.2:791
4423 msgid "See B<mprotect>(2)."
4424 msgstr ""
4425
4426 #. type: Plain text
4427 #: build/C/man2/sigaction.2:810
4428 msgid ""
4429 "B<kill>(1), B<kill>(2), B<killpg>(2), B<pause>(2), B<sigaltstack>(2), "
4430 "B<signal>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), "
4431 "B<sigsuspend>(2), B<wait>(2), B<raise>(3), B<siginterrupt>(3), "
4432 "B<sigqueue>(3), B<sigsetops>(3), B<sigvec>(3), B<core>(5), B<signal>(7)"
4433 msgstr ""
4434
4435 #. type: TH
4436 #: build/C/man2/sigaltstack.2:27
4437 #, no-wrap
4438 msgid "SIGALTSTACK"
4439 msgstr ""
4440
4441 #. type: TH
4442 #: build/C/man2/sigaltstack.2:27
4443 #, no-wrap
4444 msgid "2010-09-26"
4445 msgstr ""
4446
4447 #. type: Plain text
4448 #: build/C/man2/sigaltstack.2:30
4449 msgid "sigaltstack - set and/or get signal stack context"
4450 msgstr ""
4451
4452 #. type: Plain text
4453 #: build/C/man2/sigaltstack.2:34
4454 msgid "B<int sigaltstack(const stack_t *>I<ss>B<, stack_t *>I<oss>B<);>"
4455 msgstr ""
4456
4457 #. type: Plain text
4458 #: build/C/man2/sigaltstack.2:41
4459 msgid "B<sigaltstack>():"
4460 msgstr ""
4461
4462 #. type: Plain text
4463 #: build/C/man2/sigaltstack.2:48 build/C/man3/siginterrupt.3:53 build/C/man2/wait.2:78
4464 msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
4465 msgstr ""
4466
4467 #. type: Plain text
4468 #: build/C/man2/sigaltstack.2:60
4469 msgid ""
4470 "B<sigaltstack>()  allows a process to define a new alternate signal stack "
4471 "and/or retrieve the state of an existing alternate signal stack.  An "
4472 "alternate signal stack is used during the execution of a signal handler if "
4473 "the establishment of that handler (see B<sigaction>(2))  requested it."
4474 msgstr ""
4475
4476 #. type: Plain text
4477 #: build/C/man2/sigaltstack.2:63
4478 msgid ""
4479 "The normal sequence of events for using an alternate signal stack is the "
4480 "following:"
4481 msgstr ""
4482
4483 #. type: IP
4484 #: build/C/man2/sigaltstack.2:63 build/C/man7/signal.7:387
4485 #, no-wrap
4486 msgid "1."
4487 msgstr ""
4488
4489 #. type: Plain text
4490 #: build/C/man2/sigaltstack.2:67
4491 msgid "Allocate an area of memory to be used for the alternate signal stack."
4492 msgstr ""
4493
4494 #. type: IP
4495 #: build/C/man2/sigaltstack.2:67 build/C/man7/signal.7:391
4496 #, no-wrap
4497 msgid "2."
4498 msgstr ""
4499
4500 #. type: Plain text
4501 #: build/C/man2/sigaltstack.2:73
4502 msgid ""
4503 "Use B<sigaltstack>()  to inform the system of the existence and location of "
4504 "the alternate signal stack."
4505 msgstr ""
4506
4507 #. type: IP
4508 #: build/C/man2/sigaltstack.2:73 build/C/man7/signal.7:411
4509 #, no-wrap
4510 msgid "3."
4511 msgstr ""
4512
4513 #. type: Plain text
4514 #: build/C/man2/sigaltstack.2:80
4515 msgid ""
4516 "When establishing a signal handler using B<sigaction>(2), inform the system "
4517 "that the signal handler should be executed on the alternate signal stack by "
4518 "specifying the B<SA_ONSTACK> flag."
4519 msgstr ""
4520
4521 #. type: Plain text
4522 #: build/C/man2/sigaltstack.2:88
4523 msgid ""
4524 "The I<ss> argument is used to specify a new alternate signal stack, while "
4525 "the I<oss> argument is used to retrieve information about the currently "
4526 "established signal stack.  If we are interested in performing just one of "
4527 "these tasks then the other argument can be specified as NULL.  Each of these "
4528 "arguments is a structure of the following type:"
4529 msgstr ""
4530
4531 #. type: Plain text
4532 #: build/C/man2/sigaltstack.2:96
4533 #, no-wrap
4534 msgid ""
4535 "typedef struct {\n"
4536 "    void  *ss_sp;     /* Base address of stack */\n"
4537 "    int    ss_flags;  /* Flags */\n"
4538 "    size_t ss_size;   /* Number of bytes in stack */\n"
4539 "} stack_t;\n"
4540 msgstr ""
4541
4542 #. type: Plain text
4543 #: build/C/man2/sigaltstack.2:107
4544 msgid ""
4545 "To establish a new alternate signal stack, I<ss.ss_flags> is set to zero, "
4546 "and I<ss.ss_sp> and I<ss.ss_size> specify the starting address and size of "
4547 "the stack.  The constant B<SIGSTKSZ> is defined to be large enough to cover "
4548 "the usual size requirements for an alternate signal stack, and the constant "
4549 "B<MINSIGSTKSZ> defines the minimum size required to execute a signal "
4550 "handler."
4551 msgstr ""
4552
4553 #. type: Plain text
4554 #: build/C/man2/sigaltstack.2:111
4555 msgid ""
4556 "When a signal handler is invoked on the alternate stack, the kernel "
4557 "automatically aligns the address given in I<ss.ss_sp> to a suitable address "
4558 "boundary for the underlying hardware architecture."
4559 msgstr ""
4560
4561 #. type: Plain text
4562 #: build/C/man2/sigaltstack.2:116
4563 msgid ""
4564 "To disable an existing stack, specify I<ss.ss_flags> as B<SS_DISABLE>.  In "
4565 "this case, the remaining fields in I<ss> are ignored."
4566 msgstr ""
4567
4568 #. type: Plain text
4569 #: build/C/man2/sigaltstack.2:124
4570 msgid ""
4571 "If I<oss> is not NULL, then it is used to return information about the "
4572 "alternate signal stack which was in effect prior to the call to "
4573 "B<sigaltstack>().  The I<oss.ss_sp> and I<oss.ss_size> fields return the "
4574 "starting address and size of that stack.  The I<oss.ss_flags> may return "
4575 "either of the following values:"
4576 msgstr ""
4577
4578 #. type: TP
4579 #: build/C/man2/sigaltstack.2:124
4580 #, no-wrap
4581 msgid "B<SS_ONSTACK>"
4582 msgstr ""
4583
4584 #. type: Plain text
4585 #: build/C/man2/sigaltstack.2:130
4586 msgid ""
4587 "The process is currently executing on the alternate signal stack.  (Note "
4588 "that it is not possible to change the alternate signal stack if the process "
4589 "is currently executing on it.)"
4590 msgstr ""
4591
4592 #. type: TP
4593 #: build/C/man2/sigaltstack.2:130
4594 #, no-wrap
4595 msgid "B<SS_DISABLE>"
4596 msgstr ""
4597
4598 #. type: Plain text
4599 #: build/C/man2/sigaltstack.2:133
4600 msgid "The alternate signal stack is currently disabled."
4601 msgstr ""
4602
4603 #. type: Plain text
4604 #: build/C/man2/sigaltstack.2:137
4605 msgid ""
4606 "B<sigaltstack>()  returns 0 on success, or -1 on failure with I<errno> set "
4607 "to indicate the error."
4608 msgstr ""
4609
4610 #. type: Plain text
4611 #: build/C/man2/sigaltstack.2:142
4612 msgid ""
4613 "Either I<ss> or I<oss> is not NULL and points to an area outside of the "
4614 "process's address space."
4615 msgstr ""
4616
4617 #. type: Plain text
4618 #: build/C/man2/sigaltstack.2:147
4619 msgid ""
4620 "I<ss> is not NULL and the I<ss_flags> field contains a nonzero value other "
4621 "than B<SS_DISABLE>."
4622 msgstr ""
4623
4624 #. type: Plain text
4625 #: build/C/man2/sigaltstack.2:151
4626 msgid ""
4627 "The specified size of the new alternate signal stack (I<ss.ss_size>) was "
4628 "less than B<MINSTKSZ>."
4629 msgstr ""
4630
4631 #. type: Plain text
4632 #: build/C/man2/sigaltstack.2:156
4633 msgid ""
4634 "An attempt was made to change the alternate signal stack while it was active "
4635 "(i.e., the process was already executing on the current alternate signal "
4636 "stack)."
4637 msgstr ""
4638
4639 #. type: Plain text
4640 #: build/C/man2/sigaltstack.2:158
4641 msgid "SUSv2, SVr4, POSIX.1-2001."
4642 msgstr ""
4643
4644 #. type: Plain text
4645 #: build/C/man2/sigaltstack.2:166
4646 msgid ""
4647 "The most common usage of an alternate signal stack is to handle the "
4648 "B<SIGSEGV> signal that is generated if the space available for the normal "
4649 "process stack is exhausted: in this case, a signal handler for B<SIGSEGV> "
4650 "cannot be invoked on the process stack; if we wish to handle it, we must use "
4651 "an alternate signal stack."
4652 msgstr ""
4653
4654 #. type: Plain text
4655 #: build/C/man2/sigaltstack.2:176
4656 msgid ""
4657 "Establishing an alternate signal stack is useful if a process expects that "
4658 "it may exhaust its standard stack.  This may occur, for example, because the "
4659 "stack grows so large that it encounters the upwardly growing heap, or it "
4660 "reaches a limit established by a call to B<setrlimit(RLIMIT_STACK, &rlim)>.  "
4661 "If the standard stack is exhausted, the kernel sends the process a "
4662 "B<SIGSEGV> signal.  In these circumstances the only way to catch this signal "
4663 "is on an alternate signal stack."
4664 msgstr ""
4665
4666 #. type: Plain text
4667 #: build/C/man2/sigaltstack.2:182
4668 msgid ""
4669 "On most hardware architectures supported by Linux, stacks grow downward.  "
4670 "B<sigaltstack>()  automatically takes account of the direction of stack "
4671 "growth."
4672 msgstr ""
4673
4674 #. type: Plain text
4675 #: build/C/man2/sigaltstack.2:191
4676 msgid ""
4677 "Functions called from a signal handler executing on an alternate signal "
4678 "stack will also use the alternate signal stack.  (This also applies to any "
4679 "handlers invoked for other signals while the process is executing on the "
4680 "alternate signal stack.)  Unlike the standard stack, the system does not "
4681 "automatically extend the alternate signal stack.  Exceeding the allocated "
4682 "size of the alternate signal stack will lead to unpredictable results."
4683 msgstr ""
4684
4685 #. type: Plain text
4686 #: build/C/man2/sigaltstack.2:199
4687 msgid ""
4688 "A successful call to B<execve>(2)  removes any existing alternate signal "
4689 "stack.  A child process created via B<fork>(2)  inherits a copy of its "
4690 "parent's alternate signal stack settings."
4691 msgstr ""
4692
4693 #. type: Plain text
4694 #: build/C/man2/sigaltstack.2:208
4695 msgid ""
4696 "B<sigaltstack>()  supersedes the older B<sigstack>()  call.  For backward "
4697 "compatibility, glibc also provides B<sigstack>().  All new applications "
4698 "should be written using B<sigaltstack>()."
4699 msgstr ""
4700
4701 #. type: SS
4702 #: build/C/man2/sigaltstack.2:208 build/C/man3/sigpause.3:61
4703 #, no-wrap
4704 msgid "History"
4705 msgstr ""
4706
4707 #. type: Plain text
4708 #: build/C/man2/sigaltstack.2:215
4709 msgid ""
4710 "4.2BSD had a B<sigstack>()  system call.  It used a slightly different "
4711 "struct, and had the major disadvantage that the caller had to know the "
4712 "direction of stack growth."
4713 msgstr ""
4714
4715 #. type: Plain text
4716 #: build/C/man2/sigaltstack.2:218
4717 msgid "The following code segment demonstrates the use of B<sigaltstack>():"
4718 msgstr ""
4719
4720 #. type: Plain text
4721 #: build/C/man2/sigaltstack.2:222
4722 #, no-wrap
4723 msgid "stack_t ss;\n"
4724 msgstr ""
4725
4726 #. type: Plain text
4727 #: build/C/man2/sigaltstack.2:230
4728 #, no-wrap
4729 msgid ""
4730 "ss.ss_sp = malloc(SIGSTKSZ);\n"
4731 "if (ss.ss_sp == NULL)\n"
4732 "    /* Handle error */;\n"
4733 "ss.ss_size = SIGSTKSZ;\n"
4734 "ss.ss_flags = 0;\n"
4735 "if (sigaltstack(&ss, NULL) == -1)\n"
4736 "    /* Handle error */;\n"
4737 msgstr ""
4738
4739 #. type: Plain text
4740 #: build/C/man2/sigaltstack.2:239
4741 msgid ""
4742 "B<execve>(2), B<setrlimit>(2), B<sigaction>(2), B<siglongjmp>(3), "
4743 "B<sigsetjmp>(3), B<signal>(7)"
4744 msgstr ""
4745
4746 #. type: TH
4747 #: build/C/man7/sigevent.7:26
4748 #, no-wrap
4749 msgid "SIGEVENT"
4750 msgstr ""
4751
4752 #. type: TH
4753 #: build/C/man7/sigevent.7:26 build/C/man3/siginterrupt.3:31
4754 #, no-wrap
4755 msgid "2011-09-09"
4756 msgstr ""
4757
4758 #. type: Plain text
4759 #: build/C/man7/sigevent.7:29
4760 msgid "sigevent - structure for notification from asynchronous routines"
4761 msgstr ""
4762
4763 #. type: Plain text
4764 #: build/C/man7/sigevent.7:36
4765 #, no-wrap
4766 msgid ""
4767 "union sigval {          /* Data passed with notification */\n"
4768 "    int     sival_int;         /* Integer value */\n"
4769 "    void   *sival_ptr;         /* Pointer value */\n"
4770 "};\n"
4771 msgstr ""
4772
4773 #. type: Plain text
4774 #: build/C/man7/sigevent.7:51
4775 #, no-wrap
4776 msgid ""
4777 "struct sigevent {\n"
4778 "    int          sigev_notify; /* Notification method */\n"
4779 "    int          sigev_signo;  /* Notification signal */\n"
4780 "    union sigval sigev_value;  /* Data passed with\n"
4781 "                                  notification */\n"
4782 "    void       (*sigev_notify_function) (union sigval);\n"
4783 "                     /* Function used for thread\n"
4784 "                        notification (SIGEV_THREAD) */\n"
4785 "    void        *sigev_notify_attributes;\n"
4786 "                     /* Attributes for notification thread\n"
4787 "                        (SIGEV_THREAD) */\n"
4788 "    pid_t        sigev_notify_thread_id;\n"
4789 "                     /* ID of thread to signal (SIGEV_THREAD_ID) */\n"
4790 "};\n"
4791 msgstr ""
4792
4793 #. type: Plain text
4794 #: build/C/man7/sigevent.7:60
4795 msgid ""
4796 "The I<sigevent> structure is used by various APIs to describe the way a "
4797 "process is to be notified about an event (e.g., completion of an "
4798 "asynchronous request, expiration of a timer, or the arrival of a message)."
4799 msgstr ""
4800
4801 #. type: Plain text
4802 #: build/C/man7/sigevent.7:68
4803 msgid ""
4804 "The definition shown in the SYNOPSIS is approximate: some of the fields in "
4805 "the I<sigevent> structure may be defined as part of a union.  Programs "
4806 "should only employ those fields relevant to the value specified in "
4807 "I<sigev_notify>."
4808 msgstr ""
4809
4810 #. type: Plain text
4811 #: build/C/man7/sigevent.7:73
4812 msgid ""
4813 "The I<sigev_notify> field specifies how notification is to be performed.  "
4814 "This field can have one of the following values:"
4815 msgstr ""
4816
4817 #. type: TP
4818 #: build/C/man7/sigevent.7:73 build/C/man2/timer_create.2:107
4819 #, no-wrap
4820 msgid "B<SIGEV_NONE>"
4821 msgstr ""
4822
4823 #. type: Plain text
4824 #: build/C/man7/sigevent.7:76
4825 msgid "A \"null\" notification: don't do anything when the event occurs."
4826 msgstr ""
4827
4828 #. type: TP
4829 #: build/C/man7/sigevent.7:76 build/C/man2/timer_create.2:112
4830 #, no-wrap
4831 msgid "B<SIGEV_SIGNAL>"
4832 msgstr ""
4833
4834 #. type: Plain text
4835 #: build/C/man7/sigevent.7:80
4836 msgid "Notify the process by sending the signal specified in I<sigev_signo>."
4837 msgstr ""
4838
4839 #. type: Plain text
4840 #: build/C/man7/sigevent.7:87
4841 msgid ""
4842 "If the signal is caught with a signal handler that was registered using the "
4843 "B<sigaction>(2)  B<SA_SIGINFO> flag, then the following fields are set in "
4844 "the I<siginfo_t> structure that is passed as the second argument of the "
4845 "handler:"
4846 msgstr ""
4847
4848 #. type: Plain text
4849 #: build/C/man7/sigevent.7:92
4850 msgid ""
4851 "This field is set to a value that depends on the API delivering the "
4852 "notification."
4853 msgstr ""
4854
4855 #. type: TP
4856 #: build/C/man7/sigevent.7:92 build/C/man2/wait.2:300
4857 #, no-wrap
4858 msgid "I<si_signo>"
4859 msgstr ""
4860
4861 #. type: Plain text
4862 #: build/C/man7/sigevent.7:96
4863 msgid ""
4864 "This field is set to the signal number (i.e., the same value as in "
4865 "I<sigev_signo>)."
4866 msgstr ""
4867
4868 #. type: Plain text
4869 #: build/C/man7/sigevent.7:100
4870 msgid "This field is set to the value specified in I<sigev_value>."
4871 msgstr ""
4872
4873 #. type: Plain text
4874 #: build/C/man7/sigevent.7:105
4875 msgid ""
4876 "Depending on the API, other fields may also be set in the I<siginfo_t> "
4877 "structure."
4878 msgstr ""
4879
4880 #. type: Plain text
4881 #: build/C/man7/sigevent.7:108
4882 msgid ""
4883 "The same information is also available if the signal is accepted using "
4884 "B<sigwaitinfo>(2)."
4885 msgstr ""
4886
4887 #. type: TP
4888 #: build/C/man7/sigevent.7:108 build/C/man2/timer_create.2:130
4889 #, no-wrap
4890 msgid "B<SIGEV_THREAD>"
4891 msgstr ""
4892
4893 #. type: Plain text
4894 #: build/C/man7/sigevent.7:125
4895 msgid ""
4896 "Notify the process by invoking I<sigev_notify_function> \"as if\" it were "
4897 "the start function of a new thread.  (Among the implementation possibilities "
4898 "here are that each timer notification could result in the creation of a new "
4899 "thread, or that a single thread is created to receive all notifications.)  "
4900 "The function is invoked with I<sigev_value> as its sole argument.  If "
4901 "I<sigev_notify_attributes> is not NULL, it should point to a "
4902 "I<pthread_attr_t> structure that defines attributes for the new thread (see "
4903 "B<pthread_attr_init>(3))."
4904 msgstr ""
4905
4906 #. type: TP
4907 #: build/C/man7/sigevent.7:125 build/C/man2/timer_create.2:138
4908 #, no-wrap
4909 msgid "B<SIGEV_THREAD_ID> (Linux-specific)"
4910 msgstr ""
4911
4912 #.  | SIGEV_SIGNAL vs not?
4913 #. type: Plain text
4914 #: build/C/man7/sigevent.7:130
4915 msgid "Currently used only by POSIX timers; see B<timer_create>(2)."
4916 msgstr ""
4917
4918 #. type: Plain text
4919 #: build/C/man7/sigevent.7:132 build/C/man2/sigpending.2:63 build/C/man2/sigprocmask.2:111 build/C/man3/sigqueue.3:116 build/C/man3/sigsetops.3:130 build/C/man2/sigsuspend.2:84 build/C/man3/sigwait.3:82 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
4920 msgid "POSIX.1-2001."
4921 msgstr ""
4922
4923 #. type: Plain text
4924 #: build/C/man7/sigevent.7:142
4925 msgid ""
4926 "B<timer_create>(2), B<aio_fsync>(3), B<aio_read>(3), B<aio_write>(3), "
4927 "B<getaddrinfo_a>(3), B<lio_listio>(3), B<mq_notify>(3), B<aio>(7), "
4928 "B<pthreads>(7)"
4929 msgstr ""
4930
4931 #. type: TH
4932 #: build/C/man3/siginterrupt.3:31
4933 #, no-wrap
4934 msgid "SIGINTERRUPT"
4935 msgstr ""
4936
4937 #. type: Plain text
4938 #: build/C/man3/siginterrupt.3:34
4939 msgid "siginterrupt - allow signals to interrupt system calls"
4940 msgstr ""
4941
4942 #. type: Plain text
4943 #: build/C/man3/siginterrupt.3:39
4944 #, no-wrap
4945 msgid "B<int siginterrupt(int >I<sig>B<, int >I<flag>B<);>\n"
4946 msgstr ""
4947
4948 #. type: Plain text
4949 #: build/C/man3/siginterrupt.3:47
4950 msgid "B<siginterrupt>():"
4951 msgstr ""
4952
4953 #. type: Plain text
4954 #: build/C/man3/siginterrupt.3:64
4955 msgid ""
4956 "The B<siginterrupt>()  function changes the restart behavior when a system "
4957 "call is interrupted by the signal I<sig>.  If the I<flag> argument is false "
4958 "(0), then system calls will be restarted if interrupted by the specified "
4959 "signal I<sig>.  This is the default behavior in Linux."
4960 msgstr ""
4961
4962 #. type: Plain text
4963 #: build/C/man3/siginterrupt.3:69
4964 msgid ""
4965 "If the I<flag> argument is true (1) and no data has been transferred, then a "
4966 "system call interrupted by the signal I<sig> will return -1 and I<errno> "
4967 "will be set to B<EINTR>."
4968 msgstr ""
4969
4970 #. type: Plain text
4971 #: build/C/man3/siginterrupt.3:73
4972 msgid ""
4973 "If the I<flag> argument is true (1) and data transfer has started, then the "
4974 "system call will be interrupted and will return the actual amount of data "
4975 "transferred."
4976 msgstr ""
4977
4978 #. type: Plain text
4979 #: build/C/man3/siginterrupt.3:78
4980 msgid ""
4981 "The B<siginterrupt>()  function returns 0 on success, or -1 if the signal "
4982 "number I<sig> is invalid."
4983 msgstr ""
4984
4985 #. type: Plain text
4986 #: build/C/man3/siginterrupt.3:82
4987 msgid "The specified signal number is invalid."
4988 msgstr ""
4989
4990 #. type: Plain text
4991 #: build/C/man3/siginterrupt.3:91
4992 msgid ""
4993 "4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<siginterrupt>()  as obsolete, "
4994 "recommending the use of B<sigaction>(2)  with the B<SA_RESTART> flag "
4995 "instead."
4996 msgstr ""
4997
4998 #. type: Plain text
4999 #: build/C/man3/siginterrupt.3:93
5000 msgid "B<signal>(2)"
5001 msgstr ""
5002
5003 #. type: TH
5004 #: build/C/man2/signal.2:36 build/C/man7/signal.7:46
5005 #, no-wrap
5006 msgid "SIGNAL"
5007 msgstr ""
5008
5009 #. type: TH
5010 #: build/C/man2/signal.2:36
5011 #, no-wrap
5012 msgid "2013-02-09"
5013 msgstr ""
5014
5015 #. type: Plain text
5016 #: build/C/man2/signal.2:39
5017 msgid "signal - ANSI C signal handling"
5018 msgstr ""
5019
5020 #. type: Plain text
5021 #: build/C/man2/signal.2:45
5022 msgid "B<sighandler_t signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
5023 msgstr ""
5024
5025 #. type: Plain text
5026 #: build/C/man2/signal.2:54
5027 msgid ""
5028 "The behavior of B<signal>()  varies across UNIX versions, and has also "
5029 "varied historically across different versions of Linux.  B<Avoid its use>: "
5030 "use B<sigaction>(2)  instead.  See I<Portability> below."
5031 msgstr ""
5032
5033 #. type: Plain text
5034 #: build/C/man2/signal.2:64
5035 msgid ""
5036 "B<signal>()  sets the disposition of the signal I<signum> to I<handler>, "
5037 "which is either B<SIG_IGN>, B<SIG_DFL>, or the address of a "
5038 "programmer-defined function (a \"signal handler\")."
5039 msgstr ""
5040
5041 #. type: Plain text
5042 #: build/C/man2/signal.2:68
5043 msgid ""
5044 "If the signal I<signum> is delivered to the process, then one of the "
5045 "following happens:"
5046 msgstr ""
5047
5048 #. type: Plain text
5049 #: build/C/man2/signal.2:73
5050 msgid "If the disposition is set to B<SIG_IGN>, then the signal is ignored."
5051 msgstr ""
5052
5053 #. type: Plain text
5054 #: build/C/man2/signal.2:80
5055 msgid ""
5056 "If the disposition is set to B<SIG_DFL>, then the default action associated "
5057 "with the signal (see B<signal>(7))  occurs."
5058 msgstr ""
5059
5060 #. type: Plain text
5061 #: build/C/man2/signal.2:91
5062 msgid ""
5063 "If the disposition is set to a function, then first either the disposition "
5064 "is reset to B<SIG_DFL>, or the signal is blocked (see I<Portability> below), "
5065 "and then I<handler> is called with argument I<signum>.  If invocation of the "
5066 "handler caused the signal to be blocked, then the signal is unblocked upon "
5067 "return from the handler."
5068 msgstr ""
5069
5070 #. type: Plain text
5071 #: build/C/man2/signal.2:97
5072 msgid "The signals B<SIGKILL> and B<SIGSTOP> cannot be caught or ignored."
5073 msgstr ""
5074
5075 #. type: Plain text
5076 #: build/C/man2/signal.2:102
5077 msgid ""
5078 "B<signal>()  returns the previous value of the signal handler, or B<SIG_ERR> "
5079 "on error."
5080 msgstr ""
5081
5082 #. type: Plain text
5083 #: build/C/man2/signal.2:107
5084 msgid "I<signum> is invalid."
5085 msgstr ""
5086
5087 #. type: Plain text
5088 #: build/C/man2/signal.2:113
5089 msgid "The effects of B<signal>()  in a multithreaded process are unspecified."
5090 msgstr ""
5091
5092 #. type: Plain text
5093 #: build/C/man2/signal.2:138
5094 msgid ""
5095 "See B<sigaction>(2)  for details on what happens when B<SIGCHLD> is set to "
5096 "B<SIG_IGN>."
5097 msgstr ""
5098
5099 #. type: Plain text
5100 #: build/C/man2/signal.2:143
5101 msgid ""
5102 "See B<signal>(7)  for a list of the async-signal-safe functions that can be "
5103 "safely called from inside a signal handler."
5104 msgstr ""
5105
5106 #.  libc4 and libc5 define
5107 #.  .IR SignalHandler ;
5108 #. type: Plain text
5109 #: build/C/man2/signal.2:159
5110 msgid ""
5111 "The use of I<sighandler_t> is a GNU extension, exposed if B<_GNU_SOURCE> is "
5112 "defined; glibc also defines (the BSD-derived)  I<sig_t> if B<_BSD_SOURCE> is "
5113 "defined.  Without use of such a type, the declaration of B<signal>()  is the "
5114 "somewhat harder to read:"
5115 msgstr ""
5116
5117 #. type: Plain text
5118 #: build/C/man2/signal.2:163
5119 #, no-wrap
5120 msgid ""
5121 "B<void ( *>I<signal>B<(int >I<signum>B<, void (*>I<handler>B<)(int)) ) "
5122 "(int);>\n"
5123 msgstr ""
5124
5125 #. type: SS
5126 #: build/C/man2/signal.2:165
5127 #, no-wrap
5128 msgid "Portability"
5129 msgstr ""
5130
5131 #. type: Plain text
5132 #: build/C/man2/signal.2:177
5133 msgid ""
5134 "The only portable use of B<signal>()  is to set a signal's disposition to "
5135 "B<SIG_DFL> or B<SIG_IGN>.  The semantics when using B<signal>()  to "
5136 "establish a signal handler vary across systems (and POSIX.1 explicitly "
5137 "permits this variation); B<do not use it for this purpose.>"
5138 msgstr ""
5139
5140 #. type: Plain text
5141 #: build/C/man2/signal.2:183
5142 msgid ""
5143 "POSIX.1 solved the portability mess by specifying B<sigaction>(2), which "
5144 "provides explicit control of the semantics when a signal handler is invoked; "
5145 "use that interface instead of B<signal>()."
5146 msgstr ""
5147
5148 #. type: Plain text
5149 #: build/C/man2/signal.2:193
5150 msgid ""
5151 "In the original UNIX systems, when a handler that was established using "
5152 "B<signal>()  was invoked by the delivery of a signal, the disposition of the "
5153 "signal would be reset to B<SIG_DFL>, and the system did not block delivery "
5154 "of further instances of the signal.  This is equivalent to calling "
5155 "B<sigaction>(2)  with the following flags:"
5156 msgstr ""
5157
5158 #. type: Plain text
5159 #: build/C/man2/signal.2:195
5160 #, no-wrap
5161 msgid "    sa.sa_flags = SA_RESETHAND | SA_NODEFER;\n"
5162 msgstr ""
5163
5164 #. type: Plain text
5165 #: build/C/man2/signal.2:202
5166 msgid ""
5167 "System V also provides these semantics for B<signal>().  This was bad "
5168 "because the signal might be delivered again before the handler had a chance "
5169 "to reestablish itself.  Furthermore, rapid deliveries of the same signal "
5170 "could result in recursive invocations of the handler."
5171 msgstr ""
5172
5173 #. type: Plain text
5174 #: build/C/man2/signal.2:217
5175 msgid ""
5176 "BSD improved on this situation, but unfortunately also changed the semantics "
5177 "of the existing B<signal>()  interface while doing so.  On BSD, when a "
5178 "signal handler is invoked, the signal disposition is not reset, and further "
5179 "instances of the signal are blocked from being delivered while the handler "
5180 "is executing.  Furthermore, certain blocking system calls are automatically "
5181 "restarted if interrupted by a signal handler (see B<signal>(7)).  The BSD "
5182 "semantics are equivalent to calling B<sigaction>(2)  with the following "
5183 "flags:"
5184 msgstr ""
5185
5186 #. type: Plain text
5187 #: build/C/man2/signal.2:219
5188 #, no-wrap
5189 msgid "    sa.sa_flags = SA_RESTART;\n"
5190 msgstr ""
5191
5192 #. type: Plain text
5193 #: build/C/man2/signal.2:221
5194 msgid "The situation on Linux is as follows:"
5195 msgstr ""
5196
5197 #. type: Plain text
5198 #: build/C/man2/signal.2:225
5199 msgid "The kernel's B<signal>()  system call provides System V semantics."
5200 msgstr ""
5201
5202 #. type: Plain text
5203 #: build/C/man2/signal.2:241
5204 msgid ""
5205 "By default, in glibc 2 and later, the B<signal>()  wrapper function does not "
5206 "invoke the kernel system call.  Instead, it calls B<sigaction>(2)  using "
5207 "flags that supply BSD semantics.  This default behavior is provided as long "
5208 "as the B<_BSD_SOURCE> feature test macro is defined.  By default, "
5209 "B<_BSD_SOURCE> is defined; it is also implicitly defined if one defines "
5210 "B<_GNU_SOURCE>, and can of course be explicitly defined."
5211 msgstr ""
5212
5213 #
5214 #.  System V semantics are also provided if one uses the separate
5215 #.  .BR sysv_signal (3)
5216 #.  function.
5217 #. type: Plain text
5218 #: build/C/man2/signal.2:264
5219 msgid ""
5220 "On glibc 2 and later, if the B<_BSD_SOURCE> feature test macro is not "
5221 "defined, then B<signal>()  provides System V semantics.  (The default "
5222 "implicit definition of B<_BSD_SOURCE> is not provided if one invokes "
5223 "B<gcc>(1)  in one of its standard modes (I<-std=xxx> or I<-ansi>)  or "
5224 "defines various other feature test macros such as B<_POSIX_SOURCE>, "
5225 "B<_XOPEN_SOURCE>, or B<_SVID_SOURCE>; see B<feature_test_macros>(7).)"
5226 msgstr ""
5227
5228 #. type: Plain text
5229 #: build/C/man2/signal.2:275
5230 msgid ""
5231 "The B<signal>()  function in Linux libc4 and libc5 provide System V "
5232 "semantics.  If one on a libc5 system includes I<E<lt>bsd/signal.hE<gt>> "
5233 "instead of I<E<lt>signal.hE<gt>>, then B<signal>()  provides BSD semantics."
5234 msgstr ""
5235
5236 #. type: Plain text
5237 #: build/C/man2/signal.2:294
5238 msgid ""
5239 "B<kill>(1), B<alarm>(2), B<kill>(2), B<killpg>(2), B<pause>(2), "
5240 "B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), "
5241 "B<sigsuspend>(2), B<bsd_signal>(3), B<raise>(3), B<siginterrupt>(3), "
5242 "B<sigqueue>(3), B<sigsetops>(3), B<sigvec>(3), B<sysv_signal>(3), "
5243 "B<signal>(7)"
5244 msgstr ""
5245
5246 #. type: TH
5247 #: build/C/man7/signal.7:46
5248 #, no-wrap
5249 msgid "2012-05-01"
5250 msgstr ""
5251
5252 #. type: Plain text
5253 #: build/C/man7/signal.7:49
5254 msgid "signal - overview of signals"
5255 msgstr ""
5256
5257 #. type: Plain text
5258 #: build/C/man7/signal.7:52
5259 msgid ""
5260 "Linux supports both POSIX reliable signals (hereinafter \"standard "
5261 "signals\") and POSIX real-time signals."
5262 msgstr ""
5263
5264 #. type: SS
5265 #: build/C/man7/signal.7:52
5266 #, no-wrap
5267 msgid "Signal dispositions"
5268 msgstr ""
5269
5270 #. type: Plain text
5271 #: build/C/man7/signal.7:57
5272 msgid ""
5273 "Each signal has a current I<disposition>, which determines how the process "
5274 "behaves when it is delivered the signal."
5275 msgstr ""
5276
5277 #. type: Plain text
5278 #: build/C/man7/signal.7:60
5279 msgid ""
5280 "The entries in the \"Action\" column of the tables below specify the default "
5281 "disposition for each signal, as follows:"
5282 msgstr ""
5283
5284 #. type: IP
5285 #: build/C/man7/signal.7:60
5286 #, no-wrap
5287 msgid "Term"
5288 msgstr ""
5289
5290 #. type: Plain text
5291 #: build/C/man7/signal.7:62
5292 msgid "Default action is to terminate the process."
5293 msgstr ""
5294
5295 #. type: IP
5296 #: build/C/man7/signal.7:62
5297 #, no-wrap
5298 msgid "Ign"
5299 msgstr ""
5300
5301 #. type: Plain text
5302 #: build/C/man7/signal.7:64
5303 msgid "Default action is to ignore the signal."
5304 msgstr ""
5305
5306 #. type: IP
5307 #: build/C/man7/signal.7:64
5308 #, no-wrap
5309 msgid "Core"
5310 msgstr ""
5311
5312 #. type: Plain text
5313 #: build/C/man7/signal.7:67
5314 msgid "Default action is to terminate the process and dump core (see B<core>(5))."
5315 msgstr ""
5316
5317 #. type: IP
5318 #: build/C/man7/signal.7:67
5319 #, no-wrap
5320 msgid "Stop"
5321 msgstr ""
5322
5323 #. type: Plain text
5324 #: build/C/man7/signal.7:69
5325 msgid "Default action is to stop the process."
5326 msgstr ""
5327
5328 #. type: IP
5329 #: build/C/man7/signal.7:69
5330 #, no-wrap
5331 msgid "Cont"
5332 msgstr ""
5333
5334 #. type: Plain text
5335 #: build/C/man7/signal.7:71
5336 msgid "Default action is to continue the process if it is currently stopped."
5337 msgstr ""
5338
5339 #. type: Plain text
5340 #: build/C/man7/signal.7:93
5341 msgid ""
5342 "A process can change the disposition of a signal using B<sigaction>(2)  or "
5343 "B<signal>(2).  (The latter is less portable when establishing a signal "
5344 "handler; see B<signal>(2)  for details.)  Using these system calls, a "
5345 "process can elect one of the following behaviors to occur on delivery of the "
5346 "signal: perform the default action; ignore the signal; or catch the signal "
5347 "with a I<signal handler>, a programmer-defined function that is "
5348 "automatically invoked when the signal is delivered.  (By default, the signal "
5349 "handler is invoked on the normal process stack.  It is possible to arrange "
5350 "that the signal handler uses an alternate stack; see B<sigaltstack>(2)  for "
5351 "a discussion of how to do this and when it might be useful.)"
5352 msgstr ""
5353
5354 #. type: Plain text
5355 #: build/C/man7/signal.7:97
5356 msgid ""
5357 "The signal disposition is a per-process attribute: in a multithreaded "
5358 "application, the disposition of a particular signal is the same for all "
5359 "threads."
5360 msgstr ""
5361
5362 #. type: SS
5363 #: build/C/man7/signal.7:105
5364 #, no-wrap
5365 msgid "Sending a signal"
5366 msgstr ""
5367
5368 #. type: Plain text
5369 #: build/C/man7/signal.7:108
5370 msgid ""
5371 "The following system calls and library functions allow the caller to send a "
5372 "signal:"
5373 msgstr ""
5374
5375 #. type: TP
5376 #: build/C/man7/signal.7:108
5377 #, no-wrap
5378 msgid "B<raise>(3)"
5379 msgstr ""
5380
5381 #. type: Plain text
5382 #: build/C/man7/signal.7:111
5383 msgid "Sends a signal to the calling thread."
5384 msgstr ""
5385
5386 #. type: Plain text
5387 #: build/C/man7/signal.7:116
5388 msgid ""
5389 "Sends a signal to a specified process, to all members of a specified process "
5390 "group, or to all processes on the system."
5391 msgstr ""
5392
5393 #. type: TP
5394 #: build/C/man7/signal.7:116
5395 #, no-wrap
5396 msgid "B<killpg>(2)"
5397 msgstr ""
5398
5399 #. type: Plain text
5400 #: build/C/man7/signal.7:119
5401 msgid "Sends a signal to all of the members of a specified process group."
5402 msgstr ""
5403
5404 #. type: TP
5405 #: build/C/man7/signal.7:119
5406 #, no-wrap
5407 msgid "B<pthread_kill>(3)"
5408 msgstr ""
5409
5410 #. type: Plain text
5411 #: build/C/man7/signal.7:123
5412 msgid ""
5413 "Sends a signal to a specified POSIX thread in the same process as the "
5414 "caller."
5415 msgstr ""
5416
5417 #. type: TP
5418 #: build/C/man7/signal.7:123
5419 #, no-wrap
5420 msgid "B<tgkill>(2)"
5421 msgstr ""
5422
5423 #. type: Plain text
5424 #: build/C/man7/signal.7:128
5425 msgid ""
5426 "Sends a signal to a specified thread within a specific process.  (This is "
5427 "the system call used to implement B<pthread_kill>(3).)"
5428 msgstr ""
5429
5430 #. type: Plain text
5431 #: build/C/man7/signal.7:131
5432 msgid "Sends a real-time signal with accompanying data to a specified process."
5433 msgstr ""
5434
5435 #. type: SS
5436 #: build/C/man7/signal.7:131
5437 #, no-wrap
5438 msgid "Waiting for a signal to be caught"
5439 msgstr ""
5440
5441 #. type: Plain text
5442 #: build/C/man7/signal.7:135
5443 msgid ""
5444 "The following system calls suspend execution of the calling process or "
5445 "thread until a signal is caught (or an unhandled signal terminates the "
5446 "process):"
5447 msgstr ""
5448
5449 #. type: TP
5450 #: build/C/man7/signal.7:135
5451 #, no-wrap
5452 msgid "B<pause>(2)"
5453 msgstr ""
5454
5455 #. type: Plain text
5456 #: build/C/man7/signal.7:138
5457 msgid "Suspends execution until any signal is caught."
5458 msgstr ""
5459
5460 #. type: TP
5461 #: build/C/man7/signal.7:138
5462 #, no-wrap
5463 msgid "B<sigsuspend>(2)"
5464 msgstr ""
5465
5466 #. type: Plain text
5467 #: build/C/man7/signal.7:142
5468 msgid ""
5469 "Temporarily changes the signal mask (see below) and suspends execution until "
5470 "one of the unmasked signals is caught."
5471 msgstr ""
5472
5473 #. type: SS
5474 #: build/C/man7/signal.7:142
5475 #, no-wrap
5476 msgid "Synchronously accepting a signal"
5477 msgstr ""
5478
5479 #. type: Plain text
5480 #: build/C/man7/signal.7:149
5481 msgid ""
5482 "Rather than asynchronously catching a signal via a signal handler, it is "
5483 "possible to synchronously accept the signal, that is, to block execution "
5484 "until the signal is delivered, at which point the kernel returns information "
5485 "about the signal to the caller.  There are two general ways to do this:"
5486 msgstr ""
5487
5488 #. type: Plain text
5489 #: build/C/man7/signal.7:157
5490 msgid ""
5491 "B<sigwaitinfo>(2), B<sigtimedwait>(2), and B<sigwait>(3)  suspend execution "
5492 "until one of the signals in a specified set is delivered.  Each of these "
5493 "calls returns information about the delivered signal."
5494 msgstr ""
5495
5496 #. type: Plain text
5497 #: build/C/man7/signal.7:170
5498 msgid ""
5499 "B<signalfd>(2)  returns a file descriptor that can be used to read "
5500 "information about signals that are delivered to the caller.  Each B<read>(2)  "
5501 "from this file descriptor blocks until one of the signals in the set "
5502 "specified in the B<signalfd>(2)  call is delivered to the caller.  The "
5503 "buffer returned by B<read>(2)  contains a structure describing the signal."
5504 msgstr ""
5505
5506 #. type: SS
5507 #: build/C/man7/signal.7:170
5508 #, no-wrap
5509 msgid "Signal mask and pending signals"
5510 msgstr ""
5511
5512 #. type: Plain text
5513 #: build/C/man7/signal.7:177
5514 msgid ""
5515 "A signal may be I<blocked>, which means that it will not be delivered until "
5516 "it is later unblocked.  Between the time when it is generated and when it is "
5517 "delivered a signal is said to be I<pending>."
5518 msgstr ""
5519
5520 #. type: Plain text
5521 #: build/C/man7/signal.7:186
5522 msgid ""
5523 "Each thread in a process has an independent I<signal mask>, which indicates "
5524 "the set of signals that the thread is currently blocking.  A thread can "
5525 "manipulate its signal mask using B<pthread_sigmask>(3).  In a traditional "
5526 "single-threaded application, B<sigprocmask>(2)  can be used to manipulate "
5527 "the signal mask."
5528 msgstr ""
5529
5530 #. type: Plain text
5531 #: build/C/man7/signal.7:192 build/C/man2/sigprocmask.2:123
5532 msgid ""
5533 "A child created via B<fork>(2)  inherits a copy of its parent's signal mask; "
5534 "the signal mask is preserved across B<execve>(2)."
5535 msgstr ""
5536
5537 #. type: Plain text
5538 #: build/C/man7/signal.7:209
5539 msgid ""
5540 "A signal may be generated (and thus pending)  for a process as a whole "
5541 "(e.g., when sent using B<kill>(2))  or for a specific thread (e.g., certain "
5542 "signals, such as B<SIGSEGV> and B<SIGFPE>, generated as a consequence of "
5543 "executing a specific machine-language instruction are thread directed, as "
5544 "are signals targeted at a specific thread using B<pthread_kill>(3)).  A "
5545 "process-directed signal may be delivered to any one of the threads that does "
5546 "not currently have the signal blocked.  If more than one of the threads has "
5547 "the signal unblocked, then the kernel chooses an arbitrary thread to which "
5548 "to deliver the signal."
5549 msgstr ""
5550
5551 #. type: Plain text
5552 #: build/C/man7/signal.7:216
5553 msgid ""
5554 "A thread can obtain the set of signals that it currently has pending using "
5555 "B<sigpending>(2).  This set will consist of the union of the set of pending "
5556 "process-directed signals and the set of signals pending for the calling "
5557 "thread."
5558 msgstr ""
5559
5560 #. type: Plain text
5561 #: build/C/man7/signal.7:222 build/C/man2/sigpending.2:78
5562 msgid ""
5563 "A child created via B<fork>(2)  initially has an empty pending signal set; "
5564 "the pending signal set is preserved across an B<execve>(2)."
5565 msgstr ""
5566
5567 #. type: SS
5568 #: build/C/man7/signal.7:222
5569 #, no-wrap
5570 msgid "Standard signals"
5571 msgstr ""
5572
5573 #. type: Plain text
5574 #: build/C/man7/signal.7:234
5575 msgid ""
5576 "Linux supports the standard signals listed below.  Several signal numbers "
5577 "are architecture-dependent, as indicated in the \"Value\" column.  (Where "
5578 "three values are given, the first one is usually valid for alpha and sparc, "
5579 "the middle one for x86, arm, and most other architectures, and the last one "
5580 "for mips.  (Values for parisc are I<not> shown; see the Linux kernel source "
5581 "for signal numbering on that architecture.)  A - denotes that a signal is "
5582 "absent on the corresponding architecture.)"
5583 msgstr ""
5584
5585 #. type: Plain text
5586 #: build/C/man7/signal.7:236
5587 msgid "First the signals described in the original POSIX.1-1990 standard."
5588 msgstr ""
5589
5590 #. type: tbl table
5591 #: build/C/man7/signal.7:240 build/C/man7/signal.7:276 build/C/man7/signal.7:305
5592 #, no-wrap
5593 msgid "Signal\tValue\tAction\tComment\n"
5594 msgstr ""
5595
5596 #. type: tbl table
5597 #: build/C/man7/signal.7:241
5598 #, no-wrap
5599 msgid "SIGHUP\t\\01\tTerm\tHangup detected on controlling terminal\n"
5600 msgstr ""
5601
5602 #. type: tbl table
5603 #: build/C/man7/signal.7:242
5604 #, no-wrap
5605 msgid "\t\t\tor death of controlling process\n"
5606 msgstr ""
5607
5608 #. type: tbl table
5609 #: build/C/man7/signal.7:243
5610 #, no-wrap
5611 msgid "SIGINT\t\\02\tTerm\tInterrupt from keyboard\n"
5612 msgstr ""
5613
5614 #. type: tbl table
5615 #: build/C/man7/signal.7:244
5616 #, no-wrap
5617 msgid "SIGQUIT\t\\03\tCore\tQuit from keyboard\n"
5618 msgstr ""
5619
5620 #. type: tbl table
5621 #: build/C/man7/signal.7:245
5622 #, no-wrap
5623 msgid "SIGILL\t\\04\tCore\tIllegal Instruction\n"
5624 msgstr ""
5625
5626 #. type: tbl table
5627 #: build/C/man7/signal.7:246
5628 #, no-wrap
5629 msgid "SIGABRT\t\\06\tCore\tAbort signal from B<abort>(3)\n"
5630 msgstr ""
5631
5632 #. type: tbl table
5633 #: build/C/man7/signal.7:247
5634 #, no-wrap
5635 msgid "SIGFPE\t\\08\tCore\tFloating point exception\n"
5636 msgstr ""
5637
5638 #. type: tbl table
5639 #: build/C/man7/signal.7:248
5640 #, no-wrap
5641 msgid "SIGKILL\t\\09\tTerm\tKill signal\n"
5642 msgstr ""
5643
5644 #. type: tbl table
5645 #: build/C/man7/signal.7:249
5646 #, no-wrap
5647 msgid "SIGSEGV\t11\tCore\tInvalid memory reference\n"
5648 msgstr ""
5649
5650 #. type: tbl table
5651 #: build/C/man7/signal.7:250
5652 #, no-wrap
5653 msgid "SIGPIPE\t13\tTerm\tBroken pipe: write to pipe with no\n"
5654 msgstr ""
5655
5656 #. type: tbl table
5657 #: build/C/man7/signal.7:251
5658 #, no-wrap
5659 msgid "\t\t\treaders\n"
5660 msgstr ""
5661
5662 #. type: tbl table
5663 #: build/C/man7/signal.7:252
5664 #, no-wrap
5665 msgid "SIGALRM\t14\tTerm\tTimer signal from B<alarm>(2)\n"
5666 msgstr ""
5667
5668 #. type: tbl table
5669 #: build/C/man7/signal.7:253
5670 #, no-wrap
5671 msgid "SIGTERM\t15\tTerm\tTermination signal\n"
5672 msgstr ""
5673
5674 #. type: tbl table
5675 #: build/C/man7/signal.7:254
5676 #, no-wrap
5677 msgid "SIGUSR1\t30,10,16\tTerm\tUser-defined signal 1\n"
5678 msgstr ""
5679
5680 #. type: tbl table
5681 #: build/C/man7/signal.7:255
5682 #, no-wrap
5683 msgid "SIGUSR2\t31,12,17\tTerm\tUser-defined signal 2\n"
5684 msgstr ""
5685
5686 #. type: tbl table
5687 #: build/C/man7/signal.7:256
5688 #, no-wrap
5689 msgid "SIGCHLD\t20,17,18\tIgn\tChild stopped or terminated\n"
5690 msgstr ""
5691
5692 #. type: tbl table
5693 #: build/C/man7/signal.7:257
5694 #, no-wrap
5695 msgid "SIGCONT\t19,18,25\tCont\tContinue if stopped\n"
5696 msgstr ""
5697
5698 #. type: tbl table
5699 #: build/C/man7/signal.7:258
5700 #, no-wrap
5701 msgid "SIGSTOP\t17,19,23\tStop\tStop process\n"
5702 msgstr ""
5703
5704 #. type: tbl table
5705 #: build/C/man7/signal.7:259
5706 #, no-wrap
5707 msgid "SIGTSTP\t18,20,24\tStop\tStop typed at terminal\n"
5708 msgstr ""
5709
5710 #. type: tbl table
5711 #: build/C/man7/signal.7:260
5712 #, no-wrap
5713 msgid "SIGTTIN\t21,21,26\tStop\tTerminal input for background process\n"
5714 msgstr ""
5715
5716 #. type: tbl table
5717 #: build/C/man7/signal.7:261
5718 #, no-wrap
5719 msgid "SIGTTOU\t22,22,27\tStop\tTerminal output for background process\n"
5720 msgstr ""
5721
5722 #. type: Plain text
5723 #: build/C/man7/signal.7:269
5724 msgid "The signals B<SIGKILL> and B<SIGSTOP> cannot be caught, blocked, or ignored."
5725 msgstr ""
5726
5727 #. type: Plain text
5728 #: build/C/man7/signal.7:272
5729 msgid ""
5730 "Next the signals not in the POSIX.1-1990 standard but described in SUSv2 and "
5731 "POSIX.1-2001."
5732 msgstr ""
5733
5734 #. type: tbl table
5735 #: build/C/man7/signal.7:277
5736 #, no-wrap
5737 msgid "SIGBUS\t10,7,10\tCore\tBus error (bad memory access)\n"
5738 msgstr ""
5739
5740 #. type: tbl table
5741 #: build/C/man7/signal.7:278
5742 #, no-wrap
5743 msgid "SIGPOLL\t\tTerm\tPollable event (Sys V).\n"
5744 msgstr ""
5745
5746 #. type: tbl table
5747 #: build/C/man7/signal.7:279
5748 #, no-wrap
5749 msgid "\t\t\tSynonym for B<SIGIO>\n"
5750 msgstr ""
5751
5752 #. type: tbl table
5753 #: build/C/man7/signal.7:280
5754 #, no-wrap
5755 msgid "SIGPROF\t27,27,29\tTerm\tProfiling timer expired\n"
5756 msgstr ""
5757
5758 #. type: tbl table
5759 #: build/C/man7/signal.7:281
5760 #, no-wrap
5761 msgid "SIGSYS\t12,31,12\tCore\tBad argument to routine (SVr4)\n"
5762 msgstr ""
5763
5764 #. type: tbl table
5765 #: build/C/man7/signal.7:282
5766 #, no-wrap
5767 msgid "SIGTRAP\t5\tCore\tTrace/breakpoint trap\n"
5768 msgstr ""
5769
5770 #. type: tbl table
5771 #: build/C/man7/signal.7:283
5772 #, no-wrap
5773 msgid "SIGURG\t16,23,21\tIgn\tUrgent condition on socket (4.2BSD)\n"
5774 msgstr ""
5775
5776 #. type: tbl table
5777 #: build/C/man7/signal.7:284
5778 #, no-wrap
5779 msgid "SIGVTALRM\t26,26,28\tTerm\tVirtual alarm clock (4.2BSD)\n"
5780 msgstr ""
5781
5782 #. type: tbl table
5783 #: build/C/man7/signal.7:285
5784 #, no-wrap
5785 msgid "SIGXCPU\t24,24,30\tCore\tCPU time limit exceeded (4.2BSD)\n"
5786 msgstr ""
5787
5788 #. type: tbl table
5789 #: build/C/man7/signal.7:286
5790 #, no-wrap
5791 msgid "SIGXFSZ\t25,25,31\tCore\tFile size limit exceeded (4.2BSD)\n"
5792 msgstr ""
5793
5794 #. type: Plain text
5795 #: build/C/man7/signal.7:299
5796 msgid ""
5797 "Up to and including Linux 2.2, the default behavior for B<SIGSYS>, "
5798 "B<SIGXCPU>, B<SIGXFSZ>, and (on architectures other than SPARC and MIPS)  "
5799 "B<SIGBUS> was to terminate the process (without a core dump).  (On some "
5800 "other UNIX systems the default action for B<SIGXCPU> and B<SIGXFSZ> is to "
5801 "terminate the process without a core dump.)  Linux 2.4 conforms to the "
5802 "POSIX.1-2001 requirements for these signals, terminating the process with a "
5803 "core dump."
5804 msgstr ""
5805
5806 #. type: Plain text
5807 #: build/C/man7/signal.7:301
5808 msgid "Next various other signals."
5809 msgstr ""
5810
5811 #. type: tbl table
5812 #: build/C/man7/signal.7:306
5813 #, no-wrap
5814 msgid "SIGIOT\t6\tCore\tIOT trap. A synonym for B<SIGABRT>\n"
5815 msgstr ""
5816
5817 #. type: tbl table
5818 #: build/C/man7/signal.7:307
5819 #, no-wrap
5820 msgid "SIGEMT\t7,-,7\tTerm\n"
5821 msgstr ""
5822
5823 #. type: tbl table
5824 #: build/C/man7/signal.7:308
5825 #, no-wrap
5826 msgid "SIGSTKFLT\t-,16,-\tTerm\tStack fault on coprocessor (unused)\n"
5827 msgstr ""
5828
5829 #. type: tbl table
5830 #: build/C/man7/signal.7:309
5831 #, no-wrap
5832 msgid "SIGIO\t23,29,22\tTerm\tI/O now possible (4.2BSD)\n"
5833 msgstr ""
5834
5835 #. type: tbl table
5836 #: build/C/man7/signal.7:310
5837 #, no-wrap
5838 msgid "SIGCLD\t-,-,18\tIgn\tA synonym for B<SIGCHLD>\n"
5839 msgstr ""
5840
5841 #. type: tbl table
5842 #: build/C/man7/signal.7:311
5843 #, no-wrap
5844 msgid "SIGPWR\t29,30,19\tTerm\tPower failure (System V)\n"
5845 msgstr ""
5846
5847 #. type: tbl table
5848 #: build/C/man7/signal.7:312
5849 #, no-wrap
5850 msgid "SIGINFO\t29,-,-\t\tA synonym for B<SIGPWR>\n"
5851 msgstr ""
5852
5853 #. type: tbl table
5854 #: build/C/man7/signal.7:313
5855 #, no-wrap
5856 msgid "SIGLOST\t-,-,-\tTerm\tFile lock lost (unused)\n"
5857 msgstr ""
5858
5859 #. type: tbl table
5860 #: build/C/man7/signal.7:314
5861 #, no-wrap
5862 msgid "SIGWINCH\t28,28,20\tIgn\tWindow resize signal (4.3BSD, Sun)\n"
5863 msgstr ""
5864
5865 #. type: tbl table
5866 #: build/C/man7/signal.7:315
5867 #, no-wrap
5868 msgid "SIGUNUSED\t-,31,-\tCore\tSynonymous with B<SIGSYS>\n"
5869 msgstr ""
5870
5871 #. type: Plain text
5872 #: build/C/man7/signal.7:325
5873 msgid "(Signal 29 is B<SIGINFO> / B<SIGPWR> on an alpha but B<SIGLOST> on a sparc.)"
5874 msgstr ""
5875
5876 #. type: Plain text
5877 #: build/C/man7/signal.7:331
5878 msgid ""
5879 "B<SIGEMT> is not specified in POSIX.1-2001, but nevertheless appears on most "
5880 "other UNIX systems, where its default action is typically to terminate the "
5881 "process with a core dump."
5882 msgstr ""
5883
5884 #. type: Plain text
5885 #: build/C/man7/signal.7:335
5886 msgid ""
5887 "B<SIGPWR> (which is not specified in POSIX.1-2001) is typically ignored by "
5888 "default on those other UNIX systems where it appears."
5889 msgstr ""
5890
5891 #. type: Plain text
5892 #: build/C/man7/signal.7:339
5893 msgid ""
5894 "B<SIGIO> (which is not specified in POSIX.1-2001) is ignored by default on "
5895 "several other UNIX systems."
5896 msgstr ""
5897
5898 #.  parisc is the only exception: SIGSYS is 12, SIGUNUSED is 31
5899 #. type: Plain text
5900 #: build/C/man7/signal.7:346
5901 msgid ""
5902 "Where defined, B<SIGUNUSED> is synonymous with B<SIGSYS> on most "
5903 "architectures."
5904 msgstr ""
5905
5906 #. type: SS
5907 #: build/C/man7/signal.7:346
5908 #, no-wrap
5909 msgid "Real-time signals"
5910 msgstr ""
5911
5912 #. type: Plain text
5913 #: build/C/man7/signal.7:356
5914 msgid ""
5915 "Linux supports real-time signals as originally defined in the POSIX.1b "
5916 "real-time extensions (and now included in POSIX.1-2001).  The range of "
5917 "supported real-time signals is defined by the macros B<SIGRTMIN> and "
5918 "B<SIGRTMAX>.  POSIX.1-2001 requires that an implementation support at least "
5919 "B<_POSIX_RTSIG_MAX> (8) real-time signals."
5920 msgstr ""
5921
5922 #. type: Plain text
5923 #: build/C/man7/signal.7:378
5924 msgid ""
5925 "The Linux kernel supports a range of 32 different real-time signals, "
5926 "numbered 33 to 64.  However, the glibc POSIX threads implementation "
5927 "internally uses two (for NPTL) or three (for LinuxThreads) real-time signals "
5928 "(see B<pthreads>(7)), and adjusts the value of B<SIGRTMIN> suitably (to 34 "
5929 "or 35).  Because the range of available real-time signals varies according "
5930 "to the glibc threading implementation (and this variation can occur at run "
5931 "time according to the available kernel and glibc), and indeed the range of "
5932 "real-time signals varies across UNIX systems, programs should I<never refer "
5933 "to real-time signals using hard-coded numbers>, but instead should always "
5934 "refer to real-time signals using the notation B<SIGRTMIN>+n, and include "
5935 "suitable (run-time) checks that B<SIGRTMIN>+n does not exceed B<SIGRTMAX>."
5936 msgstr ""
5937
5938 #. type: Plain text
5939 #: build/C/man7/signal.7:382
5940 msgid ""
5941 "Unlike standard signals, real-time signals have no predefined meanings: the "
5942 "entire set of real-time signals can be used for application-defined "
5943 "purposes."
5944 msgstr ""
5945
5946 #. type: Plain text
5947 #: build/C/man7/signal.7:385
5948 msgid ""
5949 "The default action for an unhandled real-time signal is to terminate the "
5950 "receiving process."
5951 msgstr ""
5952
5953 #. type: Plain text
5954 #: build/C/man7/signal.7:387
5955 msgid "Real-time signals are distinguished by the following:"
5956 msgstr ""
5957
5958 #. type: Plain text
5959 #: build/C/man7/signal.7:391
5960 msgid ""
5961 "Multiple instances of real-time signals can be queued.  By contrast, if "
5962 "multiple instances of a standard signal are delivered while that signal is "
5963 "currently blocked, then only one instance is queued."
5964 msgstr ""
5965
5966 #. type: Plain text
5967 #: build/C/man7/signal.7:411
5968 msgid ""
5969 "If the signal is sent using B<sigqueue>(3), an accompanying value (either an "
5970 "integer or a pointer) can be sent with the signal.  If the receiving process "
5971 "establishes a handler for this signal using the B<SA_SIGINFO> flag to "
5972 "B<sigaction>(2)  then it can obtain this data via the I<si_value> field of "
5973 "the I<siginfo_t> structure passed as the second argument to the handler.  "
5974 "Furthermore, the I<si_pid> and I<si_uid> fields of this structure can be "
5975 "used to obtain the PID and real user ID of the process sending the signal."
5976 msgstr ""
5977
5978 #. type: Plain text
5979 #: build/C/man7/signal.7:420
5980 msgid ""
5981 "Real-time signals are delivered in a guaranteed order.  Multiple real-time "
5982 "signals of the same type are delivered in the order they were sent.  If "
5983 "different real-time signals are sent to a process, they are delivered "
5984 "starting with the lowest-numbered signal.  (I.e., low-numbered signals have "
5985 "highest priority.)  By contrast, if multiple standard signals are pending "
5986 "for a process, the order in which they are delivered is unspecified."
5987 msgstr ""
5988
5989 #. type: Plain text
5990 #: build/C/man7/signal.7:425
5991 msgid ""
5992 "If both standard and real-time signals are pending for a process, POSIX "
5993 "leaves it unspecified which is delivered first.  Linux, like many other "
5994 "implementations, gives priority to standard signals in this case."
5995 msgstr ""
5996
5997 #. type: Plain text
5998 #: build/C/man7/signal.7:448
5999 msgid ""
6000 "According to POSIX, an implementation should permit at least "
6001 "B<_POSIX_SIGQUEUE_MAX> (32) real-time signals to be queued to a process.  "
6002 "However, Linux does things differently.  In kernels up to and including "
6003 "2.6.7, Linux imposes a system-wide limit on the number of queued real-time "
6004 "signals for all processes.  This limit can be viewed and (with privilege) "
6005 "changed via the I</proc/sys/kernel/rtsig-max> file.  A related file, "
6006 "I</proc/sys/kernel/rtsig-nr>, can be used to find out how many real-time "
6007 "signals are currently queued.  In Linux 2.6.8, these I</proc> interfaces "
6008 "were replaced by the B<RLIMIT_SIGPENDING> resource limit, which specifies a "
6009 "per-user limit for queued signals; see B<setrlimit>(2)  for further details."
6010 msgstr ""
6011
6012 #. type: SS
6013 #: build/C/man7/signal.7:448
6014 #, no-wrap
6015 msgid "Async-signal-safe functions"
6016 msgstr ""
6017
6018 #. type: Plain text
6019 #: build/C/man7/signal.7:457
6020 msgid ""
6021 "A signal handler function must be very careful, since processing elsewhere "
6022 "may be interrupted at some arbitrary point in the execution of the program.  "
6023 "POSIX has the concept of \"safe function\".  If a signal interrupts the "
6024 "execution of an unsafe function, and I<handler> calls an unsafe function, "
6025 "then the behavior of the program is undefined."
6026 msgstr ""
6027
6028 #. type: Plain text
6029 #: build/C/man7/signal.7:461
6030 msgid ""
6031 "POSIX.1-2004 (also known as POSIX.1-2001 Technical Corrigendum 2)  requires "
6032 "an implementation to guarantee that the following functions can be safely "
6033 "called inside a signal handler:"
6034 msgstr ""
6035
6036 #. type: Plain text
6037 #: build/C/man7/signal.7:582
6038 #, no-wrap
6039 msgid ""
6040 "_Exit()\n"
6041 "_exit()\n"
6042 "abort()\n"
6043 "accept()\n"
6044 "access()\n"
6045 "aio_error()\n"
6046 "aio_return()\n"
6047 "aio_suspend()\n"
6048 "alarm()\n"
6049 "bind()\n"
6050 "cfgetispeed()\n"
6051 "cfgetospeed()\n"
6052 "cfsetispeed()\n"
6053 "cfsetospeed()\n"
6054 "chdir()\n"
6055 "chmod()\n"
6056 "chown()\n"
6057 "clock_gettime()\n"
6058 "close()\n"
6059 "connect()\n"
6060 "creat()\n"
6061 "dup()\n"
6062 "dup2()\n"
6063 "execle()\n"
6064 "execve()\n"
6065 "fchmod()\n"
6066 "fchown()\n"
6067 "fcntl()\n"
6068 "fdatasync()\n"
6069 "fork()\n"
6070 "fpathconf()\n"
6071 "fstat()\n"
6072 "fsync()\n"
6073 "ftruncate()\n"
6074 "getegid()\n"
6075 "geteuid()\n"
6076 "getgid()\n"
6077 "getgroups()\n"
6078 "getpeername()\n"
6079 "getpgrp()\n"
6080 "getpid()\n"
6081 "getppid()\n"
6082 "getsockname()\n"
6083 "getsockopt()\n"
6084 "getuid()\n"
6085 "kill()\n"
6086 "link()\n"
6087 "listen()\n"
6088 "lseek()\n"
6089 "lstat()\n"
6090 "mkdir()\n"
6091 "mkfifo()\n"
6092 "open()\n"
6093 "pathconf()\n"
6094 "pause()\n"
6095 "pipe()\n"
6096 "poll()\n"
6097 "posix_trace_event()\n"
6098 "pselect()\n"
6099 "raise()\n"
6100 "read()\n"
6101 "readlink()\n"
6102 "recv()\n"
6103 "recvfrom()\n"
6104 "recvmsg()\n"
6105 "rename()\n"
6106 "rmdir()\n"
6107 "select()\n"
6108 "sem_post()\n"
6109 "send()\n"
6110 "sendmsg()\n"
6111 "sendto()\n"
6112 "setgid()\n"
6113 "setpgid()\n"
6114 "setsid()\n"
6115 "setsockopt()\n"
6116 "setuid()\n"
6117 "shutdown()\n"
6118 "sigaction()\n"
6119 "sigaddset()\n"
6120 "sigdelset()\n"
6121 "sigemptyset()\n"
6122 "sigfillset()\n"
6123 "sigismember()\n"
6124 "signal()\n"
6125 "sigpause()\n"
6126 "sigpending()\n"
6127 "sigprocmask()\n"
6128 "sigqueue()\n"
6129 "sigset()\n"
6130 "sigsuspend()\n"
6131 "sleep()\n"
6132 "sockatmark()\n"
6133 "socket()\n"
6134 "socketpair()\n"
6135 "stat()\n"
6136 "symlink()\n"
6137 "sysconf()\n"
6138 "tcdrain()\n"
6139 "tcflow()\n"
6140 "tcflush()\n"
6141 "tcgetattr()\n"
6142 "tcgetpgrp()\n"
6143 "tcsendbreak()\n"
6144 "tcsetattr()\n"
6145 "tcsetpgrp()\n"
6146 "time()\n"
6147 "timer_getoverrun()\n"
6148 "timer_gettime()\n"
6149 "timer_settime()\n"
6150 "times()\n"
6151 "umask()\n"
6152 "uname()\n"
6153 "unlink()\n"
6154 "utime()\n"
6155 "wait()\n"
6156 "waitpid()\n"
6157 "write()\n"
6158 msgstr ""
6159
6160 #. type: Plain text
6161 #: build/C/man7/signal.7:587
6162 msgid ""
6163 "POSIX.1-2008 removes fpathconf(), pathconf(), and sysconf()  from the above "
6164 "list, and adds the following functions:"
6165 msgstr ""
6166
6167 #. type: Plain text
6168 #: build/C/man7/signal.7:610
6169 #, no-wrap
6170 msgid ""
6171 "execl()\n"
6172 "execv()\n"
6173 "faccessat()\n"
6174 "fchmodat()\n"
6175 "fchownat()\n"
6176 "fexecve()\n"
6177 "fstatat()\n"
6178 "futimens()\n"
6179 "linkat()\n"
6180 "mkdirat()\n"
6181 "mkfifoat()\n"
6182 "mknod()\n"
6183 "mknodat()\n"
6184 "openat()\n"
6185 "readlinkat()\n"
6186 "renameat()\n"
6187 "symlinkat()\n"
6188 "unlinkat()\n"
6189 "utimensat()\n"
6190 "utimes()\n"
6191 msgstr ""
6192
6193 #. type: SS
6194 #: build/C/man7/signal.7:612
6195 #, no-wrap
6196 msgid "Interruption of system calls and library functions by signal handlers"
6197 msgstr ""
6198
6199 #. type: Plain text
6200 #: build/C/man7/signal.7:615
6201 msgid ""
6202 "If a signal handler is invoked while a system call or library function call "
6203 "is blocked, then either:"
6204 msgstr ""
6205
6206 #. type: Plain text
6207 #: build/C/man7/signal.7:617
6208 msgid "the call is automatically restarted after the signal handler returns; or"
6209 msgstr ""
6210
6211 #. type: Plain text
6212 #: build/C/man7/signal.7:620
6213 msgid "the call fails with the error B<EINTR>."
6214 msgstr ""
6215
6216 #. type: Plain text
6217 #: build/C/man7/signal.7:628
6218 msgid ""
6219 "Which of these two behaviors occurs depends on the interface and whether or "
6220 "not the signal handler was established using the B<SA_RESTART> flag (see "
6221 "B<sigaction>(2)).  The details vary across UNIX systems; below, the details "
6222 "for Linux."
6223 msgstr ""
6224
6225 #.  The following system calls use ERESTARTSYS,
6226 #.  so that they are restartable
6227 #. type: Plain text
6228 #: build/C/man7/signal.7:637
6229 msgid ""
6230 "If a blocked call to one of the following interfaces is interrupted by a "
6231 "signal handler, then the call will be automatically restarted after the "
6232 "signal handler returns if the B<SA_RESTART> flag was used; otherwise the "
6233 "call will fail with the error B<EINTR>:"
6234 msgstr ""
6235
6236 #. type: Plain text
6237 #: build/C/man7/signal.7:653
6238 msgid ""
6239 "B<read>(2), B<readv>(2), B<write>(2), B<writev>(2), and B<ioctl>(2)  calls "
6240 "on \"slow\" devices.  A \"slow\" device is one where the I/O call may block "
6241 "for an indefinite time, for example, a terminal, pipe, or socket.  (A disk "
6242 "is not a slow device according to this definition.)  If an I/O call on a "
6243 "slow device has already transferred some data by the time it is interrupted "
6244 "by a signal handler, then the call will return a success status (normally, "
6245 "the number of bytes transferred)."
6246 msgstr ""
6247
6248 #. type: Plain text
6249 #: build/C/man7/signal.7:657
6250 msgid "B<open>(2), if it can block (e.g., when opening a FIFO; see B<fifo>(7))."
6251 msgstr ""
6252
6253 #. type: Plain text
6254 #: build/C/man7/signal.7:664
6255 msgid "B<wait>(2), B<wait3>(2), B<wait4>(2), B<waitid>(2), and B<waitpid>(2)."
6256 msgstr ""
6257
6258 #.  If a timeout (setsockopt()) is in effect on the socket, then these
6259 #.  system calls switch to using EINTR.  Consequently, they and are not
6260 #.  automatically restarted, and they show the stop/cont behavior
6261 #.  described below.  (Verified from 2.6.26 source, and by experiment; mtk)
6262 #. type: Plain text
6263 #: build/C/man7/signal.7:680
6264 msgid ""
6265 "Socket interfaces: B<accept>(2), B<connect>(2), B<recv>(2), B<recvfrom>(2), "
6266 "B<recvmsg>(2), B<send>(2), B<sendto>(2), and B<sendmsg>(2), unless a timeout "
6267 "has been set on the socket (see below)."
6268 msgstr ""
6269
6270 #. type: Plain text
6271 #: build/C/man7/signal.7:686
6272 msgid "File locking interfaces: B<flock>(2)  and B<fcntl>(2)  B<F_SETLKW>."
6273 msgstr ""
6274
6275 #. type: Plain text
6276 #: build/C/man7/signal.7:693
6277 msgid ""
6278 "POSIX message queue interfaces: B<mq_receive>(3), B<mq_timedreceive>(3), "
6279 "B<mq_send>(3), and B<mq_timedsend>(3)."
6280 msgstr ""
6281
6282 #. type: Plain text
6283 #: build/C/man7/signal.7:698
6284 msgid ""
6285 "B<futex>(2)  B<FUTEX_WAIT> (since Linux 2.6.22; beforehand, always failed "
6286 "with B<EINTR>)."
6287 msgstr ""
6288
6289 #. type: Plain text
6290 #: build/C/man7/signal.7:705
6291 msgid ""
6292 "POSIX semaphore interfaces: B<sem_wait>(3)  and B<sem_timedwait>(3)  (since "
6293 "Linux 2.6.22; beforehand, always failed with B<EINTR>)."
6294 msgstr ""
6295
6296 #.  These are the system calls that give EINTR or ERESTARTNOHAND
6297 #.  on interruption by a signal handler.
6298 #. type: Plain text
6299 #: build/C/man7/signal.7:716
6300 msgid ""
6301 "The following interfaces are never restarted after being interrupted by a "
6302 "signal handler, regardless of the use of B<SA_RESTART>; they always fail "
6303 "with the error B<EINTR> when interrupted by a signal handler:"
6304 msgstr ""
6305
6306 #. type: Plain text
6307 #: build/C/man7/signal.7:736 build/C/man7/signal.7:810
6308 msgid ""
6309 "Socket interfaces, when a timeout has been set on the socket using "
6310 "B<setsockopt>(2): B<accept>(2), B<recv>(2), B<recvfrom>(2), and "
6311 "B<recvmsg>(2), if a receive timeout (B<SO_RCVTIMEO>)  has been set; "
6312 "B<connect>(2), B<send>(2), B<sendto>(2), and B<sendmsg>(2), if a send "
6313 "timeout (B<SO_SNDTIMEO>)  has been set."
6314 msgstr ""
6315
6316 #. type: Plain text
6317 #: build/C/man7/signal.7:743
6318 msgid ""
6319 "Interfaces used to wait for signals: B<pause>(2), B<sigsuspend>(2), "
6320 "B<sigtimedwait>(2), and B<sigwaitinfo>(2)."
6321 msgstr ""
6322
6323 #. type: Plain text
6324 #: build/C/man7/signal.7:752
6325 msgid ""
6326 "File descriptor multiplexing interfaces: B<epoll_wait>(2), "
6327 "B<epoll_pwait>(2), B<poll>(2), B<ppoll>(2), B<select>(2), and B<pselect>(2)."
6328 msgstr ""
6329
6330 #.  On some other systems, SA_RESTART does restart these system calls
6331 #. type: Plain text
6332 #: build/C/man7/signal.7:760
6333 msgid ""
6334 "System V IPC interfaces: B<msgrcv>(2), B<msgsnd>(2), B<semop>(2), and "
6335 "B<semtimedop>(2)."
6336 msgstr ""
6337
6338 #. type: Plain text
6339 #: build/C/man7/signal.7:766
6340 msgid "Sleep interfaces: B<clock_nanosleep>(2), B<nanosleep>(2), and B<usleep>(3)."
6341 msgstr ""
6342
6343 #. type: Plain text
6344 #: build/C/man7/signal.7:771 build/C/man7/signal.7:824
6345 msgid "B<read>(2)  from an B<inotify>(7)  file descriptor."
6346 msgstr ""
6347
6348 #. type: Plain text
6349 #: build/C/man7/signal.7:773
6350 msgid "B<io_getevents>(2)."
6351 msgstr ""
6352
6353 #. type: Plain text
6354 #: build/C/man7/signal.7:779
6355 msgid ""
6356 "The B<sleep>(3)  function is also never restarted if interrupted by a "
6357 "handler, but gives a success return: the number of seconds remaining to "
6358 "sleep."
6359 msgstr ""
6360
6361 #. type: SS
6362 #: build/C/man7/signal.7:779
6363 #, no-wrap
6364 msgid "Interruption of system calls and library functions by stop signals"
6365 msgstr ""
6366
6367 #. type: Plain text
6368 #: build/C/man7/signal.7:788
6369 msgid ""
6370 "On Linux, even in the absence of signal handlers, certain blocking "
6371 "interfaces can fail with the error B<EINTR> after the process is stopped by "
6372 "one of the stop signals and then resumed via B<SIGCONT>.  This behavior is "
6373 "not sanctioned by POSIX.1, and doesn't occur on other systems."
6374 msgstr ""
6375
6376 #. type: Plain text
6377 #: build/C/man7/signal.7:790
6378 msgid "The Linux interfaces that display this behavior are:"
6379 msgstr ""
6380
6381 #. type: Plain text
6382 #: build/C/man7/signal.7:813
6383 msgid "B<epoll_wait>(2), B<epoll_pwait>(2)."
6384 msgstr ""
6385
6386 #. type: Plain text
6387 #: build/C/man7/signal.7:816
6388 msgid "B<semop>(2), B<semtimedop>(2)."
6389 msgstr ""
6390
6391 #. type: Plain text
6392 #: build/C/man7/signal.7:819
6393 msgid "B<sigtimedwait>(2), B<sigwaitinfo>(2)."
6394 msgstr ""
6395
6396 #. type: Plain text
6397 #: build/C/man7/signal.7:830
6398 msgid ""
6399 "Linux 2.6.21 and earlier: B<futex>(2)  B<FUTEX_WAIT>, B<sem_timedwait>(3), "
6400 "B<sem_wait>(3)."
6401 msgstr ""
6402
6403 #. type: Plain text
6404 #: build/C/man7/signal.7:834
6405 msgid "Linux 2.6.8 and earlier: B<msgrcv>(2), B<msgsnd>(2)."
6406 msgstr ""
6407
6408 #. type: Plain text
6409 #: build/C/man7/signal.7:837
6410 msgid "Linux 2.4 and earlier: B<nanosleep>(2)."
6411 msgstr ""
6412
6413 #.  It must be a *very* long time since this was true:
6414 #.  .SH BUGS
6415 #.  .B SIGIO
6416 #.  and
6417 #.  .B SIGLOST
6418 #.  have the same value.
6419 #.  The latter is commented out in the kernel source, but
6420 #.  the build process of some software still thinks that
6421 #.  signal 29 is
6422 #.  .BR SIGLOST .
6423 #. type: Plain text
6424 #: build/C/man7/signal.7:850
6425 msgid "POSIX.1, except as noted."
6426 msgstr ""
6427
6428 #. type: Plain text
6429 #: build/C/man7/signal.7:883
6430 msgid ""
6431 "B<kill>(1), B<getrlimit>(2), B<kill>(2), B<killpg>(2), "
6432 "B<rt_sigqueueinfo>(2), B<setitimer>(2), B<setrlimit>(2), B<sgetmask>(2), "
6433 "B<sigaction>(2), B<sigaltstack>(2), B<signal>(2), B<signalfd>(2), "
6434 "B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2), B<sigwaitinfo>(2), "
6435 "B<abort>(3), B<bsd_signal>(3), B<longjmp>(3), B<raise>(3), "
6436 "B<pthread_sigqueue>(3), B<sigqueue>(3), B<sigset>(3), B<sigsetops>(3), "
6437 "B<sigvec>(3), B<sigwait>(3), B<strsignal>(3), B<sysv_signal>(3), B<core>(5), "
6438 "B<proc>(5), B<pthreads>(7), B<sigevent>(7)"
6439 msgstr ""
6440
6441 #. type: TH
6442 #: build/C/man2/signalfd.2:20
6443 #, no-wrap
6444 msgid "SIGNALFD"
6445 msgstr ""
6446
6447 #. type: TH
6448 #: build/C/man2/signalfd.2:20
6449 #, no-wrap
6450 msgid "2009-01-13"
6451 msgstr ""
6452
6453 #. type: Plain text
6454 #: build/C/man2/signalfd.2:23
6455 msgid "signalfd - create a file descriptor for accepting signals"
6456 msgstr ""
6457
6458 #. type: Plain text
6459 #: build/C/man2/signalfd.2:25
6460 msgid "B<#include E<lt>sys/signalfd.hE<gt>>"
6461 msgstr ""
6462
6463 #. type: Plain text
6464 #: build/C/man2/signalfd.2:27
6465 msgid "B<int signalfd(int >I<fd>B<, const sigset_t *>I<mask>B<, int >I<flags>B<);>"
6466 msgstr ""
6467
6468 #. type: Plain text
6469 #: build/C/man2/signalfd.2:38
6470 msgid ""
6471 "B<signalfd>()  creates a file descriptor that can be used to accept signals "
6472 "targeted at the caller.  This provides an alternative to the use of a signal "
6473 "handler or B<sigwaitinfo>(2), and has the advantage that the file descriptor "
6474 "may be monitored by B<select>(2), B<poll>(2), and B<epoll>(7)."
6475 msgstr ""
6476
6477 #. type: Plain text
6478 #: build/C/man2/signalfd.2:58
6479 msgid ""
6480 "The I<mask> argument specifies the set of signals that the caller wishes to "
6481 "accept via the file descriptor.  This argument is a signal set whose "
6482 "contents can be initialized using the macros described in B<sigsetops>(3).  "
6483 "Normally, the set of signals to be received via the file descriptor should "
6484 "be blocked using B<sigprocmask>(2), to prevent the signals being handled "
6485 "according to their default dispositions.  It is not possible to receive "
6486 "B<SIGKILL> or B<SIGSTOP> signals via a signalfd file descriptor; these "
6487 "signals are silently ignored if specified in I<mask>."
6488 msgstr ""
6489
6490 #. type: Plain text
6491 #: build/C/man2/signalfd.2:72
6492 msgid ""
6493 "If the I<fd> argument is -1, then the call creates a new file descriptor and "
6494 "associates the signal set specified in I<mask> with that descriptor.  If "
6495 "I<fd> is not -1, then it must specify a valid existing signalfd file "
6496 "descriptor, and I<mask> is used to replace the signal set associated with "
6497 "that descriptor."
6498 msgstr ""
6499
6500 #. type: Plain text
6501 #: build/C/man2/signalfd.2:77
6502 msgid ""
6503 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
6504 "I<flags> to change the behaviour of B<signalfd>():"
6505 msgstr ""
6506
6507 #. type: TP
6508 #: build/C/man2/signalfd.2:77
6509 #, no-wrap
6510 msgid "B<SFD_NONBLOCK>"
6511 msgstr ""
6512
6513 #. type: TP
6514 #: build/C/man2/signalfd.2:85
6515 #, no-wrap
6516 msgid "B<SFD_CLOEXEC>"
6517 msgstr ""
6518
6519 #. type: Plain text
6520 #: build/C/man2/signalfd.2:102
6521 msgid ""
6522 "B<signalfd>()  returns a file descriptor that supports the following "
6523 "operations:"
6524 msgstr ""
6525
6526 #. type: Plain text
6527 #: build/C/man2/signalfd.2:121
6528 msgid ""
6529 "If one or more of the signals specified in I<mask> is pending for the "
6530 "process, then the buffer supplied to B<read>(2)  is used to return one or "
6531 "more I<signalfd_siginfo> structures (see below) that describe the signals.  "
6532 "The B<read>(2)  returns information for as many signals as are pending and "
6533 "will fit in the supplied buffer.  The buffer must be at least "
6534 "I<sizeof(struct signalfd_siginfo)> bytes.  The return value of the "
6535 "B<read>(2)  is the total number of bytes read."
6536 msgstr ""
6537
6538 #. type: Plain text
6539 #: build/C/man2/signalfd.2:129
6540 msgid ""
6541 "As a consequence of the B<read>(2), the signals are consumed, so that they "
6542 "are no longer pending for the process (i.e., will not be caught by signal "
6543 "handlers, and cannot be accepted using B<sigwaitinfo>(2))."
6544 msgstr ""
6545
6546 #. type: Plain text
6547 #: build/C/man2/signalfd.2:140
6548 msgid ""
6549 "If none of the signals in I<mask> is pending for the process, then the "
6550 "B<read>(2)  either blocks until one of the signals in I<mask> is generated "
6551 "for the process, or fails with the error B<EAGAIN> if the file descriptor "
6552 "has been made nonblocking."
6553 msgstr ""
6554
6555 #. type: Plain text
6556 #: build/C/man2/signalfd.2:153
6557 msgid ""
6558 "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the "
6559 "B<poll>(2)  B<POLLIN> flag)  if one or more of the signals in I<mask> is "
6560 "pending for the process."
6561 msgstr ""
6562
6563 #. type: Plain text
6564 #: build/C/man2/signalfd.2:160
6565 msgid ""
6566 "The signalfd file descriptor also supports the other file-descriptor "
6567 "multiplexing APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
6568 msgstr ""
6569
6570 #. type: Plain text
6571 #: build/C/man2/signalfd.2:165
6572 msgid ""
6573 "When the file descriptor is no longer required it should be closed.  When "
6574 "all file descriptors associated with the same signalfd object have been "
6575 "closed, the resources for object are freed by the kernel."
6576 msgstr ""
6577
6578 #. type: SS
6579 #: build/C/man2/signalfd.2:165
6580 #, no-wrap
6581 msgid "The signalfd_siginfo structure"
6582 msgstr ""
6583
6584 #. type: Plain text
6585 #: build/C/man2/signalfd.2:171
6586 msgid ""
6587 "The format of the I<signalfd_siginfo> structure(s) returned by B<read>(2)s "
6588 "from a signalfd file descriptor is as follows:"
6589 msgstr ""
6590
6591 #.  ssi_trapno is unused on most arches
6592 #.  FIXME Since Linux 2.6.37 there is 'uint16_t ssi_addr_lsb'
6593 #.  which is not yet documented
6594 #. type: Plain text
6595 #: build/C/man2/signalfd.2:198
6596 #, no-wrap
6597 msgid ""
6598 "struct signalfd_siginfo {\n"
6599 "    uint32_t ssi_signo;   /* Signal number */\n"
6600 "    int32_t  ssi_errno;   /* Error number (unused) */\n"
6601 "    int32_t  ssi_code;    /* Signal code */\n"
6602 "    uint32_t ssi_pid;     /* PID of sender */\n"
6603 "    uint32_t ssi_uid;     /* Real UID of sender */\n"
6604 "    int32_t  ssi_fd;      /* File descriptor (SIGIO) */\n"
6605 "    uint32_t ssi_tid;     /* Kernel timer ID (POSIX timers)\n"
6606 "    uint32_t ssi_band;    /* Band event (SIGIO) */\n"
6607 "    uint32_t ssi_overrun; /* POSIX timer overrun count */\n"
6608 "    uint32_t ssi_trapno;  /* Trap number that caused signal */\n"
6609 "    int32_t  ssi_status;  /* Exit status or signal (SIGCHLD) */\n"
6610 "    int32_t  ssi_int;     /* Integer sent by sigqueue(3) */\n"
6611 "    uint64_t ssi_ptr;     /* Pointer sent by sigqueue(3) */\n"
6612 "    uint64_t ssi_utime;   /* User CPU time consumed (SIGCHLD) */\n"
6613 "    uint64_t ssi_stime;   /* System CPU time consumed (SIGCHLD) */\n"
6614 "    uint64_t ssi_addr;    /* Address that generated signal\n"
6615 "                             (for hardware-generated signals) */\n"
6616 "    uint8_t  pad[I<X>];      /* Pad size to 128 bytes (allow for\n"
6617 "                              additional fields in the future) */\n"
6618 "};\n"
6619 msgstr ""
6620
6621 #. type: Plain text
6622 #: build/C/man2/signalfd.2:221
6623 msgid ""
6624 "Each of the fields in this structure is analogous to the similarly named "
6625 "field in the I<siginfo_t> structure.  The I<siginfo_t> structure is "
6626 "described in B<sigaction>(2).  Not all fields in the returned "
6627 "I<signalfd_siginfo> structure will be valid for a specific signal; the set "
6628 "of valid fields can be determined from the value returned in the I<ssi_code> "
6629 "field.  This field is the analog of the I<siginfo_t> I<si_code> field; see "
6630 "B<sigaction>(2)  for details."
6631 msgstr ""
6632
6633 #. type: SS
6634 #: build/C/man2/signalfd.2:221 build/C/man2/timerfd_create.2:269
6635 #, no-wrap
6636 msgid "fork(2) semantics"
6637 msgstr ""
6638
6639 #. type: Plain text
6640 #: build/C/man2/signalfd.2:229
6641 msgid ""
6642 "After a B<fork>(2), the child inherits a copy of the signalfd file "
6643 "descriptor.  A B<read>(2)  from the file descriptor in the child will return "
6644 "information about signals queued to the child."
6645 msgstr ""
6646
6647 #. type: SS
6648 #: build/C/man2/signalfd.2:229 build/C/man2/timerfd_create.2:281
6649 #, no-wrap
6650 msgid "execve(2) semantics"
6651 msgstr ""
6652
6653 #. type: Plain text
6654 #: build/C/man2/signalfd.2:241
6655 msgid ""
6656 "Just like any other file descriptor, a signalfd file descriptor remains open "
6657 "across an B<execve>(2), unless it has been marked for close-on-exec (see "
6658 "B<fcntl>(2)).  Any signals that were available for reading before the "
6659 "B<execve>(2)  remain available to the newly loaded program.  (This is "
6660 "analogous to traditional signal semantics, where a blocked signal that is "
6661 "pending remains pending across an B<execve>(2).)"
6662 msgstr ""
6663
6664 #. type: SS
6665 #: build/C/man2/signalfd.2:241
6666 #, no-wrap
6667 msgid "Thread semantics"
6668 msgstr ""
6669
6670 #. type: Plain text
6671 #: build/C/man2/signalfd.2:251
6672 msgid ""
6673 "The semantics of signalfd file descriptors in a multithreaded program mirror "
6674 "the standard semantics for signals.  In other words, when a thread reads "
6675 "from a signalfd file descriptor, it will read the signals that are directed "
6676 "to the thread itself and the signals that are directed to the process (i.e., "
6677 "the entire thread group).  (A thread will not be able to read signals that "
6678 "are directed to other threads in the process.)"
6679 msgstr ""
6680
6681 #. type: Plain text
6682 #: build/C/man2/signalfd.2:265
6683 msgid ""
6684 "On success, B<signalfd>()  returns a signalfd file descriptor; this is "
6685 "either a new file descriptor (if I<fd> was -1), or I<fd> if I<fd> was a "
6686 "valid signalfd file descriptor.  On error, -1 is returned and I<errno> is "
6687 "set to indicate the error."
6688 msgstr ""
6689
6690 #. type: TP
6691 #: build/C/man2/signalfd.2:266 build/C/man2/timerfd_create.2:338
6692 #, no-wrap
6693 msgid "B<EBADF>"
6694 msgstr ""
6695
6696 #. type: Plain text
6697 #: build/C/man2/signalfd.2:271
6698 msgid "The I<fd> file descriptor is not a valid file descriptor."
6699 msgstr ""
6700
6701 #.  or, the
6702 #.  .I sizemask
6703 #.  argument is not equal to
6704 #.  .IR sizeof(sigset_t) ;
6705 #. type: Plain text
6706 #: build/C/man2/signalfd.2:279
6707 msgid "I<fd> is not a valid signalfd file descriptor."
6708 msgstr ""
6709
6710 #. type: Plain text
6711 #: build/C/man2/signalfd.2:286 build/C/man2/timerfd_create.2:320
6712 msgid "I<flags> is invalid; or, in Linux 2.6.26 or earlier, I<flags> is nonzero."
6713 msgstr ""
6714
6715 #. type: Plain text
6716 #: build/C/man2/signalfd.2:289 build/C/man2/timerfd_create.2:323
6717 msgid "The per-process limit of open file descriptors has been reached."
6718 msgstr ""
6719
6720 #. type: Plain text
6721 #: build/C/man2/signalfd.2:299
6722 msgid "There was insufficient memory to create a new signalfd file descriptor."
6723 msgstr ""
6724
6725 #.  signalfd() is in glibc 2.7, but reportedly does not build
6726 #. type: Plain text
6727 #: build/C/man2/signalfd.2:307
6728 msgid ""
6729 "B<signalfd>()  is available on Linux since kernel 2.6.22.  Working support "
6730 "is provided in glibc since version 2.8.  The B<signalfd4>()  system call "
6731 "(see NOTES) is available on Linux since kernel 2.6.27."
6732 msgstr ""
6733
6734 #. type: Plain text
6735 #: build/C/man2/signalfd.2:312
6736 msgid "B<signalfd>()  and B<signalfd4>()  are Linux-specific."
6737 msgstr ""
6738
6739 #. type: Plain text
6740 #: build/C/man2/signalfd.2:322
6741 msgid ""
6742 "The underlying Linux system call requires an additional argument, I<size_t "
6743 "sizemask>, which specifies the size of the I<mask> argument.  The glibc "
6744 "B<signalfd>()  wrapper function does not include this argument, since it "
6745 "provides the required value for the underlying system call."
6746 msgstr ""
6747
6748 #. type: Plain text
6749 #: build/C/man2/signalfd.2:336
6750 msgid ""
6751 "A process can create multiple signalfd file descriptors.  This makes it "
6752 "possible to accept different signals on different file descriptors.  (This "
6753 "may be useful if monitoring the file descriptors using B<select>(2), "
6754 "B<poll>(2), or B<epoll>(7): the arrival of different signals will make "
6755 "different descriptors ready.)  If a signal appears in the I<mask> of more "
6756 "than one of the file descriptors, then occurrences of that signal can be "
6757 "read (once) from any one of the descriptors."
6758 msgstr ""
6759
6760 #. type: Plain text
6761 #: build/C/man2/signalfd.2:352
6762 msgid ""
6763 "There are two underlying Linux system calls: B<signalfd>()  and the more "
6764 "recent B<signalfd4>().  The former system call does not implement a I<flags> "
6765 "argument.  The latter system call implements the I<flags> values described "
6766 "above.  Starting with glibc 2.9, the B<signalfd>()  wrapper function will "
6767 "use B<signalfd4>()  where it is available."
6768 msgstr ""
6769
6770 #.  The fix also was put into 2.6.24.5
6771 #. type: Plain text
6772 #: build/C/man2/signalfd.2:360
6773 msgid ""
6774 "In kernels before 2.6.25, the I<ssi_ptr> and I<ssi_int> fields are not "
6775 "filled in with the data accompanying a signal sent by B<sigqueue>(3)."
6776 msgstr ""
6777
6778 #. type: Plain text
6779 #: build/C/man2/signalfd.2:370
6780 msgid ""
6781 "The program below accepts the signals B<SIGINT> and B<SIGQUIT> via a "
6782 "signalfd file descriptor.  The program terminates after accepting a "
6783 "B<SIGQUIT> signal.  The following shell session demonstrates the use of the "
6784 "program:"
6785 msgstr ""
6786
6787 #. type: Plain text
6788 #: build/C/man2/signalfd.2:381
6789 #, no-wrap
6790 msgid ""
6791 "$B< ./signalfd_demo>\n"
6792 "B<^C>                   # Control-C generates SIGINT\n"
6793 "Got SIGINT\n"
6794 "B<^C>\n"
6795 "Got SIGINT\n"
6796 "B<^\\e>                    # Control-\\e generates SIGQUIT\n"
6797 "Got SIGQUIT\n"
6798 "$\n"
6799 msgstr ""
6800
6801 #. type: Plain text
6802 #: build/C/man2/signalfd.2:391
6803 #, no-wrap
6804 msgid ""
6805 "#include E<lt>sys/signalfd.hE<gt>\n"
6806 "#include E<lt>signal.hE<gt>\n"
6807 "#include E<lt>unistd.hE<gt>\n"
6808 "#include E<lt>stdlib.hE<gt>\n"
6809 "#include E<lt>stdio.hE<gt>\n"
6810 msgstr ""
6811
6812 #. type: Plain text
6813 #: build/C/man2/signalfd.2:402
6814 #, no-wrap
6815 msgid ""
6816 "int\n"
6817 "main(int argc, char *argv[])\n"
6818 "{\n"
6819 "    sigset_t mask;\n"
6820 "    int sfd;\n"
6821 "    struct signalfd_siginfo fdsi;\n"
6822 "    ssize_t s;\n"
6823 msgstr ""
6824
6825 #. type: Plain text
6826 #: build/C/man2/signalfd.2:406
6827 #, no-wrap
6828 msgid ""
6829 "    sigemptyset(&mask);\n"
6830 "    sigaddset(&mask, SIGINT);\n"
6831 "    sigaddset(&mask, SIGQUIT);\n"
6832 msgstr ""
6833
6834 #. type: Plain text
6835 #: build/C/man2/signalfd.2:409
6836 #, no-wrap
6837 msgid ""
6838 "    /* Block signals so that they aren\\(aqt handled\n"
6839 "       according to their default dispositions */\n"
6840 msgstr ""
6841
6842 #. type: Plain text
6843 #: build/C/man2/signalfd.2:412
6844 #, no-wrap
6845 msgid ""
6846 "    if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n"
6847 "        handle_error(\"sigprocmask\");\n"
6848 msgstr ""
6849
6850 #. type: Plain text
6851 #: build/C/man2/signalfd.2:416
6852 #, no-wrap
6853 msgid ""
6854 "    sfd = signalfd(-1, &mask, 0);\n"
6855 "    if (sfd == -1)\n"
6856 "        handle_error(\"signalfd\");\n"
6857 msgstr ""
6858
6859 #. type: Plain text
6860 #: build/C/man2/signalfd.2:421
6861 #, no-wrap
6862 msgid ""
6863 "    for (;;) {\n"
6864 "        s = read(sfd, &fdsi, sizeof(struct signalfd_siginfo));\n"
6865 "        if (s != sizeof(struct signalfd_siginfo))\n"
6866 "            handle_error(\"read\");\n"
6867 msgstr ""
6868
6869 #. type: Plain text
6870 #: build/C/man2/signalfd.2:432
6871 #, no-wrap
6872 msgid ""
6873 "        if (fdsi.ssi_signo == SIGINT) {\n"
6874 "            printf(\"Got SIGINT\\en\");\n"
6875 "        } else if (fdsi.ssi_signo == SIGQUIT) {\n"
6876 "            printf(\"Got SIGQUIT\\en\");\n"
6877 "            exit(EXIT_SUCCESS);\n"
6878 "        } else {\n"
6879 "            printf(\"Read unexpected signal\\en\");\n"
6880 "        }\n"
6881 "    }\n"
6882 "}\n"
6883 msgstr ""
6884
6885 #. type: Plain text
6886 #: build/C/man2/signalfd.2:446
6887 msgid ""
6888 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<sigaction>(2), "
6889 "B<sigprocmask>(2), B<sigwaitinfo>(2), B<timerfd_create>(2), B<sigsetops>(3), "
6890 "B<sigwait>(3), B<epoll>(7), B<signal>(7)"
6891 msgstr ""
6892
6893 #. type: TH
6894 #: build/C/man3/sigpause.3:25
6895 #, no-wrap
6896 msgid "SIGPAUSE"
6897 msgstr ""
6898
6899 #. type: TH
6900 #: build/C/man3/sigpause.3:25
6901 #, no-wrap
6902 msgid "2010-09-12"
6903 msgstr ""
6904
6905 #. type: Plain text
6906 #: build/C/man3/sigpause.3:28
6907 msgid "sigpause - atomically release blocked signals and wait for interrupt"
6908 msgstr ""
6909
6910 #. type: Plain text
6911 #: build/C/man3/sigpause.3:33
6912 #, no-wrap
6913 msgid "B<int sigpause(int >I<sigmask>B<);  /* BSD */>\n"
6914 msgstr ""
6915
6916 #. type: Plain text
6917 #: build/C/man3/sigpause.3:35
6918 #, no-wrap
6919 msgid "B<int sigpause(int >I<sig>B<);      /* System V / UNIX 95 */>\n"
6920 msgstr ""
6921
6922 #. type: Plain text
6923 #: build/C/man3/sigpause.3:41
6924 msgid "Don't use this function.  Use B<sigsuspend>(2)  instead."
6925 msgstr ""
6926
6927 #. type: Plain text
6928 #: build/C/man3/sigpause.3:48
6929 msgid ""
6930 "The function B<sigpause>()  is designed to wait for some signal.  It changes "
6931 "the process's signal mask (set of blocked signals), and then waits for a "
6932 "signal to arrive.  Upon arrival of a signal, the original signal mask is "
6933 "restored."
6934 msgstr ""
6935
6936 #. type: Plain text
6937 #: build/C/man3/sigpause.3:56
6938 msgid ""
6939 "If B<sigpause>()  returns, it was interrupted by a signal and the return "
6940 "value is -1 with I<errno> set to B<EINTR>."
6941 msgstr ""
6942
6943 #. type: Plain text
6944 #: build/C/man3/sigpause.3:60
6945 msgid "The System V version of B<sigpause>()  is standardized in POSIX.1-2001."
6946 msgstr ""
6947
6948 #.  __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG
6949 #. type: Plain text
6950 #: build/C/man3/sigpause.3:77
6951 msgid ""
6952 "The classical BSD version of this function appeared in 4.2BSD.  It sets the "
6953 "process's signal mask to I<sigmask>.  UNIX 95 standardized the incompatible "
6954 "System V version of this function, which removes only the specified signal "
6955 "I<sig> from the process's signal mask.  The unfortunate situation with two "
6956 "incompatible functions with the same name was solved by the "
6957 "B<\\%sigsuspend>(2)  function, that takes a I<sigset_t *> argument (instead "
6958 "of an I<int>)."
6959 msgstr ""
6960
6961 #. type: Plain text
6962 #: build/C/man3/sigpause.3:80
6963 msgid ""
6964 "On Linux, this routine is a system call only on the Sparc (sparc64)  "
6965 "architecture."
6966 msgstr ""
6967
6968 #. type: Plain text
6969 #: build/C/man3/sigpause.3:82
6970 msgid "Libc4 and libc5 only know about the BSD version."
6971 msgstr ""
6972
6973 #
6974 #.  For the BSD version, one usually uses a zero
6975 #.  .I sigmask
6976 #.  to indicate that no signals are to be blocked.
6977 #. type: Plain text
6978 #: build/C/man3/sigpause.3:98
6979 msgid ""
6980 "Glibc uses the BSD version if the B<_BSD_SOURCE> feature test macro is "
6981 "defined and none of B<_POSIX_SOURCE>, B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, "
6982 "B<_GNU_SOURCE>, or B<_SVID_SOURCE> is defined.  Otherwise, the System V "
6983 "version is used."
6984 msgstr ""
6985
6986 #. type: Plain text
6987 #: build/C/man3/sigpause.3:106
6988 msgid ""
6989 "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<sigsuspend>(2), "
6990 "B<sigblock>(3), B<sigvec>(3), B<feature_test_macros>(7)"
6991 msgstr ""
6992
6993 #. type: TH
6994 #: build/C/man2/sigpending.2:29
6995 #, no-wrap
6996 msgid "SIGPENDING"
6997 msgstr ""
6998
6999 #. type: TH
7000 #: build/C/man2/sigpending.2:29
7001 #, no-wrap
7002 msgid "2008-10-04"
7003 msgstr ""
7004
7005 #. type: Plain text
7006 #: build/C/man2/sigpending.2:32
7007 msgid "sigpending - examine pending signals"
7008 msgstr ""
7009
7010 #. type: Plain text
7011 #: build/C/man2/sigpending.2:36
7012 msgid "B<int sigpending(sigset_t *>I<set>B<);>"
7013 msgstr ""
7014
7015 #. type: Plain text
7016 #: build/C/man2/sigpending.2:45
7017 msgid ""
7018 "B<sigpending>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
7019 "_POSIX_SOURCE"
7020 msgstr ""
7021
7022 #. type: Plain text
7023 #: build/C/man2/sigpending.2:53
7024 msgid ""
7025 "B<sigpending>()  returns the set of signals that are pending for delivery to "
7026 "the calling thread (i.e., the signals which have been raised while "
7027 "blocked).  The mask of pending signals is returned in I<set>."
7028 msgstr ""
7029
7030 #. type: Plain text
7031 #: build/C/man2/sigpending.2:56
7032 msgid "B<sigpending>()  returns 0 on success and -1 on error."
7033 msgstr ""
7034
7035 #. type: Plain text
7036 #: build/C/man2/sigpending.2:61
7037 msgid ""
7038 "I<set> points to memory which is not a valid part of the process address "
7039 "space."
7040 msgstr ""
7041
7042 #. type: Plain text
7043 #: build/C/man2/sigpending.2:72
7044 msgid ""
7045 "The set of signals that is pending for a thread is the union of the set of "
7046 "signals that is pending for that thread and the set of signals that is "
7047 "pending for the process as a whole; see B<signal>(7)."
7048 msgstr ""
7049
7050 #. type: Plain text
7051 #: build/C/man2/sigpending.2:84
7052 msgid ""
7053 "In versions of glibc up to and including 2.2.1, there is a bug in the "
7054 "wrapper function for B<sigpending>()  which means that information about "
7055 "pending real-time signals is not correctly returned."
7056 msgstr ""
7057
7058 #. type: Plain text
7059 #: build/C/man2/sigpending.2:92
7060 msgid ""
7061 "B<kill>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
7062 "B<sigsuspend>(2), B<sigsetops>(3), B<signal>(7)"
7063 msgstr ""
7064
7065 #. type: TH
7066 #: build/C/man2/sigprocmask.2:29
7067 #, no-wrap
7068 msgid "SIGPROCMASK"
7069 msgstr ""
7070
7071 #. type: TH
7072 #: build/C/man2/sigprocmask.2:29
7073 #, no-wrap
7074 msgid "2012-04-15"
7075 msgstr ""
7076
7077 #. type: Plain text
7078 #: build/C/man2/sigprocmask.2:32
7079 msgid "sigprocmask - examine and change blocked signals"
7080 msgstr ""
7081
7082 #. type: Plain text
7083 #: build/C/man2/sigprocmask.2:37
7084 msgid ""
7085 "B<int sigprocmask(int >I<how>B<, const sigset_t *>I<set>B<,> B<sigset_t "
7086 "*>I<oldset>B<);>"
7087 msgstr ""
7088
7089 #. type: Plain text
7090 #: build/C/man2/sigprocmask.2:46
7091 msgid ""
7092 "B<sigprocmask>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
7093 "_POSIX_SOURCE"
7094 msgstr ""
7095
7096 #. type: Plain text
7097 #: build/C/man2/sigprocmask.2:55
7098 msgid ""
7099 "B<sigprocmask>()  is used to fetch and/or change the signal mask of the "
7100 "calling thread.  The signal mask is the set of signals whose delivery is "
7101 "currently blocked for the caller (see also B<signal>(7)  for more details)."
7102 msgstr ""
7103
7104 #. type: Plain text
7105 #: build/C/man2/sigprocmask.2:59
7106 msgid "The behavior of the call is dependent on the value of I<how>, as follows."
7107 msgstr ""
7108
7109 #. type: TP
7110 #: build/C/man2/sigprocmask.2:59
7111 #, no-wrap
7112 msgid "B<SIG_BLOCK>"
7113 msgstr ""
7114
7115 #. type: Plain text
7116 #: build/C/man2/sigprocmask.2:64
7117 msgid ""
7118 "The set of blocked signals is the union of the current set and the I<set> "
7119 "argument."
7120 msgstr ""
7121
7122 #. type: TP
7123 #: build/C/man2/sigprocmask.2:64
7124 #, no-wrap
7125 msgid "B<SIG_UNBLOCK>"
7126 msgstr ""
7127
7128 #. type: Plain text
7129 #: build/C/man2/sigprocmask.2:70
7130 msgid ""
7131 "The signals in I<set> are removed from the current set of blocked signals.  "
7132 "It is permissible to attempt to unblock a signal which is not blocked."
7133 msgstr ""
7134
7135 #. type: TP
7136 #: build/C/man2/sigprocmask.2:70
7137 #, no-wrap
7138 msgid "B<SIG_SETMASK>"
7139 msgstr ""
7140
7141 #. type: Plain text
7142 #: build/C/man2/sigprocmask.2:74
7143 msgid "The set of blocked signals is set to the argument I<set>."
7144 msgstr ""
7145
7146 #. type: Plain text
7147 #: build/C/man2/sigprocmask.2:79
7148 msgid ""
7149 "If I<oldset> is non-NULL, the previous value of the signal mask is stored in "
7150 "I<oldset>."
7151 msgstr ""
7152
7153 #. type: Plain text
7154 #: build/C/man2/sigprocmask.2:88
7155 msgid ""
7156 "If I<set> is NULL, then the signal mask is unchanged (i.e., I<how> is "
7157 "ignored), but the current value of the signal mask is nevertheless returned "
7158 "in I<oldset> (if it is not NULL)."
7159 msgstr ""
7160
7161 #. type: Plain text
7162 #: build/C/man2/sigprocmask.2:93
7163 msgid ""
7164 "The use of B<sigprocmask>()  is unspecified in a multithreaded process; see "
7165 "B<pthread_sigmask>(3)."
7166 msgstr ""
7167
7168 #. type: Plain text
7169 #: build/C/man2/sigprocmask.2:96
7170 msgid "B<sigprocmask>()  returns 0 on success and -1 on error."
7171 msgstr ""
7172
7173 #. type: Plain text
7174 #: build/C/man2/sigprocmask.2:104
7175 msgid ""
7176 "the I<set> or I<oldset> argument points outside the process's allocated "
7177 "address space."
7178 msgstr ""
7179
7180 #. type: Plain text
7181 #: build/C/man2/sigprocmask.2:109
7182 msgid "The value specified in I<how> was invalid."
7183 msgstr ""
7184
7185 #. type: Plain text
7186 #: build/C/man2/sigprocmask.2:115
7187 msgid ""
7188 "It is not possible to block B<SIGKILL> or B<SIGSTOP>.  Attempts to do so are "
7189 "silently ignored."
7190 msgstr ""
7191
7192 #. type: Plain text
7193 #: build/C/man2/sigprocmask.2:117
7194 msgid "Each of the threads in a process has its own signal mask."
7195 msgstr ""
7196
7197 #. type: Plain text
7198 #: build/C/man2/sigprocmask.2:137
7199 msgid ""
7200 "If B<SIGBUS>, B<SIGFPE>, B<SIGILL>, or B<SIGSEGV> are generated while they "
7201 "are blocked, the result is undefined, unless the signal was generated by "
7202 "B<kill>(2), B<sigqueue>(3), or B<raise>(3)."
7203 msgstr ""
7204
7205 #. type: Plain text
7206 #: build/C/man2/sigprocmask.2:152
7207 msgid ""
7208 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigpending>(2), "
7209 "B<sigsuspend>(2), B<pthread_sigmask>(3), B<sigqueue>(3), B<sigsetops>(3), "
7210 "B<signal>(7)"
7211 msgstr ""
7212
7213 #. type: TH
7214 #: build/C/man3/sigqueue.3:28
7215 #, no-wrap
7216 msgid "SIGQUEUE"
7217 msgstr ""
7218
7219 #. type: TH
7220 #: build/C/man3/sigqueue.3:28
7221 #, no-wrap
7222 msgid "2012-03-25"
7223 msgstr ""
7224
7225 #. type: Plain text
7226 #: build/C/man3/sigqueue.3:31
7227 msgid "sigqueue - queue a signal and data to a process"
7228 msgstr ""
7229
7230 #. type: Plain text
7231 #: build/C/man3/sigqueue.3:35
7232 msgid ""
7233 "B<int sigqueue(pid_t >I<pid>B<, int >I<sig>B<, const union sigval "
7234 ">I<value>B<);>"
7235 msgstr ""
7236
7237 #. type: Plain text
7238 #: build/C/man3/sigqueue.3:43
7239 msgid "B<sigqueue>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
7240 msgstr ""
7241
7242 #. type: Plain text
7243 #: build/C/man3/sigqueue.3:55
7244 msgid ""
7245 "B<sigqueue>()  sends the signal specified in I<sig> to the process whose PID "
7246 "is given in I<pid>.  The permissions required to send a signal are the same "
7247 "as for B<kill>(2).  As with B<kill>(2), the null signal (0) can be used to "
7248 "check if a process with a given PID exists."
7249 msgstr ""
7250
7251 #. type: Plain text
7252 #: build/C/man3/sigqueue.3:60
7253 msgid ""
7254 "The I<value> argument is used to specify an accompanying item of data "
7255 "(either an integer or a pointer value) to be sent with the signal, and has "
7256 "the following type:"
7257 msgstr ""
7258
7259 #. type: Plain text
7260 #: build/C/man3/sigqueue.3:67
7261 #, no-wrap
7262 msgid ""
7263 "union sigval {\n"
7264 "    int   sival_int;\n"
7265 "    void *sival_ptr;\n"
7266 "};\n"
7267 msgstr ""
7268
7269 #. type: Plain text
7270 #: build/C/man3/sigqueue.3:83
7271 msgid ""
7272 "If the receiving process has installed a handler for this signal using the "
7273 "B<SA_SIGINFO> flag to B<sigaction>(2), then it can obtain this data via the "
7274 "I<si_value> field of the I<siginfo_t> structure passed as the second "
7275 "argument to the handler.  Furthermore, the I<si_code> field of that "
7276 "structure will be set to B<SI_QUEUE>."
7277 msgstr ""
7278
7279 #. type: Plain text
7280 #: build/C/man3/sigqueue.3:91
7281 msgid ""
7282 "On success, B<sigqueue>()  returns 0, indicating that the signal was "
7283 "successfully queued to the receiving process.  Otherwise -1 is returned and "
7284 "I<errno> is set to indicate the error."
7285 msgstr ""
7286
7287 #. type: Plain text
7288 #: build/C/man3/sigqueue.3:102
7289 msgid "I<sig> was invalid."
7290 msgstr ""
7291
7292 #. type: Plain text
7293 #: build/C/man3/sigqueue.3:108
7294 msgid ""
7295 "The process does not have permission to send the signal to the receiving "
7296 "process.  For the required permissions, see B<kill>(2)."
7297 msgstr ""
7298
7299 #. type: Plain text
7300 #: build/C/man3/sigqueue.3:112
7301 msgid "No process has a PID matching I<pid>."
7302 msgstr ""
7303
7304 #. type: Plain text
7305 #: build/C/man3/sigqueue.3:114
7306 msgid "This system call first appeared in Linux 2.2."
7307 msgstr ""
7308
7309 #. type: Plain text
7310 #: build/C/man3/sigqueue.3:124
7311 msgid ""
7312 "If this function results in the sending of a signal to the process that "
7313 "invoked it, and that signal was not blocked by the calling thread, and no "
7314 "other threads were willing to handle this signal (either by having it "
7315 "unblocked, or by waiting for it using B<sigwait>(3)), then at least some "
7316 "signal must be delivered to this thread before this function returns."
7317 msgstr ""
7318
7319 #. type: Plain text
7320 #: build/C/man3/sigqueue.3:139
7321 msgid ""
7322 "On Linux, this function is implemented using the B<rt_sigqueueinfo>(2)  "
7323 "system call.  The system call differs in its third argument, which is the "
7324 "I<siginfo_t> structure that will be supplied to the receiving process's "
7325 "signal handler or returned by the receiving process's B<sigtimedwait>(2)  "
7326 "call.  Inside the glibc B<sigqueue>()  wrapper, this argument, I<uinfo>, is "
7327 "initialized as follows:"
7328 msgstr ""
7329
7330 #. type: Plain text
7331 #: build/C/man3/sigqueue.3:147
7332 #, no-wrap
7333 msgid ""
7334 "uinfo.si_signo = sig;      /* argument supplied to sigqueue() */\n"
7335 "uinfo.si_code = SI_QUEUE;\n"
7336 "uinfo.si_pid = getpid();   /* Process ID of sender */\n"
7337 "uinfo.si_uid = getuid();   /* Real UID of sender */\n"
7338 "uinfo.si_value = val;      /* argument supplied to sigqueue() */\n"
7339 msgstr ""
7340
7341 #. type: Plain text
7342 #: build/C/man3/sigqueue.3:157
7343 msgid ""
7344 "B<kill>(2), B<rt_sigqueueinfo>(2), B<sigaction>(2), B<signal>(2), "
7345 "B<pthread_sigqueue>(3), B<sigwait>(3), B<signal>(7)"
7346 msgstr ""
7347
7348 #. type: TH
7349 #: build/C/man2/sigreturn.2:29
7350 #, no-wrap
7351 msgid "SIGRETURN"
7352 msgstr ""
7353
7354 #. type: TH
7355 #: build/C/man2/sigreturn.2:29
7356 #, no-wrap
7357 msgid "2008-06-26"
7358 msgstr ""
7359
7360 #. type: Plain text
7361 #: build/C/man2/sigreturn.2:32
7362 msgid "sigreturn - return from signal handler and cleanup stack frame"
7363 msgstr ""
7364
7365 #. type: Plain text
7366 #: build/C/man2/sigreturn.2:34
7367 msgid "B<int sigreturn(unsigned long >I<__unused>B<);>"
7368 msgstr ""
7369
7370 #. type: Plain text
7371 #: build/C/man2/sigreturn.2:42
7372 msgid ""
7373 "When the Linux kernel creates the stack frame for a signal handler, a call "
7374 "to B<sigreturn>()  is inserted into the stack frame so that upon return from "
7375 "the signal handler, B<sigreturn>()  will be called."
7376 msgstr ""
7377
7378 #. type: Plain text
7379 #: build/C/man2/sigreturn.2:53
7380 msgid ""
7381 "This B<sigreturn>()  call undoes everything that was done\\(emchanging the "
7382 "process's signal mask, switching stacks (see B<sigaltstack>(2))\\(emin order "
7383 "to invoke the signal handler: it restores the process's signal mask, "
7384 "switches stacks, and restores the process's context (registers, processor "
7385 "flags), so that the process directly resumes execution at the point where it "
7386 "was interrupted by the signal."
7387 msgstr ""
7388
7389 #. type: Plain text
7390 #: build/C/man2/sigreturn.2:56
7391 msgid "B<sigreturn>()  never returns."
7392 msgstr ""
7393
7394 #. type: SH
7395 #: build/C/man2/sigreturn.2:56
7396 #, no-wrap
7397 msgid "FILES"
7398 msgstr ""
7399
7400 #. type: Plain text
7401 #: build/C/man2/sigreturn.2:58
7402 msgid "/usr/src/linux/arch/i386/kernel/signal.c"
7403 msgstr ""
7404
7405 #. type: Plain text
7406 #: build/C/man2/sigreturn.2:60
7407 msgid "/usr/src/linux/arch/alpha/kernel/entry.S"
7408 msgstr ""
7409
7410 #. type: Plain text
7411 #: build/C/man2/sigreturn.2:64
7412 msgid ""
7413 "B<sigreturn>()  is specific to Linux and should not be used in programs "
7414 "intended to be portable."
7415 msgstr ""
7416
7417 #. type: Plain text
7418 #: build/C/man2/sigreturn.2:74
7419 msgid ""
7420 "The B<sigreturn>()  call is used by the kernel to implement signal "
7421 "handlers.  It should B<never> be called directly.  Better yet, the specific "
7422 "use of the I<__unused> argument varies depending on the architecture."
7423 msgstr ""
7424
7425 #. type: Plain text
7426 #: build/C/man2/sigreturn.2:79
7427 msgid "B<kill>(2), B<sigaltstack>(2), B<signal>(2), B<signal>(7)"
7428 msgstr ""
7429
7430 #. type: TH
7431 #: build/C/man3/sigset.3:26
7432 #, no-wrap
7433 msgid "SIGSET"
7434 msgstr ""
7435
7436 #. type: Plain text
7437 #: build/C/man3/sigset.3:29
7438 msgid "sigset, sighold, sigrelse, sigignore - System V signal API"
7439 msgstr ""
7440
7441 #. type: Plain text
7442 #: build/C/man3/sigset.3:35
7443 msgid "B<sighandler_t sigset(int >I<sig>B<, sighandler_t >I<disp>B<);>"
7444 msgstr ""
7445
7446 #. type: Plain text
7447 #: build/C/man3/sigset.3:37
7448 msgid "B<int sighold(int >I<sig>B<);>"
7449 msgstr ""
7450
7451 #. type: Plain text
7452 #: build/C/man3/sigset.3:39
7453 msgid "B<int sigrelse(int >I<sig>B<);>"
7454 msgstr ""
7455
7456 #. type: Plain text
7457 #: build/C/man3/sigset.3:41
7458 msgid "B<int sigignore(int >I<sig>B<);>"
7459 msgstr ""
7460
7461 #. type: Plain text
7462 #: build/C/man3/sigset.3:52
7463 msgid "B<sigset>(), B<sighold>(), B<sigrelse>(), B<sigignore>():"
7464 msgstr ""
7465
7466 #. type: Plain text
7467 #: build/C/man3/sigset.3:56
7468 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
7469 msgstr ""
7470
7471 #. type: Plain text
7472 #: build/C/man3/sigset.3:65
7473 msgid ""
7474 "These functions are provided in glibc as a compatibility interface for "
7475 "programs that make use of the historical System V signal API.  This API is "
7476 "obsolete: new applications should use the POSIX signal API (B<sigaction>(2), "
7477 "B<sigprocmask>(2), etc.)"
7478 msgstr ""
7479
7480 #. type: Plain text
7481 #: build/C/man3/sigset.3:74
7482 msgid ""
7483 "The B<sigset>()  function modifies the disposition of the signal I<sig>.  "
7484 "The I<disp> argument can be the address of a signal handler function, or one "
7485 "of the following constants:"
7486 msgstr ""
7487
7488 #. type: TP
7489 #: build/C/man3/sigset.3:74
7490 #, no-wrap
7491 msgid "B<SIG_DFL>"
7492 msgstr ""
7493
7494 #. type: Plain text
7495 #: build/C/man3/sigset.3:79
7496 msgid "Reset the disposition of I<sig> to the default."
7497 msgstr ""
7498
7499 #. type: TP
7500 #: build/C/man3/sigset.3:79
7501 #, no-wrap
7502 msgid "B<SIG_IGN>"
7503 msgstr ""
7504
7505 #. type: Plain text
7506 #: build/C/man3/sigset.3:83
7507 msgid "Ignore I<sig>."
7508 msgstr ""
7509
7510 #. type: TP
7511 #: build/C/man3/sigset.3:83
7512 #, no-wrap
7513 msgid "B<SIG_HOLD>"
7514 msgstr ""
7515
7516 #. type: Plain text
7517 #: build/C/man3/sigset.3:90
7518 msgid ""
7519 "Add I<sig> to the process's signal mask, but leave the disposition of I<sig> "
7520 "unchanged."
7521 msgstr ""
7522
7523 #. type: Plain text
7524 #: build/C/man3/sigset.3:96
7525 msgid ""
7526 "If I<disp> specifies the address of a signal handler, then I<sig> is added "
7527 "to the process's signal mask during execution of the handler."
7528 msgstr ""
7529
7530 #. type: Plain text
7531 #: build/C/man3/sigset.3:104
7532 msgid ""
7533 "If I<disp> was specified as a value other than B<SIG_HOLD>, then I<sig> is "
7534 "removed from the process's signal mask."
7535 msgstr ""
7536
7537 #. type: Plain text
7538 #: build/C/man3/sigset.3:110 build/C/man3/sigvec.3:87
7539 msgid "The dispositions for B<SIGKILL> and B<SIGSTOP> cannot be changed."
7540 msgstr ""
7541
7542 #. type: Plain text
7543 #: build/C/man3/sigset.3:116
7544 msgid "The B<sighold>()  function adds I<sig> to the calling process's signal mask."
7545 msgstr ""
7546
7547 #. type: Plain text
7548 #: build/C/man3/sigset.3:122
7549 msgid ""
7550 "The B<sigrelse>()  function removes I<sig> from the calling process's signal "
7551 "mask."
7552 msgstr ""
7553
7554 #. type: Plain text
7555 #: build/C/man3/sigset.3:129
7556 msgid "The B<sigignore>()  function sets the disposition of I<sig> to B<SIG_IGN>."
7557 msgstr ""
7558
7559 #. type: Plain text
7560 #: build/C/man3/sigset.3:145
7561 msgid ""
7562 "On success, B<sigset>()  returns B<SIG_HOLD> if I<sig> was blocked before "
7563 "the call, or the signal's previous disposition if it was not blocked before "
7564 "the call.  On error, B<sigset>()  returns -1, with I<errno> set to indicate "
7565 "the error.  (But see BUGS below.)"
7566 msgstr ""
7567
7568 #. type: Plain text
7569 #: build/C/man3/sigset.3:154
7570 msgid ""
7571 "The B<sighold>(), B<sigrelse>(), and B<sigignore>()  functions return 0 on "
7572 "success; on error, these functions return -1 and set I<errno> to indicate "
7573 "the error."
7574 msgstr ""
7575
7576 #. type: Plain text
7577 #: build/C/man3/sigset.3:161
7578 msgid ""
7579 "For B<sigset>()  see the ERRORS under B<sigaction>(2)  and "
7580 "B<sigprocmask>(2)."
7581 msgstr ""
7582
7583 #. type: Plain text
7584 #: build/C/man3/sigset.3:168
7585 msgid "For B<sighold>()  and B<sigrelse>()  see the ERRORS under B<sigprocmask>(2)."
7586 msgstr ""
7587
7588 #. type: Plain text
7589 #: build/C/man3/sigset.3:173
7590 msgid "For B<sigignore>(), see the errors under B<sigaction>(2)."
7591 msgstr ""
7592
7593 #. type: Plain text
7594 #: build/C/man3/sigset.3:190
7595 msgid ""
7596 "SVr4, POSIX.1-2001.  These functions are obsolete: do not use them in new "
7597 "programs.  POSIX.1-2008 marks B<sighold>(), B<sigignore>(), B<sigpause>(), "
7598 "B<sigrelse>(), and B<sigset>()  as obsolete, recommending the use of "
7599 "B<sigaction>(2), B<sigprocmask>(2), B<pthread_sigmask>(3), and "
7600 "B<sigsuspend>(2)  instead."
7601 msgstr ""
7602
7603 #. type: Plain text
7604 #: build/C/man3/sigset.3:192
7605 msgid "These functions appeared in glibc version 2.1."
7606 msgstr ""
7607
7608 #. type: Plain text
7609 #: build/C/man3/sigset.3:198
7610 msgid ""
7611 "The I<sighandler_t> type is a GNU extension; it is only used on this page to "
7612 "make the B<sigset>()  prototype more easily readable."
7613 msgstr ""
7614
7615 #. type: Plain text
7616 #: build/C/man3/sigset.3:206
7617 msgid ""
7618 "The B<sigset>()  function provides reliable signal handling semantics (as "
7619 "when calling B<sigaction>(2)  with I<sa_mask> equal to 0)."
7620 msgstr ""
7621
7622 #. type: Plain text
7623 #: build/C/man3/sigset.3:224
7624 msgid ""
7625 "On System V, the B<signal>()  function provides unreliable semantics (as "
7626 "when calling B<sigaction>(2)  with I<sa_mask> equal to I<SA_RESETHAND | "
7627 "SA_NODEFER>).  On BSD, B<signal>()  provides reliable semantics.  "
7628 "POSIX.1-2001 leaves these aspects of B<signal>()  unspecified.  See "
7629 "B<signal>(2)  for further details."
7630 msgstr ""
7631
7632 #. type: Plain text
7633 #: build/C/man3/sigset.3:232 build/C/man3/sigvec.3:252
7634 msgid ""
7635 "In order to wait for a signal, BSD and System V both provided a function "
7636 "named B<sigpause>(3), but this function has a different argument on the two "
7637 "systems.  See B<sigpause>(3)  for details."
7638 msgstr ""
7639
7640 #. type: Plain text
7641 #: build/C/man3/sigset.3:241
7642 msgid ""
7643 "In versions of glibc before 2.2, B<sigset>()  did not unblock I<sig> if "
7644 "I<disp> was specified as a value other than B<SIG_HOLD>."
7645 msgstr ""
7646
7647 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1951
7648 #. type: Plain text
7649 #: build/C/man3/sigset.3:266
7650 msgid ""
7651 "In versions of glibc before 2.5, B<sigset>()  does not correctly return the "
7652 "previous disposition of the signal in two cases.  First, if I<disp> is "
7653 "specified as B<SIG_HOLD>, then a successful B<sigset>()  always returns "
7654 "B<SIG_HOLD>.  Instead, it should return the previous disposition of the "
7655 "signal (unless the signal was blocked, in which case B<SIG_HOLD> should be "
7656 "returned).  Second, if the signal is currently blocked, then the return "
7657 "value of a successful B<sigset>()  should be B<SIG_HOLD>.  Instead, the "
7658 "previous disposition of the signal is returned.  These problems have been "
7659 "fixed since glibc 2.5."
7660 msgstr ""
7661
7662 #. type: Plain text
7663 #: build/C/man3/sigset.3:276
7664 msgid ""
7665 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
7666 "B<raise>(3), B<sigpause>(3), B<sigvec>(3), B<signal>(7)"
7667 msgstr ""
7668
7669 #. type: TH
7670 #: build/C/man3/sigsetops.3:31
7671 #, no-wrap
7672 msgid "SIGSETOPS"
7673 msgstr ""
7674
7675 #. type: TH
7676 #: build/C/man3/sigsetops.3:31
7677 #, no-wrap
7678 msgid "2008-09-01"
7679 msgstr ""
7680
7681 #. type: Plain text
7682 #: build/C/man3/sigsetops.3:35
7683 msgid ""
7684 "sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - POSIX signal "
7685 "set operations."
7686 msgstr ""
7687
7688 #. type: Plain text
7689 #: build/C/man3/sigsetops.3:39
7690 msgid "B<int sigemptyset(sigset_t *>I<set>B<);>"
7691 msgstr ""
7692
7693 #. type: Plain text
7694 #: build/C/man3/sigsetops.3:41
7695 msgid "B<int sigfillset(sigset_t *>I<set>B<);>"
7696 msgstr ""
7697
7698 #. type: Plain text
7699 #: build/C/man3/sigsetops.3:43
7700 msgid "B<int sigaddset(sigset_t *>I<set>B<, int >I<signum>B<);>"
7701 msgstr ""
7702
7703 #. type: Plain text
7704 #: build/C/man3/sigsetops.3:45
7705 msgid "B<int sigdelset(sigset_t *>I<set>B<, int >I<signum>B<);>"
7706 msgstr ""
7707
7708 #. type: Plain text
7709 #: build/C/man3/sigsetops.3:47
7710 msgid "B<int sigismember(const sigset_t *>I<set>B<, int >I<signum>B<);>"
7711 msgstr ""
7712
7713 #. type: Plain text
7714 #: build/C/man3/sigsetops.3:59
7715 msgid ""
7716 "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>(), "
7717 "B<sigismember>():"
7718 msgstr ""
7719
7720 #. type: Plain text
7721 #: build/C/man3/sigsetops.3:61
7722 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
7723 msgstr ""
7724
7725 #. type: Plain text
7726 #: build/C/man3/sigsetops.3:65
7727 msgid "These functions allow the manipulation of POSIX signal sets."
7728 msgstr ""
7729
7730 #. type: Plain text
7731 #: build/C/man3/sigsetops.3:70
7732 msgid ""
7733 "B<sigemptyset>()  initializes the signal set given by I<set> to empty, with "
7734 "all signals excluded from the set."
7735 msgstr ""
7736
7737 #. type: Plain text
7738 #: build/C/man3/sigsetops.3:75
7739 msgid "B<sigfillset>()  initializes I<set> to full, including all signals."
7740 msgstr ""
7741
7742 #. type: Plain text
7743 #: build/C/man3/sigsetops.3:83
7744 msgid ""
7745 "B<sigaddset>()  and B<sigdelset>()  add and delete respectively signal "
7746 "I<signum> from I<set>."
7747 msgstr ""
7748
7749 #. type: Plain text
7750 #: build/C/man3/sigsetops.3:89
7751 msgid "B<sigismember>()  tests whether I<signum> is a member of I<set>."
7752 msgstr ""
7753
7754 #. type: Plain text
7755 #: build/C/man3/sigsetops.3:107
7756 msgid ""
7757 "Objects of type I<sigset_t> must be initialized by a call to either "
7758 "B<sigemptyset>()  or B<sigfillset>()  before being passed to the functions "
7759 "B<sigaddset>(), B<sigdelset>()  and B<sigismember>()  or the additional "
7760 "glibc functions described below (B<sigisemptyset>(), B<sigandset>(), and "
7761 "B<sigorset>()).  The results are undefined if this is not done."
7762 msgstr ""
7763
7764 #. type: Plain text
7765 #: build/C/man3/sigsetops.3:114
7766 msgid ""
7767 "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), and B<sigdelset>()  "
7768 "return 0 on success and -1 on error."
7769 msgstr ""
7770
7771 #. type: Plain text
7772 #: build/C/man3/sigsetops.3:123
7773 msgid ""
7774 "B<sigismember>()  returns 1 if I<signum> is a member of I<set>, 0 if "
7775 "I<signum> is not a member, and -1 on error."
7776 msgstr ""
7777
7778 #. type: Plain text
7779 #: build/C/man3/sigsetops.3:128
7780 msgid "I<sig> is not a valid signal."
7781 msgstr ""
7782
7783 #. type: SS
7784 #: build/C/man3/sigsetops.3:131
7785 #, no-wrap
7786 msgid "Glibc notes"
7787 msgstr ""
7788
7789 #. type: Plain text
7790 #: build/C/man3/sigsetops.3:137
7791 msgid ""
7792 "If the B<_GNU_SOURCE> feature test macro is defined, then "
7793 "I<E<lt>signal.hE<gt>> exposes three other functions for manipulating signal "
7794 "sets."
7795 msgstr ""
7796
7797 #. type: TP
7798 #: build/C/man3/sigsetops.3:137
7799 #, no-wrap
7800 msgid "B<int sigisemptyset(sigset_t *>I<set>B<);>"
7801 msgstr ""
7802
7803 #. type: Plain text
7804 #: build/C/man3/sigsetops.3:142
7805 msgid "returns 1 if I<set> contains no signals, and 0 otherwise."
7806 msgstr ""
7807
7808 #. type: TP
7809 #: build/C/man3/sigsetops.3:142
7810 #, no-wrap
7811 msgid ""
7812 "B<int sigorset(sigset_t *>I<dest>B<, sigset_t *>I<left>B<, sigset_t "
7813 "*>I<right>B<);>"
7814 msgstr ""
7815
7816 #. type: Plain text
7817 #: build/C/man3/sigsetops.3:151
7818 msgid "places the union of the sets I<left> and I<right> in I<dest>."
7819 msgstr ""
7820
7821 #. type: TP
7822 #: build/C/man3/sigsetops.3:151
7823 #, no-wrap
7824 msgid ""
7825 "B<int sigandset(sigset_t *>I<dest>B<, sigset_t *>I<left>B<, sigset_t "
7826 "*>I<right>B<);>"
7827 msgstr ""
7828
7829 #. type: Plain text
7830 #: build/C/man3/sigsetops.3:160
7831 msgid "places the intersection of the sets I<left> and I<right> in I<dest>."
7832 msgstr ""
7833
7834 #. type: Plain text
7835 #: build/C/man3/sigsetops.3:165
7836 msgid "B<sigorset>()  and B<sigandset>()  return 0 on success, and -1 on failure."
7837 msgstr ""
7838
7839 #. type: Plain text
7840 #: build/C/man3/sigsetops.3:168
7841 msgid ""
7842 "These functions are nonstandard (a few other systems provide similar "
7843 "functions) and their use should be avoided in portable applications."
7844 msgstr ""
7845
7846 #. type: Plain text
7847 #: build/C/man3/sigsetops.3:173
7848 msgid "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2)"
7849 msgstr ""
7850
7851 #. type: TH
7852 #: build/C/man2/sigsuspend.2:29
7853 #, no-wrap
7854 msgid "SIGSUSPEND"
7855 msgstr ""
7856
7857 #. type: TH
7858 #: build/C/man2/sigsuspend.2:29
7859 #, no-wrap
7860 msgid "2008-08-29"
7861 msgstr ""
7862
7863 #. type: Plain text
7864 #: build/C/man2/sigsuspend.2:32
7865 msgid "sigsuspend - wait for a signal"
7866 msgstr ""
7867
7868 #. type: Plain text
7869 #: build/C/man2/sigsuspend.2:36
7870 msgid "B<int sigsuspend(const sigset_t *>I<mask>B<);>"
7871 msgstr ""
7872
7873 #. type: Plain text
7874 #: build/C/man2/sigsuspend.2:45
7875 msgid ""
7876 "B<sigsuspend>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
7877 "_POSIX_SOURCE"
7878 msgstr ""
7879
7880 #. type: Plain text
7881 #: build/C/man2/sigsuspend.2:53
7882 msgid ""
7883 "B<sigsuspend>()  temporarily replaces the signal mask of the calling process "
7884 "with the mask given by I<mask> and then suspends the process until delivery "
7885 "of a signal whose action is to invoke a signal handler or to terminate a "
7886 "process."
7887 msgstr ""
7888
7889 #. type: Plain text
7890 #: build/C/man2/sigsuspend.2:62
7891 msgid ""
7892 "If the signal terminates the process, then B<sigsuspend>()  does not "
7893 "return.  If the signal is caught, then B<sigsuspend>()  returns after the "
7894 "signal handler returns, and the signal mask is restored to the state before "
7895 "the call to B<sigsuspend>()."
7896 msgstr ""
7897
7898 #. type: Plain text
7899 #: build/C/man2/sigsuspend.2:70
7900 msgid ""
7901 "It is not possible to block B<SIGKILL> or B<SIGSTOP>; specifying these "
7902 "signals in I<mask>, has no effect on the process's signal mask."
7903 msgstr ""
7904
7905 #. type: Plain text
7906 #: build/C/man2/sigsuspend.2:74
7907 msgid "B<sigsuspend>()  always returns -1, normally with the error B<EINTR>."
7908 msgstr ""
7909
7910 #. type: Plain text
7911 #: build/C/man2/sigsuspend.2:79
7912 msgid ""
7913 "I<mask> points to memory which is not a valid part of the process address "
7914 "space."
7915 msgstr ""
7916
7917 #. type: Plain text
7918 #: build/C/man2/sigsuspend.2:82
7919 msgid "The call was interrupted by a signal."
7920 msgstr ""
7921
7922 #. type: Plain text
7923 #: build/C/man2/sigsuspend.2:102
7924 msgid ""
7925 "Normally, B<sigsuspend>()  is used in conjunction with B<sigprocmask>(2)  in "
7926 "order to prevent delivery of a signal during the execution of a critical "
7927 "code section.  The caller first blocks the signals with B<sigprocmask>(2).  "
7928 "When the critical code has completed, the caller then waits for the signals "
7929 "by calling B<sigsuspend>()  with the signal mask that was returned by "
7930 "B<sigprocmask>(2)  (in the I<oldset> argument)."
7931 msgstr ""
7932
7933 #. type: Plain text
7934 #: build/C/man2/sigsuspend.2:116
7935 msgid ""
7936 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
7937 "B<sigwaitinfo>(2), B<sigsetops>(3), B<sigwait>(3), B<signal>(7)"
7938 msgstr ""
7939
7940 #. type: TH
7941 #: build/C/man3/sigvec.3:26
7942 #, no-wrap
7943 msgid "SIGVEC"
7944 msgstr ""
7945
7946 #. type: TH
7947 #: build/C/man3/sigvec.3:26
7948 #, no-wrap
7949 msgid "2012-09-06"
7950 msgstr ""
7951
7952 #. type: Plain text
7953 #: build/C/man3/sigvec.3:29
7954 msgid "sigvec, sigblock, sigsetmask, siggetmask, sigmask - BSD signal API"
7955 msgstr ""
7956
7957 #. type: Plain text
7958 #: build/C/man3/sigvec.3:33
7959 msgid ""
7960 "B<int sigvec(int >I<sig>B<, struct sigvec *>I<vec>B<, struct sigvec "
7961 "*>I<ovec>B<);>"
7962 msgstr ""
7963
7964 #. type: Plain text
7965 #: build/C/man3/sigvec.3:35
7966 msgid "B<int sigmask(int >I<signum>B<);>"
7967 msgstr ""
7968
7969 #. type: Plain text
7970 #: build/C/man3/sigvec.3:37
7971 msgid "B<int sigblock(int >I<mask>B<);>"
7972 msgstr ""
7973
7974 #. type: Plain text
7975 #: build/C/man3/sigvec.3:39
7976 msgid "B<int sigsetmask(int >I<mask>B<);>"
7977 msgstr ""
7978
7979 #. type: Plain text
7980 #: build/C/man3/sigvec.3:41
7981 msgid "B<int siggetmask(void);>"
7982 msgstr ""
7983
7984 #. type: Plain text
7985 #: build/C/man3/sigvec.3:49
7986 msgid "All functions shown above: _BSD_SOURCE"
7987 msgstr ""
7988
7989 #. type: Plain text
7990 #: build/C/man3/sigvec.3:56
7991 msgid ""
7992 "These functions are provided in glibc as a compatibility interface for "
7993 "programs that make use of the historical BSD signal API.  This API is "
7994 "obsolete: new applications should use the POSIX signal API (B<sigaction>(2), "
7995 "B<sigprocmask>(2), etc.)."
7996 msgstr ""
7997
7998 #. type: Plain text
7999 #: build/C/man3/sigvec.3:81
8000 msgid ""
8001 "The B<sigvec>()  function sets and/or gets the disposition of the signal "
8002 "I<sig> (like the POSIX B<sigaction>(2)).  If I<vec> is not NULL, it points "
8003 "to a I<sigvec> structure that defines the new disposition for I<sig>.  If "
8004 "I<ovec> is not NULL, it points to a I<sigvec> structure that is used to "
8005 "return the previous disposition of I<sig>.  To obtain the current "
8006 "disposition of I<sig> without changing it, specify NULL for I<vec>, and a "
8007 "non-NULL pointer for I<ovec>."
8008 msgstr ""
8009
8010 #. type: Plain text
8011 #: build/C/man3/sigvec.3:91
8012 msgid "The I<sigvec> structure has the following form:"
8013 msgstr ""
8014
8015 #. type: Plain text
8016 #: build/C/man3/sigvec.3:99
8017 #, no-wrap
8018 msgid ""
8019 "struct sigvec {\n"
8020 "    void (*sv_handler)(int); /* Signal disposition */\n"
8021 "    int    sv_mask;          /* Signals to be blocked in handler */\n"
8022 "    int    sv_flags;         /* Flags */\n"
8023 "};\n"
8024 msgstr ""
8025
8026 #. type: Plain text
8027 #: build/C/man3/sigvec.3:110
8028 msgid ""
8029 "The I<sv_handler> field specifies the disposition of the signal, and is "
8030 "either: the address of a signal handler function; B<SIG_DFL>, meaning the "
8031 "default disposition applies for the signal; or B<SIG_IGN>, meaning that the "
8032 "signal is ignored."
8033 msgstr ""
8034
8035 #. type: Plain text
8036 #: build/C/man3/sigvec.3:124
8037 msgid ""
8038 "If I<sv_handler> specifies the address of a signal handler, then I<sv_mask> "
8039 "specifies a mask of signals that are to be blocked while the handler is "
8040 "executing.  In addition, the signal for which the handler is invoked is also "
8041 "blocked.  Attempts to block B<SIGKILL> or B<SIGSTOP> are silently ignored."
8042 msgstr ""
8043
8044 #. type: Plain text
8045 #: build/C/man3/sigvec.3:131
8046 msgid ""
8047 "If I<sv_handler> specifies the address of a signal handler, then the "
8048 "I<sv_flags> field specifies flags controlling what happens when the handler "
8049 "is called.  This field may contain zero or more of the following flags:"
8050 msgstr ""
8051
8052 #. type: TP
8053 #: build/C/man3/sigvec.3:131
8054 #, no-wrap
8055 msgid "B<SV_INTERRUPT>"
8056 msgstr ""
8057
8058 #. type: Plain text
8059 #: build/C/man3/sigvec.3:139
8060 msgid ""
8061 "If the signal handler interrupts a blocking system call, then upon return "
8062 "from the handler the system call will not be restarted: instead it will fail "
8063 "with the error B<EINTR>.  If this flag is not specified, then system calls "
8064 "are restarted by default."
8065 msgstr ""
8066
8067 #. type: TP
8068 #: build/C/man3/sigvec.3:139
8069 #, no-wrap
8070 msgid "B<SV_RESETHAND>"
8071 msgstr ""
8072
8073 #. type: Plain text
8074 #: build/C/man3/sigvec.3:148
8075 msgid ""
8076 "Reset the disposition of the signal to the default before calling the signal "
8077 "handler.  If this flag is not specified, then the handler remains "
8078 "established until explicitly removed by a later call to B<sigvec>()  or "
8079 "until the process performs an B<execve>(2)."
8080 msgstr ""
8081
8082 #. type: TP
8083 #: build/C/man3/sigvec.3:148
8084 #, no-wrap
8085 msgid "B<SV_ONSTACK>"
8086 msgstr ""
8087
8088 #. type: Plain text
8089 #: build/C/man3/sigvec.3:155
8090 msgid ""
8091 "Handle the signal on the alternate signal stack (historically established "
8092 "under BSD using the obsolete B<sigstack>()  function; the POSIX replacement "
8093 "is B<sigaltstack>(2))."
8094 msgstr ""
8095
8096 #. type: Plain text
8097 #: build/C/man3/sigvec.3:165
8098 msgid ""
8099 "The B<sigmask>()  function constructs and returns a \"signal mask\" for "
8100 "I<signum>.  For example, we can initialize the I<vec.sv_mask> field given to "
8101 "B<sigvec>()  using code such as the following:"
8102 msgstr ""
8103
8104 #. type: Plain text
8105 #: build/C/man3/sigvec.3:170
8106 #, no-wrap
8107 msgid ""
8108 "    vec.sv_mask = sigmask(SIGQUIT) | sigpause(SIGABRT);\n"
8109 "                /* Block SIGQUIT and SIGABRT during\n"
8110 "                   handler execution */\n"
8111 msgstr ""
8112
8113 #. type: Plain text
8114 #: build/C/man3/sigvec.3:185
8115 msgid ""
8116 "The B<sigblock>()  function adds the signals in I<mask> to the process's "
8117 "signal mask (like POSIX I<sigprocmask(SIG_BLOCK)>), and returns the "
8118 "process's previous signal mask.  Attempts to block B<SIGKILL> or B<SIGSTOP> "
8119 "are silently ignored."
8120 msgstr ""
8121
8122 #. type: Plain text
8123 #: build/C/man3/sigvec.3:193
8124 msgid ""
8125 "The B<sigsetmask>()  function sets the process's signal mask to the value "
8126 "given in I<mask> (like POSIX I<sigprocmask(SIG_SETMASK)>), and returns the "
8127 "process's previous signal mask."
8128 msgstr ""
8129
8130 #. type: Plain text
8131 #: build/C/man3/sigvec.3:199
8132 msgid ""
8133 "The B<siggetmask>()  function returns the process's current signal mask.  "
8134 "This call is equivalent to I<sigblock(0)>."
8135 msgstr ""
8136
8137 #. type: Plain text
8138 #: build/C/man3/sigvec.3:205
8139 msgid ""
8140 "The B<sigvec>()  function returns 0 on success; on error, it returns -1 and "
8141 "sets I<errno> to indicate the error."
8142 msgstr ""
8143
8144 #. type: Plain text
8145 #: build/C/man3/sigvec.3:211
8146 msgid ""
8147 "The B<sigblock>()  and B<sigsetmask>()  functions return the previous signal "
8148 "mask."
8149 msgstr ""
8150
8151 #. type: Plain text
8152 #: build/C/man3/sigvec.3:216
8153 msgid "The B<sigmask>()  function returns the signal mask for I<signum>."
8154 msgstr ""
8155
8156 #. type: Plain text
8157 #: build/C/man3/sigvec.3:221
8158 msgid "See the ERRORS under B<sigaction>(2)  and B<sigprocmask>(2)."
8159 msgstr ""
8160
8161 #. type: Plain text
8162 #: build/C/man3/sigvec.3:227
8163 msgid ""
8164 "All of these functions were in 4.3BSD, except B<siggetmask>(), whose origin "
8165 "is unclear.  These functions are obsolete: do not use them in new programs."
8166 msgstr ""
8167
8168 #. type: Plain text
8169 #: build/C/man3/sigvec.3:244
8170 msgid ""
8171 "On 4.3BSD, the B<signal>()  function provided reliable semantics (as when "
8172 "calling B<sigvec>()  with I<vec.sv_mask> equal to 0).  On System V, "
8173 "B<signal>()  provides unreliable semantics.  POSIX.1-2001 leaves these "
8174 "aspects of B<signal>()  unspecified.  See B<signal>(2)  for further details."
8175 msgstr ""
8176
8177 #. type: Plain text
8178 #: build/C/man3/sigvec.3:262
8179 msgid ""
8180 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
8181 "B<raise>(3), B<sigpause>(3), B<sigset>(3), B<signal>(7)"
8182 msgstr ""
8183
8184 #. type: TH
8185 #: build/C/man3/sigwait.3:26
8186 #, no-wrap
8187 msgid "SIGWAIT"
8188 msgstr ""
8189
8190 #. type: TH
8191 #: build/C/man3/sigwait.3:26 build/C/man2/sigwaitinfo.2:25
8192 #, no-wrap
8193 msgid "2012-07-21"
8194 msgstr ""
8195
8196 #. type: Plain text
8197 #: build/C/man3/sigwait.3:29
8198 msgid "sigwait - wait for a signal"
8199 msgstr ""
8200
8201 #. type: Plain text
8202 #: build/C/man3/sigwait.3:34
8203 #, no-wrap
8204 msgid "B< int sigwait(const sigset_t *>I<set>B<, int *>I<sig>B<);>\n"
8205 msgstr ""
8206
8207 #. type: Plain text
8208 #: build/C/man3/sigwait.3:44
8209 msgid "B<sigwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
8210 msgstr ""
8211
8212 #. type: Plain text
8213 #: build/C/man3/sigwait.3:56
8214 msgid ""
8215 "The B<sigwait>()  function suspends execution of the calling thread until "
8216 "one of the signals specified in the signal set I<set> becomes pending.  The "
8217 "function accepts the signal (removes it from the pending list of signals), "
8218 "and returns the signal number in I<sig>."
8219 msgstr ""
8220
8221 #. type: Plain text
8222 #: build/C/man3/sigwait.3:62
8223 msgid ""
8224 "The operation of B<sigwait>()  is the same as B<sigwaitinfo>(2), except "
8225 "that:"
8226 msgstr ""
8227
8228 #. type: Plain text
8229 #: build/C/man3/sigwait.3:67
8230 msgid ""
8231 "B<sigwait>()  only returns the signal number, rather than a I<siginfo_t> "
8232 "structure describing the signal."
8233 msgstr ""
8234
8235 #. type: Plain text
8236 #: build/C/man3/sigwait.3:69
8237 msgid "The return values of the two functions are different."
8238 msgstr ""
8239
8240 #. type: Plain text
8241 #: build/C/man3/sigwait.3:74
8242 msgid ""
8243 "On success, B<sigwait>()  returns 0.  On error, it returns a positive error "
8244 "number (listed in ERRORS)."
8245 msgstr ""
8246
8247 #.  Does not occur for glibc.
8248 #. type: Plain text
8249 #: build/C/man3/sigwait.3:80
8250 msgid "I<set> contains an invalid signal number."
8251 msgstr ""
8252
8253 #. type: Plain text
8254 #: build/C/man3/sigwait.3:86
8255 msgid "B<sigwait>()  is implemented using B<sigtimedwait>(2)."
8256 msgstr ""
8257
8258 #. type: Plain text
8259 #: build/C/man3/sigwait.3:89
8260 msgid "See B<pthread_sigmask>(3)."
8261 msgstr ""
8262
8263 #. type: Plain text
8264 #: build/C/man3/sigwait.3:97
8265 msgid ""
8266 "B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigsuspend>(2), "
8267 "B<sigwaitinfo>(2), B<sigsetops>(3), B<signal>(7)"
8268 msgstr ""
8269
8270 #. type: TH
8271 #: build/C/man2/sigwaitinfo.2:25
8272 #, no-wrap
8273 msgid "SIGWAITINFO"
8274 msgstr ""
8275
8276 #. type: Plain text
8277 #: build/C/man2/sigwaitinfo.2:28
8278 msgid "sigwaitinfo, sigtimedwait - synchronously wait for queued signals"
8279 msgstr ""
8280
8281 #. type: Plain text
8282 #: build/C/man2/sigwaitinfo.2:33
8283 #, no-wrap
8284 msgid "B<int sigwaitinfo(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<);>\n"
8285 msgstr ""
8286
8287 #. type: Plain text
8288 #: build/C/man2/sigwaitinfo.2:36
8289 #, no-wrap
8290 msgid ""
8291 "B<int sigtimedwait(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<, >\n"
8292 "B<                 const struct timespec *>I<timeout>B<);>\n"
8293 msgstr ""
8294
8295 #. type: Plain text
8296 #: build/C/man2/sigwaitinfo.2:46
8297 msgid "B<sigwaitinfo>(), B<sigtimedwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8298 msgstr ""
8299
8300 #. type: Plain text
8301 #: build/C/man2/sigwaitinfo.2:56
8302 msgid ""
8303 "B<sigwaitinfo>()  suspends execution of the calling thread until one of the "
8304 "signals in I<set> is pending (If one of the signals in I<set> is already "
8305 "pending for the calling thread, B<sigwaitinfo>()  will return immediately.)"
8306 msgstr ""
8307
8308 #. type: Plain text
8309 #: build/C/man2/sigwaitinfo.2:68
8310 msgid ""
8311 "B<sigwaitinfo>()  removes the signal from the set of pending signals and "
8312 "returns the signal number as its function result.  If the I<info> argument "
8313 "is not NULL, then the buffer that it points to is used to return a structure "
8314 "of type I<siginfo_t> (see B<sigaction>(2))  containing information about the "
8315 "signal."
8316 msgstr ""
8317
8318 #. type: Plain text
8319 #: build/C/man2/sigwaitinfo.2:76
8320 msgid ""
8321 "If multiple signals in I<set> are pending for the caller, the signal that is "
8322 "retrieved by B<sigwaitinfo>()  is determined according to the usual ordering "
8323 "rules; see B<signal>(7)  for further details."
8324 msgstr ""
8325
8326 #. type: Plain text
8327 #: build/C/man2/sigwaitinfo.2:88
8328 msgid ""
8329 "B<sigtimedwait>()  operates in exactly the same way as B<sigwaitinfo>()  "
8330 "except that it has an additional argument, I<timeout>, which specifies a "
8331 "minimum interval for which the thread is suspended waiting for a signal.  "
8332 "(This interval will be rounded up to the system clock granularity, and "
8333 "kernel scheduling delays mean that the interval may overrun by a small "
8334 "amount.)  This argument is of the following type:"
8335 msgstr ""
8336
8337 #. type: Plain text
8338 #: build/C/man2/sigwaitinfo.2:95
8339 #, no-wrap
8340 msgid ""
8341 "struct timespec {\n"
8342 "    long    tv_sec;         /* seconds */\n"
8343 "    long    tv_nsec;        /* nanoseconds */\n"
8344 "}\n"
8345 msgstr ""
8346
8347 #. type: Plain text
8348 #: build/C/man2/sigwaitinfo.2:105
8349 msgid ""
8350 "If both fields of this structure are specified as 0, a poll is performed: "
8351 "B<sigtimedwait>()  returns immediately, either with information about a "
8352 "signal that was pending for the caller, or with an error if none of the "
8353 "signals in I<set> was pending."
8354 msgstr ""
8355
8356 #. type: Plain text
8357 #: build/C/man2/sigwaitinfo.2:114
8358 msgid ""
8359 "On success, both B<sigwaitinfo>()  and B<sigtimedwait>()  return a signal "
8360 "number (i.e., a value greater than zero).  On failure both calls return -1, "
8361 "with I<errno> set to indicate the error."
8362 msgstr ""
8363
8364 #. type: Plain text
8365 #: build/C/man2/sigwaitinfo.2:123
8366 msgid ""
8367 "No signal in I<set> was became pending within the I<timeout> period "
8368 "specified to B<sigtimedwait>()."
8369 msgstr ""
8370
8371 #. type: Plain text
8372 #: build/C/man2/sigwaitinfo.2:129
8373 msgid ""
8374 "The wait was interrupted by a signal handler; see B<signal>(7).  (This "
8375 "handler was for a signal other than one of those in I<set>.)"
8376 msgstr ""
8377
8378 #. type: Plain text
8379 #: build/C/man2/sigwaitinfo.2:133
8380 msgid "I<timeout> was invalid."
8381 msgstr ""
8382
8383 #. type: Plain text
8384 #: build/C/man2/sigwaitinfo.2:153
8385 msgid ""
8386 "In normal usage, the calling program blocks the signals in I<set> via a "
8387 "prior call to B<sigprocmask>(2)  (so that the default disposition for these "
8388 "signals does not occur if they become pending between successive calls to "
8389 "B<sigwaitinfo>()  or B<sigtimedwait>())  and does not establish handlers for "
8390 "these signals.  In a multithreaded program, the signal should be blocked in "
8391 "all threads, in order to prevent the signal being treated according to its "
8392 "default disposition in a thread other than the one calling B<sigwaitinfo>()  "
8393 "or B<sigtimedwait>())."
8394 msgstr ""
8395
8396 #. type: Plain text
8397 #: build/C/man2/sigwaitinfo.2:158
8398 msgid ""
8399 "The set of signals that is pending for a given thread is the union of the "
8400 "set of signals that is pending specifically for that thread and the set of "
8401 "signals that is pending for the process as a whole (see B<signal>(7))."
8402 msgstr ""
8403
8404 #. type: Plain text
8405 #: build/C/man2/sigwaitinfo.2:164
8406 msgid "Attempts to wait for B<SIGKILL> and B<SIGSTOP> are silently ignored."
8407 msgstr ""
8408
8409 #. type: Plain text
8410 #: build/C/man2/sigwaitinfo.2:173
8411 msgid ""
8412 "If multiple threads of a process are blocked waiting for the same signal(s) "
8413 "in B<sigwaitinfo>()  or B<sigtimedwait>(), then exactly one of the threads "
8414 "will actually receive the signal if it becomes pending for the process as a "
8415 "whole; which of the threads receives the signal is indeterminate."
8416 msgstr ""
8417
8418 #. type: Plain text
8419 #: build/C/man2/sigwaitinfo.2:182
8420 msgid ""
8421 "POSIX leaves the meaning of a NULL value for the I<timeout> argument of "
8422 "B<sigtimedwait>()  unspecified, permitting the possibility that this has the "
8423 "same meaning as a call to B<sigwaitinfo>(), and indeed this is what is done "
8424 "on Linux."
8425 msgstr ""
8426
8427 #. type: Plain text
8428 #: build/C/man2/sigwaitinfo.2:187
8429 msgid ""
8430 "On Linux, B<sigwaitinfo>()  is a library function implemented on top of "
8431 "B<sigtimedwait>()."
8432 msgstr ""
8433
8434 #. type: Plain text
8435 #: build/C/man2/sigwaitinfo.2:199
8436 msgid ""
8437 "B<kill>(2), B<sigaction>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), "
8438 "B<sigprocmask>(2), B<sigqueue>(3), B<sigsetops>(3), B<sigwait>(3), "
8439 "B<signal>(7), B<time>(7)"
8440 msgstr ""
8441
8442 #. type: TH
8443 #: build/C/man3/sysv_signal.3:25
8444 #, no-wrap
8445 msgid "SYSV_SIGNAL"
8446 msgstr ""
8447
8448 #. type: TH
8449 #: build/C/man3/sysv_signal.3:25
8450 #, no-wrap
8451 msgid "2007-05-04"
8452 msgstr ""
8453
8454 #. type: Plain text
8455 #: build/C/man3/sysv_signal.3:28
8456 msgid "sysv_signal - signal handling with System V semantics"
8457 msgstr ""
8458
8459 #. type: Plain text
8460 #: build/C/man3/sysv_signal.3:30
8461 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
8462 msgstr ""
8463
8464 #. type: Plain text
8465 #: build/C/man3/sysv_signal.3:36
8466 msgid "B<sighandler_t sysv_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
8467 msgstr ""
8468
8469 #. type: Plain text
8470 #: build/C/man3/sysv_signal.3:41
8471 msgid ""
8472 "The B<sysv_signal>()  function takes the same arguments, and performs the "
8473 "same task, as B<signal>(2)."
8474 msgstr ""
8475
8476 #. type: Plain text
8477 #: build/C/man3/sysv_signal.3:51
8478 msgid ""
8479 "However B<sysv_signal>()  provides the System V unreliable signal semantics, "
8480 "that is: a) the disposition of the signal is reset to the default when the "
8481 "handler is invoked; b) delivery of further instances of the signal is not "
8482 "blocked while the signal handler is executing; and c) if the handler "
8483 "interrupts (certain) blocking system calls, then the system call is not "
8484 "automatically restarted."
8485 msgstr ""
8486
8487 #. type: Plain text
8488 #: build/C/man3/sysv_signal.3:57
8489 msgid ""
8490 "The B<sysv_signal>()  function returns the previous value of the signal "
8491 "handler, or B<SIG_ERR> on error."
8492 msgstr ""
8493
8494 #. type: Plain text
8495 #: build/C/man3/sysv_signal.3:62
8496 msgid "This function is nonstandard."
8497 msgstr ""
8498
8499 #. type: Plain text
8500 #: build/C/man3/sysv_signal.3:68
8501 msgid "Use of B<sysv_signal>()  should be avoided; use B<sigaction>(2)  instead."
8502 msgstr ""
8503
8504 #. type: Plain text
8505 #: build/C/man3/sysv_signal.3:79
8506 msgid ""
8507 "On older Linux systems, B<sysv_signal>()  and B<signal>(2)  were "
8508 "equivalent.  But on newer systems, B<signal>(2)  provides reliable signal "
8509 "semantics; see B<signal>(2)  for details."
8510 msgstr ""
8511
8512 #. type: Plain text
8513 #: build/C/man3/sysv_signal.3:92
8514 msgid "B<sigaction>(2), B<signal>(2), B<bsd_signal>(3), B<signal>(7)"
8515 msgstr ""
8516
8517 #. type: TH
8518 #: build/C/man2/timer_create.2:31
8519 #, no-wrap
8520 msgid "TIMER_CREATE"
8521 msgstr ""
8522
8523 #. type: TH
8524 #: build/C/man2/timer_create.2:31
8525 #, no-wrap
8526 msgid "2010-09-27"
8527 msgstr ""
8528
8529 #. type: Plain text
8530 #: build/C/man2/timer_create.2:34
8531 msgid "timer_create - create a POSIX per-process timer"
8532 msgstr ""
8533
8534 #. type: Plain text
8535 #: build/C/man2/timer_create.2:38
8536 #, no-wrap
8537 msgid ""
8538 "B<#include E<lt>signal.hE<gt>>\n"
8539 "B<#include E<lt>time.hE<gt>>\n"
8540 msgstr ""
8541
8542 #. type: Plain text
8543 #: build/C/man2/timer_create.2:41
8544 #, no-wrap
8545 msgid ""
8546 "B<int timer_create(clockid_t >I<clockid>B<, struct sigevent *>I<sevp>B<,>\n"
8547 "B<                 timer_t *>I<timerid>B<);>\n"
8548 msgstr ""
8549
8550 #. type: Plain text
8551 #: 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
8552 msgid "Link with I<-lrt>."
8553 msgstr ""
8554
8555 #. type: Plain text
8556 #: build/C/man2/timer_create.2:52
8557 msgid "B<timer_create>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8558 msgstr ""
8559
8560 #. type: Plain text
8561 #: build/C/man2/timer_create.2:60
8562 msgid ""
8563 "B<timer_create>()  creates a new per-process interval timer.  The ID of the "
8564 "new timer is returned in the buffer pointed to by I<timerid>, which must be "
8565 "a non-NULL pointer.  This ID is unique within the process, until the timer "
8566 "is deleted.  The new timer is initially disarmed."
8567 msgstr ""
8568
8569 #. type: Plain text
8570 #: build/C/man2/timer_create.2:65
8571 msgid ""
8572 "The I<clockid> argument specifies the clock that the new timer uses to "
8573 "measure time.  It can be specified as one of the following values:"
8574 msgstr ""
8575
8576 #. type: TP
8577 #: build/C/man2/timer_create.2:65
8578 #, no-wrap
8579 msgid "B<CLOCK_REALTIME>"
8580 msgstr ""
8581
8582 #. type: Plain text
8583 #: build/C/man2/timer_create.2:68
8584 msgid "A settable system-wide real-time clock."
8585 msgstr ""
8586
8587 #. type: TP
8588 #: build/C/man2/timer_create.2:68
8589 #, no-wrap
8590 msgid "B<CLOCK_MONOTONIC>"
8591 msgstr ""
8592
8593 #.  Note: the CLOCK_MONOTONIC_RAW clock added for clock_gettime()
8594 #.  in 2.6.28 is not supported for POSIX timers -- mtk, Feb 2009
8595 #. type: Plain text
8596 #: build/C/man2/timer_create.2:75
8597 msgid ""
8598 "A nonsettable monotonically increasing clock that measures time from some "
8599 "unspecified point in the past that does not change after system startup."
8600 msgstr ""
8601
8602 #. type: TP
8603 #: build/C/man2/timer_create.2:75
8604 #, no-wrap
8605 msgid "B<CLOCK_PROCESS_CPUTIME_ID> (since Linux 2.6.12)"
8606 msgstr ""
8607
8608 #. type: Plain text
8609 #: build/C/man2/timer_create.2:79
8610 msgid ""
8611 "A clock that measures (user and system) CPU time consumed by (all of the "
8612 "threads in) the calling process."
8613 msgstr ""
8614
8615 #. type: TP
8616 #: build/C/man2/timer_create.2:79
8617 #, no-wrap
8618 msgid "B<CLOCK_THREAD_CPUTIME_ID> (since Linux 2.6.12)"
8619 msgstr ""
8620
8621 #.  The CLOCK_MONOTONIC_RAW that was added in 2.6.28 can't be used
8622 #.  to create a timer -- mtk, Feb 2009
8623 #. type: Plain text
8624 #: build/C/man2/timer_create.2:85
8625 msgid ""
8626 "A clock that measures (user and system) CPU time consumed by the calling "
8627 "thread."
8628 msgstr ""
8629
8630 #. type: Plain text
8631 #: build/C/man2/timer_create.2:94
8632 msgid ""
8633 "As well as the above values, I<clockid> can be specified as the I<clockid> "
8634 "returned by a call to B<clock_getcpuclockid>(3)  or "
8635 "B<pthread_getcpuclockid>(3)."
8636 msgstr ""
8637
8638 #. type: Plain text
8639 #: build/C/man2/timer_create.2:103
8640 msgid ""
8641 "The I<sevp> argument points to a I<sigevent> structure that specifies how "
8642 "the caller should be notified when the timer expires.  For the definition "
8643 "and general details of this structure, see B<sigevent>(7)."
8644 msgstr ""
8645
8646 #. type: Plain text
8647 #: build/C/man2/timer_create.2:107
8648 msgid "The I<sevp.sigev_notify> field can have the following values:"
8649 msgstr ""
8650
8651 #. type: Plain text
8652 #: build/C/man2/timer_create.2:112
8653 msgid ""
8654 "Don't asynchronously notify when the timer expires.  Progress of the timer "
8655 "can be monitored using B<timer_gettime>(2)."
8656 msgstr ""
8657
8658 #. type: Plain text
8659 #: build/C/man2/timer_create.2:130
8660 msgid ""
8661 "Upon timer expiration, generate the signal I<sigev_signo> for the process.  "
8662 "See B<sigevent>(7)  for general details.  The I<si_code> field of the "
8663 "I<siginfo_t> structure will be set to B<SI_TIMER>.  At any point in time, at "
8664 "most one signal is queued to the process for a given timer; see "
8665 "B<timer_getoverrun>(2)  for more details."
8666 msgstr ""
8667
8668 #. type: Plain text
8669 #: build/C/man2/timer_create.2:138
8670 msgid ""
8671 "Upon timer expiration, invoke I<sigev_notify_function> as if it were the "
8672 "start function of a new thread.  See B<sigevent>(7)  for details."
8673 msgstr ""
8674
8675 #. type: Plain text
8676 #: build/C/man2/timer_create.2:152
8677 msgid ""
8678 "As for B<SIGEV_SIGNAL>, but the signal is targeted at the thread whose ID is "
8679 "given in I<sigev_notify_thread_id>, which must be a thread in the same "
8680 "process as the caller.  The I<sigev_notify_thread_id> field specifies a "
8681 "kernel thread ID, that is, the value returned by B<clone>(2)  or "
8682 "B<gettid>(2).  This flag is only intended for use by threading libraries."
8683 msgstr ""
8684
8685 #. type: Plain text
8686 #: build/C/man2/timer_create.2:167
8687 msgid ""
8688 "Specifying I<sevp> as NULL is equivalent to specifying a pointer to a "
8689 "I<sigevent> structure in which I<sigev_notify> is B<SIGEV_SIGNAL>, "
8690 "I<sigev_signo> is B<SIGALRM>, and I<sigev_value.sival_int> is the timer ID."
8691 msgstr ""
8692
8693 #. type: Plain text
8694 #: build/C/man2/timer_create.2:175
8695 msgid ""
8696 "On success, B<timer_create>()  returns 0, and the ID of the new timer is "
8697 "placed in I<*timerid>.  On failure, -1 is returned, and I<errno> is set to "
8698 "indicate the error."
8699 msgstr ""
8700
8701 #. type: Plain text
8702 #: build/C/man2/timer_create.2:179
8703 msgid "Temporary error during kernel allocation of timer structures."
8704 msgstr ""
8705
8706 #. type: Plain text
8707 #: build/C/man2/timer_create.2:187
8708 msgid ""
8709 "Clock ID, I<sigev_notify>, I<sigev_signo>, or I<sigev_notify_thread_id> is "
8710 "invalid."
8711 msgstr ""
8712
8713 #.  glibc layer: malloc()
8714 #. type: Plain text
8715 #: build/C/man2/timer_create.2:191
8716 msgid "Could not allocate memory."
8717 msgstr ""
8718
8719 #. type: Plain text
8720 #: build/C/man2/timer_create.2:193 build/C/man2/timer_delete.2:67 build/C/man2/timer_getoverrun.2:97
8721 msgid "This system call is available since Linux 2.6."
8722 msgstr ""
8723
8724 #. type: Plain text
8725 #: build/C/man2/timer_create.2:198
8726 msgid "A program may create multiple interval timers using B<timer_create>()."
8727 msgstr ""
8728
8729 #. type: Plain text
8730 #: build/C/man2/timer_create.2:203
8731 msgid ""
8732 "Timers are not inherited by the child of a B<fork>(2), and are disarmed and "
8733 "deleted during an B<execve>(2)."
8734 msgstr ""
8735
8736 #. type: Plain text
8737 #: build/C/man2/timer_create.2:211
8738 msgid ""
8739 "The kernel preallocates a \"queued real-time signal\" for each timer created "
8740 "using B<timer_create>().  Consequently, the number of timers is limited by "
8741 "the B<RLIMIT_SIGPENDING> resource limit (see B<setrlimit>(2))."
8742 msgstr ""
8743
8744 #. type: Plain text
8745 #: build/C/man2/timer_create.2:216
8746 msgid ""
8747 "The timers created by B<timer_create>()  are commonly known as \"POSIX "
8748 "(interval) timers\".  The POSIX timers API consists of the following "
8749 "interfaces:"
8750 msgstr ""
8751
8752 #. type: Plain text
8753 #: build/C/man2/timer_create.2:219
8754 msgid "B<timer_create>(): Create a timer."
8755 msgstr ""
8756
8757 #. type: Plain text
8758 #: build/C/man2/timer_create.2:222
8759 msgid "B<timer_settime>(2): Arm (start) or disarm (stop) a timer."
8760 msgstr ""
8761
8762 #. type: Plain text
8763 #: build/C/man2/timer_create.2:226
8764 msgid ""
8765 "B<timer_gettime>(2): Fetch the time remaining until the next expiration of a "
8766 "timer, along with the interval setting of the timer."
8767 msgstr ""
8768
8769 #. type: Plain text
8770 #: build/C/man2/timer_create.2:229
8771 msgid ""
8772 "B<timer_getoverrun>(2): Return the overrun count for the last timer "
8773 "expiration."
8774 msgstr ""
8775
8776 #. type: Plain text
8777 #: build/C/man2/timer_create.2:232
8778 msgid "B<timer_delete>(2): Disarm and delete a timer."
8779 msgstr ""
8780
8781 #. type: Plain text
8782 #: build/C/man2/timer_create.2:235
8783 msgid ""
8784 "Part of the implementation of the POSIX timers API is provided by glibc.  In "
8785 "particular:"
8786 msgstr ""
8787
8788 #. type: Plain text
8789 #: build/C/man2/timer_create.2:239
8790 msgid ""
8791 "The functionality for B<SIGEV_THREAD> is implemented within glibc, rather "
8792 "than the kernel."
8793 msgstr ""
8794
8795 #.  See the glibc source file kernel-posix-timers.h for the structure
8796 #.  that glibc uses to map user-space timer IDs to kernel timer IDs
8797 #.  The kernel-level timer ID is exposed via siginfo.si_tid.
8798 #. type: Plain text
8799 #: build/C/man2/timer_create.2:245
8800 msgid ""
8801 "The timer IDs presented at user level are maintained by glibc, which maps "
8802 "these IDs to the timer IDs employed by the kernel."
8803 msgstr ""
8804
8805 #. type: Plain text
8806 #: build/C/man2/timer_create.2:253
8807 msgid ""
8808 "The POSIX timers system calls first appeared in Linux 2.6.  Prior to this, "
8809 "glibc provided an incomplete user-space implementation (B<CLOCK_REALTIME> "
8810 "timers only) using POSIX threads, and current glibc falls back to this "
8811 "implementation on systems running pre-2.6 Linux kernels."
8812 msgstr ""
8813
8814 #. type: Plain text
8815 #: build/C/man2/timer_create.2:265
8816 msgid ""
8817 "The program below takes two arguments: a sleep period in seconds, and a "
8818 "timer frequency in nanoseconds.  The program establishes a handler for the "
8819 "signal it uses for the timer, blocks that signal, creates and arms a timer "
8820 "that expires with the given frequency, sleeps for the specified number of "
8821 "seconds, and then unblocks the timer signal.  Assuming that the timer "
8822 "expired at least once while the program slept, the signal handler will be "
8823 "invoked, and the handler displays some information about the timer "
8824 "notification.  The program terminates after one invocation of the signal "
8825 "handler."
8826 msgstr ""
8827
8828 #. type: Plain text
8829 #: build/C/man2/timer_create.2:270
8830 msgid ""
8831 "In the following example run, the program sleeps for 1 second, after "
8832 "creating a timer that has a frequency of 100 nanoseconds.  By the time the "
8833 "signal is unblocked and delivered, there have been around ten million "
8834 "overruns."
8835 msgstr ""
8836
8837 #. type: Plain text
8838 #: build/C/man2/timer_create.2:282
8839 #, no-wrap
8840 msgid ""
8841 "$ B<./a.out 1 100>\n"
8842 "Establishing handler for signal 34\n"
8843 "Blocking signal 34\n"
8844 "timer ID is 0x804c008\n"
8845 "Sleeping for 1 seconds\n"
8846 "Unblocking signal 34\n"
8847 "Caught signal 34\n"
8848 "    sival_ptr = 0xbfb174f4;     *sival_ptr = 0x804c008\n"
8849 "    overrun count = 10004886\n"
8850 msgstr ""
8851
8852 #. type: Plain text
8853 #: build/C/man2/timer_create.2:292
8854 #, no-wrap
8855 msgid ""
8856 "#include E<lt>stdlib.hE<gt>\n"
8857 "#include E<lt>unistd.hE<gt>\n"
8858 "#include E<lt>stdio.hE<gt>\n"
8859 "#include E<lt>signal.hE<gt>\n"
8860 "#include E<lt>time.hE<gt>\n"
8861 msgstr ""
8862
8863 #. type: Plain text
8864 #: build/C/man2/timer_create.2:295
8865 #, no-wrap
8866 msgid ""
8867 "#define CLOCKID CLOCK_REALTIME\n"
8868 "#define SIG SIGRTMIN\n"
8869 msgstr ""
8870
8871 #. type: Plain text
8872 #: build/C/man2/timer_create.2:298
8873 #, no-wrap
8874 msgid ""
8875 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
8876 "                        } while (0)\n"
8877 msgstr ""
8878
8879 #. type: Plain text
8880 #: build/C/man2/timer_create.2:304
8881 #, no-wrap
8882 msgid ""
8883 "static void\n"
8884 "print_siginfo(siginfo_t *si)\n"
8885 "{\n"
8886 "    timer_t *tidp;\n"
8887 "    int or;\n"
8888 msgstr ""
8889
8890 #. type: Plain text
8891 #: build/C/man2/timer_create.2:306
8892 #, no-wrap
8893 msgid "    tidp = si-E<gt>si_value.sival_ptr;\n"
8894 msgstr ""
8895
8896 #. type: Plain text
8897 #: build/C/man2/timer_create.2:309
8898 #, no-wrap
8899 msgid ""
8900 "    printf(\"    sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n"
8901 "    printf(\"    *sival_ptr = 0x%lx\\en\", (long) *tidp);\n"
8902 msgstr ""
8903
8904 #. type: Plain text
8905 #: build/C/man2/timer_create.2:316
8906 #, no-wrap
8907 msgid ""
8908 "    or = timer_getoverrun(*tidp);\n"
8909 "    if (or == -1)\n"
8910 "        errExit(\"timer_getoverrun\");\n"
8911 "    else\n"
8912 "        printf(\"    overrun count = %d\\en\", or);\n"
8913 "}\n"
8914 msgstr ""
8915
8916 #. type: Plain text
8917 #: build/C/man2/timer_create.2:323
8918 #, no-wrap
8919 msgid ""
8920 "static void\n"
8921 "handler(int sig, siginfo_t *si, void *uc)\n"
8922 "{\n"
8923 "    /* Note: calling printf() from a signal handler is not\n"
8924 "       strictly correct, since printf() is not async-signal-safe;\n"
8925 "       see signal(7) */\n"
8926 msgstr ""
8927
8928 #. type: Plain text
8929 #: build/C/man2/timer_create.2:328
8930 #, no-wrap
8931 msgid ""
8932 "    printf(\"Caught signal %d\\en\", sig);\n"
8933 "    print_siginfo(si);\n"
8934 "    signal(sig, SIG_IGN);\n"
8935 "}\n"
8936 msgstr ""
8937
8938 #. type: Plain text
8939 #: build/C/man2/timer_create.2:338
8940 #, no-wrap
8941 msgid ""
8942 "int\n"
8943 "main(int argc, char *argv[])\n"
8944 "{\n"
8945 "    timer_t timerid;\n"
8946 "    struct sigevent sev;\n"
8947 "    struct itimerspec its;\n"
8948 "    long long freq_nanosecs;\n"
8949 "    sigset_t mask;\n"
8950 "    struct sigaction sa;\n"
8951 msgstr ""
8952
8953 #. type: Plain text
8954 #: build/C/man2/timer_create.2:344
8955 #, no-wrap
8956 msgid ""
8957 "    if (argc != 3) {\n"
8958 "        fprintf(stderr, \"Usage: %s E<lt>sleep-secsE<gt> "
8959 "E<lt>freq-nanosecsE<gt>\\en\",\n"
8960 "                argv[0]);\n"
8961 "        exit(EXIT_FAILURE);\n"
8962 "    }\n"
8963 msgstr ""
8964
8965 #. type: Plain text
8966 #: build/C/man2/timer_create.2:346
8967 #, no-wrap
8968 msgid "    /* Establish handler for timer signal */\n"
8969 msgstr ""
8970
8971 #. type: Plain text
8972 #: build/C/man2/timer_create.2:353
8973 #, no-wrap
8974 msgid ""
8975 "    printf(\"Establishing handler for signal %d\\en\", SIG);\n"
8976 "    sa.sa_flags = SA_SIGINFO;\n"
8977 "    sa.sa_sigaction = handler;\n"
8978 "    sigemptyset(&sa.sa_mask);\n"
8979 "    if (sigaction(SIG, &sa, NULL) == -1)\n"
8980 "        errExit(\"sigaction\");\n"
8981 msgstr ""
8982
8983 #. type: Plain text
8984 #: build/C/man2/timer_create.2:355
8985 #, no-wrap
8986 msgid "    /* Block timer signal temporarily */\n"
8987 msgstr ""
8988
8989 #. type: Plain text
8990 #: build/C/man2/timer_create.2:361
8991 #, no-wrap
8992 msgid ""
8993 "    printf(\"Blocking signal %d\\en\", SIG);\n"
8994 "    sigemptyset(&mask);\n"
8995 "    sigaddset(&mask, SIG);\n"
8996 "    if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n"
8997 "        errExit(\"sigprocmask\");\n"
8998 msgstr ""
8999
9000 #. type: Plain text
9001 #: build/C/man2/timer_create.2:363
9002 #, no-wrap
9003 msgid "    /* Create the timer */\n"
9004 msgstr ""
9005
9006 #. type: Plain text
9007 #: build/C/man2/timer_create.2:369
9008 #, no-wrap
9009 msgid ""
9010 "    sev.sigev_notify = SIGEV_SIGNAL;\n"
9011 "    sev.sigev_signo = SIG;\n"
9012 "    sev.sigev_value.sival_ptr = &timerid;\n"
9013 "    if (timer_create(CLOCKID, &sev, &timerid) == -1)\n"
9014 "        errExit(\"timer_create\");\n"
9015 msgstr ""
9016
9017 #. type: Plain text
9018 #: build/C/man2/timer_create.2:371
9019 #, no-wrap
9020 msgid "    printf(\"timer ID is 0x%lx\\en\", (long) timerid);\n"
9021 msgstr ""
9022
9023 #. type: Plain text
9024 #: build/C/man2/timer_create.2:373
9025 #, no-wrap
9026 msgid "    /* Start the timer */\n"
9027 msgstr ""
9028
9029 #. type: Plain text
9030 #: build/C/man2/timer_create.2:379
9031 #, no-wrap
9032 msgid ""
9033 "    freq_nanosecs = atoll(argv[2]);\n"
9034 "    its.it_value.tv_sec = freq_nanosecs / 1000000000;\n"
9035 "    its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n"
9036 "    its.it_interval.tv_sec = its.it_value.tv_sec;\n"
9037 "    its.it_interval.tv_nsec = its.it_value.tv_nsec;\n"
9038 msgstr ""
9039
9040 #. type: Plain text
9041 #: build/C/man2/timer_create.2:382
9042 #, no-wrap
9043 msgid ""
9044 "    if (timer_settime(timerid, 0, &its, NULL) == -1)\n"
9045 "         errExit(\"timer_settime\");\n"
9046 msgstr ""
9047
9048 #. type: Plain text
9049 #: build/C/man2/timer_create.2:385
9050 #, no-wrap
9051 msgid ""
9052 "    /* Sleep for a while; meanwhile, the timer may expire\n"
9053 "       multiple times */\n"
9054 msgstr ""
9055
9056 #. type: Plain text
9057 #: build/C/man2/timer_create.2:388
9058 #, no-wrap
9059 msgid ""
9060 "    printf(\"Sleeping for %d seconds\\en\", atoi(argv[1]));\n"
9061 "    sleep(atoi(argv[1]));\n"
9062 msgstr ""
9063
9064 #. type: Plain text
9065 #: build/C/man2/timer_create.2:391
9066 #, no-wrap
9067 msgid ""
9068 "    /* Unlock the timer signal, so that timer notification\n"
9069 "       can be delivered */\n"
9070 msgstr ""
9071
9072 #. type: Plain text
9073 #: build/C/man2/timer_create.2:395
9074 #, no-wrap
9075 msgid ""
9076 "    printf(\"Unblocking signal %d\\en\", SIG);\n"
9077 "    if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n"
9078 "        errExit(\"sigprocmask\");\n"
9079 msgstr ""
9080
9081 #. type: Plain text
9082 #: build/C/man2/timer_create.2:398 build/C/man2/timerfd_create.2:540
9083 #, no-wrap
9084 msgid ""
9085 "    exit(EXIT_SUCCESS);\n"
9086 "}\n"
9087 msgstr ""
9088
9089 #. type: Plain text
9090 #: build/C/man2/timer_create.2:414
9091 msgid ""
9092 "B<clock_gettime>(2), B<setitimer>(2), B<timer_delete>(2), "
9093 "B<timer_getoverrun>(2), B<timer_settime>(2), B<timerfd_create>(2), "
9094 "B<clock_getcpuclockid>(3), B<pthread_getcpuclockid>(3), B<pthreads>(7), "
9095 "B<sigevent>(7), B<signal>(7), B<time>(7)"
9096 msgstr ""
9097
9098 #. type: TH
9099 #: build/C/man2/timer_delete.2:26
9100 #, no-wrap
9101 msgid "TIMER_DELETE"
9102 msgstr ""
9103
9104 #. type: TH
9105 #: build/C/man2/timer_delete.2:26 build/C/man2/timer_getoverrun.2:26
9106 #, no-wrap
9107 msgid "2009-02-20"
9108 msgstr ""
9109
9110 #. type: Plain text
9111 #: build/C/man2/timer_delete.2:29
9112 msgid "timer_delete - delete a POSIX per-process timer"
9113 msgstr ""
9114
9115 #. type: Plain text
9116 #: build/C/man2/timer_delete.2:32 build/C/man2/timer_getoverrun.2:32 build/C/man2/timer_settime.2:33
9117 #, no-wrap
9118 msgid "B<#include E<lt>time.hE<gt>>\n"
9119 msgstr ""
9120
9121 #. type: Plain text
9122 #: build/C/man2/timer_delete.2:34
9123 #, no-wrap
9124 msgid "B<int timer_delete(timer_t >I<timerid>B<);>\n"
9125 msgstr ""
9126
9127 #. type: Plain text
9128 #: build/C/man2/timer_delete.2:45
9129 msgid "B<timer_delete>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
9130 msgstr ""
9131
9132 #. type: Plain text
9133 #: build/C/man2/timer_delete.2:53
9134 msgid ""
9135 "B<timer_delete>()  deletes the timer whose ID is given in I<timerid>.  If "
9136 "the timer was armed at the time of this call, it is disarmed before being "
9137 "deleted.  The treatment of any pending signal generated by the deleted timer "
9138 "is unspecified."
9139 msgstr ""
9140
9141 #. type: Plain text
9142 #: build/C/man2/timer_delete.2:60
9143 msgid ""
9144 "On success, B<timer_delete>()  returns 0.  On failure, -1 is returned, and "
9145 "I<errno> is set to indicate the error."
9146 msgstr ""
9147
9148 #. type: Plain text
9149 #: build/C/man2/timer_delete.2:65 build/C/man2/timer_getoverrun.2:95
9150 msgid "I<timerid> is not a valid timer ID."
9151 msgstr ""
9152
9153 #. type: Plain text
9154 #: build/C/man2/timer_delete.2:75
9155 msgid ""
9156 "B<clock_gettime>(2), B<timer_create>(2), B<timer_getoverrun>(2), "
9157 "B<timer_settime>(2), B<time>(7)"
9158 msgstr ""
9159
9160 #. type: TH
9161 #: build/C/man2/timer_getoverrun.2:26
9162 #, no-wrap
9163 msgid "TIMER_GETOVERRUN"
9164 msgstr ""
9165
9166 #. type: Plain text
9167 #: build/C/man2/timer_getoverrun.2:29
9168 msgid "timer_getoverrun - get overrun count for a POSIX per-process timer"
9169 msgstr ""
9170
9171 #. type: Plain text
9172 #: build/C/man2/timer_getoverrun.2:34
9173 #, no-wrap
9174 msgid "B<int timer_getoverrun(timer_t >I<timerid>B<);>\n"
9175 msgstr ""
9176
9177 #. type: Plain text
9178 #: build/C/man2/timer_getoverrun.2:45
9179 msgid "B<timer_getoverrun>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
9180 msgstr ""
9181
9182 #. type: Plain text
9183 #: build/C/man2/timer_getoverrun.2:56
9184 msgid ""
9185 "B<timer_getoverrun>()  returns the \"overrun count\" for the timer referred "
9186 "to by I<timerid>.  An application can use the overrun count to accurately "
9187 "calculate the number of timer expirations that would have occurred over a "
9188 "given time interval.  Timer overruns can occur both when receiving "
9189 "expiration notifications via signals (B<SIGEV_SIGNAL>), and via threads "
9190 "(B<SIGEV_THREAD>)."
9191 msgstr ""
9192
9193 #. type: Plain text
9194 #: build/C/man2/timer_getoverrun.2:76
9195 msgid ""
9196 "When expiration notifications are delivered via a signal, overruns can occur "
9197 "as follows.  Regardless of whether or not a real-time signal is used for "
9198 "timer notifications, the system queues at most one signal per timer.  (This "
9199 "is the behavior specified by POSIX.1-2001.  The alternative, queuing one "
9200 "signal for each timer expiration, could easily result in overflowing the "
9201 "allowed limits for queued signals on the system.)  Because of system "
9202 "scheduling delays, or because the signal may be temporarily blocked, there "
9203 "can be a delay between the time when the notification signal is generated "
9204 "and the time when it is delivered (e.g., caught by a signal handler) or "
9205 "accepted (e.g., using B<sigwaitinfo>(2)).  In this interval, further timer "
9206 "expirations may occur.  The timer overrun count is the number of additional "
9207 "timer expirations that occurred between the time when the signal was "
9208 "generated and when it was delivered or accepted."
9209 msgstr ""
9210
9211 #. type: Plain text
9212 #: build/C/man2/timer_getoverrun.2:82
9213 msgid ""
9214 "Timer overruns can also occur when expiration notifications are delivered "
9215 "via invocation of a thread, since there may be an arbitrary delay between an "
9216 "expiration of the timer and the invocation of the notification thread, and "
9217 "in that delay interval, additional timer expirations may occur"
9218 msgstr ""
9219
9220 #. type: Plain text
9221 #: build/C/man2/timer_getoverrun.2:90
9222 msgid ""
9223 "On success, B<timer_getoverrun>()  returns the overrun count of the "
9224 "specified timer; this count may be 0 if no overruns have occurred.  On "
9225 "failure, -1 is returned, and I<errno> is set to indicate the error."
9226 msgstr ""
9227
9228 #. type: Plain text
9229 #: build/C/man2/timer_getoverrun.2:111
9230 msgid ""
9231 "When timer notifications are delivered via signals (B<SIGEV_SIGNAL>), on "
9232 "Linux it is also possible to obtain the overrun count via the I<si_overrun> "
9233 "field of the I<siginfo_t> structure (see B<sigaction>(2)).  This allows an "
9234 "application to avoid the overhead of making a system call to obtain the "
9235 "overrun count, but is a nonportable extension to POSIX.1-2001."
9236 msgstr ""
9237
9238 #.  FIXME . Austin bug filed, 11 Feb 09
9239 #. type: Plain text
9240 #: build/C/man2/timer_getoverrun.2:115
9241 msgid ""
9242 "POSIX.1-2001 only discusses timer overruns in the context of timer "
9243 "notifications using signals."
9244 msgstr ""
9245
9246 #.  Bug filed: http://bugzilla.kernel.org/show_bug.cgi?id=12665
9247 #.  http://thread.gmane.org/gmane.linux.kernel/113276/
9248 #. type: Plain text
9249 #: build/C/man2/timer_getoverrun.2:128
9250 msgid ""
9251 "POSIX.1-2001 specifies that if the timer overrun count is equal to or "
9252 "greater than an implementation-defined maximum, B<DELAYTIMER_MAX>, then "
9253 "B<timer_getoverrun>()  should return B<DELAYTIMER_MAX>.  However, Linux does "
9254 "not implement this feature: instead, if the timer overrun value exceeds the "
9255 "maximum representable integer, the counter cycles, starting once more from "
9256 "low values."
9257 msgstr ""
9258
9259 #. type: Plain text
9260 #: build/C/man2/timer_getoverrun.2:131 build/C/man2/timer_settime.2:212
9261 msgid "See B<timer_create>(2)."
9262 msgstr ""
9263
9264 #. type: Plain text
9265 #: build/C/man2/timer_getoverrun.2:141
9266 msgid ""
9267 "B<clock_gettime>(2), B<sigaction>(2), B<signalfd>(2), B<sigwaitinfo>(2), "
9268 "B<timer_create>(2), B<timer_delete>(2), B<timer_settime>(2), B<signal>(7), "
9269 "B<time>(7)"
9270 msgstr ""
9271
9272 #. type: TH
9273 #: build/C/man2/timer_settime.2:26
9274 #, no-wrap
9275 msgid "TIMER_SETTIME"
9276 msgstr ""
9277
9278 #. type: TH
9279 #: build/C/man2/timer_settime.2:26
9280 #, no-wrap
9281 msgid "2012-10-15"
9282 msgstr ""
9283
9284 #. type: Plain text
9285 #: build/C/man2/timer_settime.2:30
9286 msgid ""
9287 "timer_settime, timer_gettime - arm/disarm and fetch state of POSIX "
9288 "per-process timer"
9289 msgstr ""
9290
9291 #. type: Plain text
9292 #: build/C/man2/timer_settime.2:38
9293 #, no-wrap
9294 msgid ""
9295 "B<int timer_settime(timer_t >I<timerid>B<, int >I<flags>B<,>\n"
9296 "B<                  const struct itimerspec *>I<new_value>B<,>\n"
9297 "B<                  struct itimerspec * >I<old_value>B<);>\n"
9298 "B<int timer_gettime(timer_t >I<timerid>B<, struct itimerspec "
9299 "*>I<curr_value>B<);>\n"
9300 msgstr ""
9301
9302 #. type: Plain text
9303 #: build/C/man2/timer_settime.2:50
9304 msgid "B<timer_settime>(), B<timer_gettime>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
9305 msgstr ""
9306
9307 #. type: Plain text
9308 #: build/C/man2/timer_settime.2:63
9309 msgid ""
9310 "B<timer_settime>()  arms or disarms the timer identified by I<timerid>.  The "
9311 "I<new_value> argument is pointer to an I<itimerspec> structure that "
9312 "specifies the new initial value and the new interval for the timer.  The "
9313 "I<itimerspec> structure is defined as follows:"
9314 msgstr ""
9315
9316 #. type: Plain text
9317 #: build/C/man2/timer_settime.2:70 build/C/man2/timerfd_create.2:128
9318 #, no-wrap
9319 msgid ""
9320 "struct timespec {\n"
9321 "    time_t tv_sec;                /* Seconds */\n"
9322 "    long   tv_nsec;               /* Nanoseconds */\n"
9323 "};\n"
9324 msgstr ""
9325
9326 #. type: Plain text
9327 #: build/C/man2/timer_settime.2:75
9328 #, no-wrap
9329 msgid ""
9330 "struct itimerspec {\n"
9331 "    struct timespec it_interval;  /* Timer interval */\n"
9332 "    struct timespec it_value;     /* Initial expiration */\n"
9333 "};\n"
9334 msgstr ""
9335
9336 #. type: Plain text
9337 #: build/C/man2/timer_settime.2:87
9338 msgid ""
9339 "Each of the substructures of the I<itimerspec> structure is a I<timespec> "
9340 "structure that allows a time value to be specified in seconds and "
9341 "nanoseconds.  These time values are measured according to the clock that was "
9342 "specified when the timer was created by B<timer_create>(2)"
9343 msgstr ""
9344
9345 #. type: Plain text
9346 #: build/C/man2/timer_settime.2:101
9347 msgid ""
9348 "If I<new_value-E<gt>it_value> specifies a nonzero value (i.e., either "
9349 "subfield is nonzero), then B<timer_settime>()  arms (starts) the timer, "
9350 "setting it to initially expire at the given time.  (If the timer was already "
9351 "armed, then the previous settings are overwritten.)  If "
9352 "I<new_value-E<gt>it_value> specifies a zero value (i.e., both subfields are "
9353 "zero), then the timer is disarmed."
9354 msgstr ""
9355
9356 #. type: Plain text
9357 #: build/C/man2/timer_settime.2:113
9358 msgid ""
9359 "The I<new_value-E<gt>it_interval> field specifies the period of the timer, "
9360 "in seconds and nanoseconds.  If this field is nonzero, then each time that "
9361 "an armed timer expires, the timer is reloaded from the value specified in "
9362 "I<new_value-E<gt>it_interval>.  If I<new_value-E<gt>it_interval> specifies a "
9363 "zero value then the timer expires just once, at the time specified by "
9364 "I<it_value>."
9365 msgstr ""
9366
9367 #.  By experiment: the overrun count is set correctly, for CLOCK_REALTIME.
9368 #. type: Plain text
9369 #: build/C/man2/timer_settime.2:134
9370 msgid ""
9371 "By default, the initial expiration time specified in "
9372 "I<new_value-E<gt>it_value> is interpreted relative to the current time on "
9373 "the timer's clock at the time of the call.  This can be modified by "
9374 "specifying B<TIMER_ABSTIME> in I<flags>, in which case "
9375 "I<new_value-E<gt>it_value> is interpreted as an absolute value as measured "
9376 "on the timer's clock; that is, the timer will expire when the clock value "
9377 "reaches the value specified by I<new_value-E<gt>it_value>.  If the specified "
9378 "absolute time has already passed, then the timer expires immediately, and "
9379 "the overrun count (see B<timer_getoverrun>(2))  will be set correctly."
9380 msgstr ""
9381
9382 #.  Similar remarks might apply with respect to process and thread CPU time
9383 #.  clocks, but these clocks are not currently (2.6.28) settable on Linux.
9384 #. type: Plain text
9385 #: build/C/man2/timer_settime.2:144
9386 msgid ""
9387 "If the value of the B<CLOCK_REALTIME> clock is adjusted while an absolute "
9388 "timer based on that clock is armed, then the expiration of the timer will be "
9389 "appropriately adjusted.  Adjustments to the B<CLOCK_REALTIME> clock have no "
9390 "effect on relative timers based on that clock."
9391 msgstr ""
9392
9393 #. type: Plain text
9394 #: build/C/man2/timer_settime.2:153
9395 msgid ""
9396 "If I<old_value> is not NULL, then it points to a buffer that is used to "
9397 "return the previous interval of the timer (in I<old_value-E<gt>it_interval>)  "
9398 "and the amount of time until the timer would previously have next expired "
9399 "(in I<old_value-E<gt>it_value>)."
9400 msgstr ""
9401
9402 #. type: Plain text
9403 #: build/C/man2/timer_settime.2:173
9404 msgid ""
9405 "B<timer_gettime>()  returns the time until next expiration, and the "
9406 "interval, for the timer specified by I<timerid>, in the buffer pointed to by "
9407 "I<curr_value>.  The time remaining until the next timer expiration is "
9408 "returned in I<curr_value-E<gt>it_value>; this is always a relative value, "
9409 "regardless of whether the B<TIMER_ABSTIME> flag was used when arming the "
9410 "timer.  If the value returned in I<curr_value-E<gt>it_value> is zero, then "
9411 "the timer is currently disarmed.  The timer interval is returned in "
9412 "I<curr_value-E<gt>it_interval>.  If the value returned in "
9413 "I<curr_value-E<gt>it_interval> is zero, then this is a \"one-shot\" timer."
9414 msgstr ""
9415
9416 #. type: Plain text
9417 #: build/C/man2/timer_settime.2:182
9418 msgid ""
9419 "On success, B<timer_settime>()  and B<timer_gettime>()  return 0.  On error, "
9420 "-1 is returned, and I<errno> is set to indicate the error."
9421 msgstr ""
9422
9423 #. type: Plain text
9424 #: build/C/man2/timer_settime.2:184
9425 msgid "These functions may fail with the following errors:"
9426 msgstr ""
9427
9428 #. type: Plain text
9429 #: build/C/man2/timer_settime.2:191
9430 msgid "I<new_value>, I<old_value>, or I<curr_value> is not a valid pointer."
9431 msgstr ""
9432
9433 #.  FIXME . eventually: invalid value in flags
9434 #. type: Plain text
9435 #: build/C/man2/timer_settime.2:196
9436 msgid "I<timerid> is invalid."
9437 msgstr ""
9438
9439 #. type: Plain text
9440 #: build/C/man2/timer_settime.2:199
9441 msgid "B<timer_settime>()  may fail with the following errors:"
9442 msgstr ""
9443
9444 #. type: Plain text
9445 #: build/C/man2/timer_settime.2:205
9446 msgid ""
9447 "I<new_value.it_value> is negative; or I<new_value.it_value.tv_nsec> is "
9448 "negative or greater than 999,999,999."
9449 msgstr ""
9450
9451 #. type: Plain text
9452 #: build/C/man2/timer_settime.2:207
9453 msgid "These system calls are available since Linux 2.6."
9454 msgstr ""
9455
9456 #. type: Plain text
9457 #: build/C/man2/timer_settime.2:216
9458 msgid "B<timer_create>(2), B<timer_getoverrun>(2), B<time>(7)"
9459 msgstr ""
9460
9461 #. type: TH
9462 #: build/C/man2/timerfd_create.2:21
9463 #, no-wrap
9464 msgid "TIMERFD_CREATE"
9465 msgstr ""
9466
9467 #. type: TH
9468 #: build/C/man2/timerfd_create.2:21
9469 #, no-wrap
9470 msgid "2011-09-14"
9471 msgstr ""
9472
9473 #. type: Plain text
9474 #: build/C/man2/timerfd_create.2:25
9475 msgid ""
9476 "timerfd_create, timerfd_settime, timerfd_gettime - timers that notify via "
9477 "file descriptors"
9478 msgstr ""
9479
9480 #. type: Plain text
9481 #: build/C/man2/timerfd_create.2:28
9482 #, no-wrap
9483 msgid "B<#include E<lt>sys/timerfd.hE<gt>>\n"
9484 msgstr ""
9485
9486 #. type: Plain text
9487 #: build/C/man2/timerfd_create.2:30
9488 #, no-wrap
9489 msgid "B<int timerfd_create(int >I<clockid>B<, int >I<flags>B<);>\n"
9490 msgstr ""
9491
9492 #. type: Plain text
9493 #: build/C/man2/timerfd_create.2:34
9494 #, no-wrap
9495 msgid ""
9496 "B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n"
9497 "B<                    const struct itimerspec *>I<new_value>B<,>\n"
9498 "B<                    struct itimerspec *>I<old_value>B<);>\n"
9499 msgstr ""
9500
9501 #. type: Plain text
9502 #: build/C/man2/timerfd_create.2:36
9503 #, no-wrap
9504 msgid "B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n"
9505 msgstr ""
9506
9507 #. type: Plain text
9508 #: build/C/man2/timerfd_create.2:49
9509 msgid ""
9510 "These system calls create and operate on a timer that delivers timer "
9511 "expiration notifications via a file descriptor.  They provide an alternative "
9512 "to the use of B<setitimer>(2)  or B<timer_create>(2), with the advantage "
9513 "that the file descriptor may be monitored by B<select>(2), B<poll>(2), and "
9514 "B<epoll>(7)."
9515 msgstr ""
9516
9517 #. type: Plain text
9518 #: build/C/man2/timerfd_create.2:61
9519 msgid ""
9520 "The use of these three system calls is analogous to the use of "
9521 "B<timer_create>(2), B<timer_settime>(2), and B<timer_gettime>(2).  (There is "
9522 "no analog of B<timer_getoverrun>(2), since that functionality is provided by "
9523 "B<read>(2), as described below.)"
9524 msgstr ""
9525
9526 #. type: SS
9527 #: build/C/man2/timerfd_create.2:61
9528 #, no-wrap
9529 msgid "timerfd_create()"
9530 msgstr ""
9531
9532 #. type: Plain text
9533 #: build/C/man2/timerfd_create.2:80
9534 msgid ""
9535 "B<timerfd_create>()  creates a new timer object, and returns a file "
9536 "descriptor that refers to that timer.  The I<clockid> argument specifies the "
9537 "clock that is used to mark the progress of the timer, and must be either "
9538 "B<CLOCK_REALTIME> or B<CLOCK_MONOTONIC>.  B<CLOCK_REALTIME> is a settable "
9539 "system-wide clock.  B<CLOCK_MONOTONIC> is a nonsettable clock that is not "
9540 "affected by discontinuous changes in the system clock (e.g., manual changes "
9541 "to system time).  The current value of each of these clocks can be retrieved "
9542 "using B<clock_gettime>(2)."
9543 msgstr ""
9544
9545 #. type: Plain text
9546 #: build/C/man2/timerfd_create.2:85
9547 msgid ""
9548 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
9549 "I<flags> to change the behavior of B<timerfd_create>():"
9550 msgstr ""
9551
9552 #. type: TP
9553 #: build/C/man2/timerfd_create.2:85
9554 #, no-wrap
9555 msgid "B<TFD_NONBLOCK>"
9556 msgstr ""
9557
9558 #. type: TP
9559 #: build/C/man2/timerfd_create.2:93
9560 #, no-wrap
9561 msgid "B<TFD_CLOEXEC>"
9562 msgstr ""
9563
9564 #. type: Plain text
9565 #: build/C/man2/timerfd_create.2:107
9566 msgid ""
9567 "In Linux versions up to and including 2.6.26, I<flags> must be specified as "
9568 "zero."
9569 msgstr ""
9570
9571 #. type: SS
9572 #: build/C/man2/timerfd_create.2:107
9573 #, no-wrap
9574 msgid "timerfd_settime()"
9575 msgstr ""
9576
9577 #. type: Plain text
9578 #: build/C/man2/timerfd_create.2:112
9579 msgid ""
9580 "B<timerfd_settime>()  arms (starts) or disarms (stops)  the timer referred "
9581 "to by the file descriptor I<fd>."
9582 msgstr ""
9583
9584 #. type: Plain text
9585 #: build/C/man2/timerfd_create.2:121
9586 msgid ""
9587 "The I<new_value> argument specifies the initial expiration and interval for "
9588 "the timer.  The I<itimer> structure used for this argument contains two "
9589 "fields, each of which is in turn a structure of type I<timespec>:"
9590 msgstr ""
9591
9592 #. type: Plain text
9593 #: build/C/man2/timerfd_create.2:133
9594 #, no-wrap
9595 msgid ""
9596 "struct itimerspec {\n"
9597 "    struct timespec it_interval;  /* Interval for periodic timer */\n"
9598 "    struct timespec it_value;     /* Initial expiration */\n"
9599 "};\n"
9600 msgstr ""
9601
9602 #. type: Plain text
9603 #: build/C/man2/timerfd_create.2:145
9604 msgid ""
9605 "I<new_value.it_value> specifies the initial expiration of the timer, in "
9606 "seconds and nanoseconds.  Setting either field of I<new_value.it_value> to a "
9607 "nonzero value arms the timer.  Setting both fields of I<new_value.it_value> "
9608 "to zero disarms the timer."
9609 msgstr ""
9610
9611 #. type: Plain text
9612 #: build/C/man2/timerfd_create.2:154
9613 msgid ""
9614 "Setting one or both fields of I<new_value.it_interval> to nonzero values "
9615 "specifies the period, in seconds and nanoseconds, for repeated timer "
9616 "expirations after the initial expiration.  If both fields of "
9617 "I<new_value.it_interval> are zero, the timer expires just once, at the time "
9618 "specified by I<new_value.it_value>."
9619 msgstr ""
9620
9621 #. type: Plain text
9622 #: build/C/man2/timerfd_create.2:170
9623 msgid ""
9624 "The I<flags> argument is either 0, to start a relative timer "
9625 "(I<new_value.it_value> specifies a time relative to the current value of the "
9626 "clock specified by I<clockid>), or B<TFD_TIMER_ABSTIME>, to start an "
9627 "absolute timer (I<new_value.it_value> specifies an absolute time for the "
9628 "clock specified by I<clockid>; that is, the timer will expire when the value "
9629 "of that clock reaches the value specified in I<new_value.it_value>)."
9630 msgstr ""
9631
9632 #. type: Plain text
9633 #: build/C/man2/timerfd_create.2:181
9634 msgid ""
9635 "If the I<old_value> argument is not NULL, then the I<itimerspec> structure "
9636 "that it points to is used to return the setting of the timer that was "
9637 "current at the time of the call; see the description of B<timerfd_gettime>()  "
9638 "following."
9639 msgstr ""
9640
9641 #. type: SS
9642 #: build/C/man2/timerfd_create.2:181
9643 #, no-wrap
9644 msgid "timerfd_gettime()"
9645 msgstr ""
9646
9647 #. type: Plain text
9648 #: build/C/man2/timerfd_create.2:190
9649 msgid ""
9650 "B<timerfd_gettime>()  returns, in I<curr_value>, an I<itimerspec> structure "
9651 "that contains the current setting of the timer referred to by the file "
9652 "descriptor I<fd>."
9653 msgstr ""
9654
9655 #. type: Plain text
9656 #: build/C/man2/timerfd_create.2:200
9657 msgid ""
9658 "The I<it_value> field returns the amount of time until the timer will next "
9659 "expire.  If both fields of this structure are zero, then the timer is "
9660 "currently disarmed.  This field always contains a relative value, regardless "
9661 "of whether the B<TFD_TIMER_ABSTIME> flag was specified when setting the "
9662 "timer."
9663 msgstr ""
9664
9665 #. type: Plain text
9666 #: build/C/man2/timerfd_create.2:207
9667 msgid ""
9668 "The I<it_interval> field returns the interval of the timer.  If both fields "
9669 "of this structure are zero, then the timer is set to expire just once, at "
9670 "the time specified by I<curr_value.it_value>."
9671 msgstr ""
9672
9673 #. type: SS
9674 #: build/C/man2/timerfd_create.2:207
9675 #, no-wrap
9676 msgid "Operating on a timer file descriptor"
9677 msgstr ""
9678
9679 #. type: Plain text
9680 #: build/C/man2/timerfd_create.2:211
9681 msgid ""
9682 "The file descriptor returned by B<timerfd_create>()  supports the following "
9683 "operations:"
9684 msgstr ""
9685
9686 #. type: Plain text
9687 #: build/C/man2/timerfd_create.2:225
9688 msgid ""
9689 "If the timer has already expired one or more times since its settings were "
9690 "last modified using B<timerfd_settime>(), or since the last successful "
9691 "B<read>(2), then the buffer given to B<read>(2)  returns an unsigned 8-byte "
9692 "integer (I<uint64_t>)  containing the number of expirations that have "
9693 "occurred.  (The returned value is in host byte order, i.e., the native byte "
9694 "order for integers on the host machine.)"
9695 msgstr ""
9696
9697 #. type: Plain text
9698 #: build/C/man2/timerfd_create.2:238
9699 msgid ""
9700 "If no timer expirations have occurred at the time of the B<read>(2), then "
9701 "the call either blocks until the next timer expiration, or fails with the "
9702 "error B<EAGAIN> if the file descriptor has been made nonblocking (via the "
9703 "use of the B<fcntl>(2)  B<F_SETFL> operation to set the B<O_NONBLOCK> flag)."
9704 msgstr ""
9705
9706 #. type: Plain text
9707 #: build/C/man2/timerfd_create.2:244
9708 msgid ""
9709 "A B<read>(2)  will fail with the error B<EINVAL> if the size of the supplied "
9710 "buffer is less than 8 bytes."
9711 msgstr ""
9712
9713 #. type: Plain text
9714 #: build/C/man2/timerfd_create.2:255
9715 msgid ""
9716 "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the "
9717 "B<poll>(2)  B<POLLIN> flag)  if one or more timer expirations have occurred."
9718 msgstr ""
9719
9720 #. type: Plain text
9721 #: build/C/man2/timerfd_create.2:262
9722 msgid ""
9723 "The file descriptor also supports the other file-descriptor multiplexing "
9724 "APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
9725 msgstr ""
9726
9727 #. type: Plain text
9728 #: build/C/man2/timerfd_create.2:269
9729 msgid ""
9730 "When the file descriptor is no longer required it should be closed.  When "
9731 "all file descriptors associated with the same timer object have been closed, "
9732 "the timer is disarmed and its resources are freed by the kernel."
9733 msgstr ""
9734
9735 #. type: Plain text
9736 #: build/C/man2/timerfd_create.2:281
9737 msgid ""
9738 "After a B<fork>(2), the child inherits a copy of the file descriptor created "
9739 "by B<timerfd_create>().  The file descriptor refers to the same underlying "
9740 "timer object as the corresponding file descriptor in the parent, and "
9741 "B<read>(2)s in the child will return information about expirations of the "
9742 "timer."
9743 msgstr ""
9744
9745 #. type: Plain text
9746 #: build/C/man2/timerfd_create.2:287
9747 msgid ""
9748 "A file descriptor created by B<timerfd_create>()  is preserved across "
9749 "B<execve>(2), and continues to generate timer expirations if the timer was "
9750 "armed."
9751 msgstr ""
9752
9753 #. type: Plain text
9754 #: build/C/man2/timerfd_create.2:294
9755 msgid ""
9756 "On success, B<timerfd_create>()  returns a new file descriptor.  On error, "
9757 "-1 is returned and I<errno> is set to indicate the error."
9758 msgstr ""
9759
9760 #. type: Plain text
9761 #: build/C/man2/timerfd_create.2:302
9762 msgid ""
9763 "B<timerfd_settime>()  and B<timerfd_gettime>()  return 0 on success; on "
9764 "error they return -1, and set I<errno> to indicate the error."
9765 msgstr ""
9766
9767 #. type: Plain text
9768 #: build/C/man2/timerfd_create.2:305
9769 msgid "B<timerfd_create>()  can fail with the following errors:"
9770 msgstr ""
9771
9772 #. type: Plain text
9773 #: build/C/man2/timerfd_create.2:313
9774 msgid "The I<clockid> argument is neither B<CLOCK_MONOTONIC> nor B<CLOCK_REALTIME>;"
9775 msgstr ""
9776
9777 #. type: Plain text
9778 #: build/C/man2/timerfd_create.2:333
9779 msgid "There was insufficient kernel memory to create the timer."
9780 msgstr ""
9781
9782 #. type: Plain text
9783 #: build/C/man2/timerfd_create.2:338
9784 msgid ""
9785 "B<timerfd_settime>()  and B<timerfd_gettime>()  can fail with the following "
9786 "errors:"
9787 msgstr ""
9788
9789 #. type: Plain text
9790 #: build/C/man2/timerfd_create.2:342
9791 msgid "I<fd> is not a valid file descriptor."
9792 msgstr ""
9793
9794 #. type: Plain text
9795 #: build/C/man2/timerfd_create.2:353
9796 msgid "I<fd> is not a valid timerfd file descriptor."
9797 msgstr ""
9798
9799 #. type: Plain text
9800 #: build/C/man2/timerfd_create.2:356
9801 msgid "B<timerfd_settime>()  can also fail with the following errors:"
9802 msgstr ""
9803
9804 #. type: Plain text
9805 #: build/C/man2/timerfd_create.2:362
9806 msgid ""
9807 "I<new_value> is not properly initialized (one of the I<tv_nsec> falls "
9808 "outside the range zero to 999,999,999)."
9809 msgstr ""
9810
9811 #.  This case only checked since 2.6.29, and 2.2.2[78].some-stable-version.
9812 #.  In older kernel versions, no check was made for invalid flags.
9813 #. type: Plain text
9814 #: build/C/man2/timerfd_create.2:368
9815 msgid "I<flags> is invalid."
9816 msgstr ""
9817
9818 #. type: Plain text
9819 #: build/C/man2/timerfd_create.2:371
9820 msgid ""
9821 "These system calls are available on Linux since kernel 2.6.25.  Library "
9822 "support is provided by glibc since version 2.8."
9823 msgstr ""
9824
9825 #.  2.6.29
9826 #. type: Plain text
9827 #: build/C/man2/timerfd_create.2:379
9828 msgid ""
9829 "Currently, B<timerfd_create>()  supports fewer types of clock IDs than "
9830 "B<timer_create>(2)."
9831 msgstr ""
9832
9833 #. type: Plain text
9834 #: build/C/man2/timerfd_create.2:388
9835 msgid ""
9836 "The following program creates a timer and then monitors its progress.  The "
9837 "program accepts up to three command-line arguments.  The first argument "
9838 "specifies the number of seconds for the initial expiration of the timer.  "
9839 "The second argument specifies the interval for the timer, in seconds.  The "
9840 "third argument specifies the number of times the program should allow the "
9841 "timer to expire before terminating.  The second and third command-line "
9842 "arguments are optional."
9843 msgstr ""
9844
9845 #. type: Plain text
9846 #: build/C/man2/timerfd_create.2:390 build/C/man2/wait.2:555
9847 msgid "The following shell session demonstrates the use of the program:"
9848 msgstr ""
9849
9850 #. type: Plain text
9851 #: build/C/man2/timerfd_create.2:405
9852 #, no-wrap
9853 msgid ""
9854 "$B< a.out 3 1 100>\n"
9855 "0.000: timer started\n"
9856 "3.000: read: 1; total=1\n"
9857 "4.000: read: 1; total=2\n"
9858 "B<^Z >                 # type control-Z to suspend the program\n"
9859 "[1]+  Stopped                 ./timerfd3_demo 3 1 100\n"
9860 "$ B<fg>                # Resume execution after a few seconds\n"
9861 "a.out 3 1 100\n"
9862 "9.660: read: 5; total=7\n"
9863 "10.000: read: 1; total=8\n"
9864 "11.000: read: 1; total=9\n"
9865 "B<^C >                 # type control-C to suspend the program\n"
9866 msgstr ""
9867
9868 #.  The commented out code here is what we currently need until
9869 #.  the required stuff is in glibc
9870 #
9871 #
9872 #. /* Link with -lrt */
9873 #. #define _GNU_SOURCE
9874 #. #include <sys/syscall.h>
9875 #. #include <unistd.h>
9876 #. #include <time.h>
9877 #. #if defined(__i386__)
9878 #. #define __NR_timerfd_create 322
9879 #. #define __NR_timerfd_settime 325
9880 #. #define __NR_timerfd_gettime 326
9881 #. #endif
9882 #
9883 #. static int
9884 #. timerfd_create(int clockid, int flags)
9885 #. {
9886 #.     return syscall(__NR_timerfd_create, clockid, flags);
9887 #. }
9888 #
9889 #. static int
9890 #. timerfd_settime(int fd, int flags, struct itimerspec *new_value,
9891 #.         struct itimerspec *curr_value)
9892 #. {
9893 #.     return syscall(__NR_timerfd_settime, fd, flags, new_value,
9894 #.                    curr_value);
9895 #. }
9896 #
9897 #. static int
9898 #. timerfd_gettime(int fd, struct itimerspec *curr_value)
9899 #. {
9900 #.     return syscall(__NR_timerfd_gettime, fd, curr_value);
9901 #. }
9902 #
9903 #. #define TFD_TIMER_ABSTIME (1 << 0)
9904 #
9905 #. ////////////////////////////////////////////////////////////
9906 #. type: Plain text
9907 #: build/C/man2/timerfd_create.2:454
9908 #, no-wrap
9909 msgid ""
9910 "#include E<lt>sys/timerfd.hE<gt>\n"
9911 "#include E<lt>time.hE<gt>\n"
9912 "#include E<lt>unistd.hE<gt>\n"
9913 "#include E<lt>stdlib.hE<gt>\n"
9914 "#include E<lt>stdio.hE<gt>\n"
9915 "#include E<lt>stdint.hE<gt>        /* Definition of uint64_t */\n"
9916 msgstr ""
9917
9918 #. type: Plain text
9919 #: build/C/man2/timerfd_create.2:457
9920 #, no-wrap
9921 msgid ""
9922 "#define handle_error(msg) \\e\n"
9923 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
9924 msgstr ""
9925
9926 #. type: Plain text
9927 #: build/C/man2/timerfd_create.2:465
9928 #, no-wrap
9929 msgid ""
9930 "static void\n"
9931 "print_elapsed_time(void)\n"
9932 "{\n"
9933 "    static struct timespec start;\n"
9934 "    struct timespec curr;\n"
9935 "    static int first_call = 1;\n"
9936 "    int secs, nsecs;\n"
9937 msgstr ""
9938
9939 #. type: Plain text
9940 #: build/C/man2/timerfd_create.2:471
9941 #, no-wrap
9942 msgid ""
9943 "    if (first_call) {\n"
9944 "        first_call = 0;\n"
9945 "        if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
9946 "            handle_error(\"clock_gettime\");\n"
9947 "    }\n"
9948 msgstr ""
9949
9950 #. type: Plain text
9951 #: build/C/man2/timerfd_create.2:474
9952 #, no-wrap
9953 msgid ""
9954 "    if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
9955 "        handle_error(\"clock_gettime\");\n"
9956 msgstr ""
9957
9958 #. type: Plain text
9959 #: build/C/man2/timerfd_create.2:483
9960 #, no-wrap
9961 msgid ""
9962 "    secs = curr.tv_sec - start.tv_sec;\n"
9963 "    nsecs = curr.tv_nsec - start.tv_nsec;\n"
9964 "    if (nsecs E<lt> 0) {\n"
9965 "        secs--;\n"
9966 "        nsecs += 1000000000;\n"
9967 "    }\n"
9968 "    printf(\"%d.%03d: \", secs, (nsecs + 500000) / 1000000);\n"
9969 "}\n"
9970 msgstr ""
9971
9972 #. type: Plain text
9973 #: build/C/man2/timerfd_create.2:492
9974 #, no-wrap
9975 msgid ""
9976 "int\n"
9977 "main(int argc, char *argv[])\n"
9978 "{\n"
9979 "    struct itimerspec new_value;\n"
9980 "    int max_exp, fd;\n"
9981 "    struct timespec now;\n"
9982 "    uint64_t exp, tot_exp;\n"
9983 "    ssize_t s;\n"
9984 msgstr ""
9985
9986 #. type: Plain text
9987 #: build/C/man2/timerfd_create.2:498
9988 #, no-wrap
9989 msgid ""
9990 "    if ((argc != 2) && (argc != 4)) {\n"
9991 "        fprintf(stderr, \"%s init-secs [interval-secs max-exp]\\en\",\n"
9992 "                argv[0]);\n"
9993 "        exit(EXIT_FAILURE);\n"
9994 "    }\n"
9995 msgstr ""
9996
9997 #. type: Plain text
9998 #: build/C/man2/timerfd_create.2:501
9999 #, no-wrap
10000 msgid ""
10001 "    if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
10002 "        handle_error(\"clock_gettime\");\n"
10003 msgstr ""
10004
10005 #. type: Plain text
10006 #: build/C/man2/timerfd_create.2:504
10007 #, no-wrap
10008 msgid ""
10009 "    /* Create a CLOCK_REALTIME absolute timer with initial\n"
10010 "       expiration and interval as specified in command line */\n"
10011 msgstr ""
10012
10013 #. type: Plain text
10014 #: build/C/man2/timerfd_create.2:515
10015 #, no-wrap
10016 msgid ""
10017 "    new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
10018 "    new_value.it_value.tv_nsec = now.tv_nsec;\n"
10019 "    if (argc == 2) {\n"
10020 "        new_value.it_interval.tv_sec = 0;\n"
10021 "        max_exp = 1;\n"
10022 "    } else {\n"
10023 "        new_value.it_interval.tv_sec = atoi(argv[2]);\n"
10024 "        max_exp = atoi(argv[3]);\n"
10025 "    }\n"
10026 "    new_value.it_interval.tv_nsec = 0;\n"
10027 msgstr ""
10028
10029 #. type: Plain text
10030 #: build/C/man2/timerfd_create.2:519
10031 #, no-wrap
10032 msgid ""
10033 "    fd = timerfd_create(CLOCK_REALTIME, 0);\n"
10034 "    if (fd == -1)\n"
10035 "        handle_error(\"timerfd_create\");\n"
10036 msgstr ""
10037
10038 #. type: Plain text
10039 #: build/C/man2/timerfd_create.2:522
10040 #, no-wrap
10041 msgid ""
10042 "    if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
10043 "        handle_error(\"timerfd_settime\");\n"
10044 msgstr ""
10045
10046 #. type: Plain text
10047 #: build/C/man2/timerfd_create.2:525
10048 #, no-wrap
10049 msgid ""
10050 "    print_elapsed_time();\n"
10051 "    printf(\"timer started\\en\");\n"
10052 msgstr ""
10053
10054 #. type: Plain text
10055 #: build/C/man2/timerfd_create.2:530
10056 #, no-wrap
10057 msgid ""
10058 "    for (tot_exp = 0; tot_exp E<lt> max_exp;) {\n"
10059 "        s = read(fd, &exp, sizeof(uint64_t));\n"
10060 "        if (s != sizeof(uint64_t))\n"
10061 "            handle_error(\"read\");\n"
10062 msgstr ""
10063
10064 #. type: Plain text
10065 #: build/C/man2/timerfd_create.2:537
10066 #, no-wrap
10067 msgid ""
10068 "        tot_exp += exp;\n"
10069 "        print_elapsed_time();\n"
10070 "        printf(\"read: %llu; total=%llu\\en\",\n"
10071 "                (unsigned long long) exp,\n"
10072 "                (unsigned long long) tot_exp);\n"
10073 "    }\n"
10074 msgstr ""
10075
10076 #. type: Plain text
10077 #: build/C/man2/timerfd_create.2:553
10078 msgid ""
10079 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), "
10080 "B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), "
10081 "B<timer_settime>(2), B<epoll>(7), B<time>(7)"
10082 msgstr ""
10083
10084 #. type: TH
10085 #: build/C/man2/tkill.2:29
10086 #, no-wrap
10087 msgid "TKILL"
10088 msgstr ""
10089
10090 #. type: Plain text
10091 #: build/C/man2/tkill.2:32
10092 msgid "tkill, tgkill - send a signal to a thread"
10093 msgstr ""
10094
10095 #. type: Plain text
10096 #: build/C/man2/tkill.2:35
10097 #, no-wrap
10098 msgid "B<int tkill(int >I<tid>B<, int >I<sig>B<);>\n"
10099 msgstr ""
10100
10101 #. type: Plain text
10102 #: build/C/man2/tkill.2:37
10103 #, no-wrap
10104 msgid "B<int tgkill(int >I<tgid>B<, int >I<tid>B<, int >I<sig>B<);>\n"
10105 msgstr ""
10106
10107 #. type: Plain text
10108 #: build/C/man2/tkill.2:54
10109 msgid ""
10110 "B<tgkill>()  sends the signal I<sig> to the thread with the thread ID I<tid> "
10111 "in the thread group I<tgid>.  (By contrast, B<kill>(2)  can only be used to "
10112 "send a signal to a process (i.e., thread group)  as a whole, and the signal "
10113 "will be delivered to an arbitrary thread within that process.)"
10114 msgstr ""
10115
10116 #.  FIXME: Maybe say something about the following:
10117 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=12889
10118 #.      Rich Felker <bugdal@aerifal.cx>
10119 #.      There is a race condition in pthread_kill: it is possible that,
10120 #.      between the time pthread_kill reads the pid/tid from the target
10121 #.      thread descriptor and the time it makes the tgkill syscall,
10122 #.      the target thread terminates and the same tid gets assigned
10123 #.      to a new thread in the same process.
10124 #
10125 #.      (The tgkill syscall was designed to eliminate a similar race
10126 #.      condition in tkill, but it only succeeded in eliminating races
10127 #.      where the tid gets reused in a different process, and does not
10128 #.      help if the same tid gets assigned to a new thread in the
10129 #.      same process.)
10130 #
10131 #.      The only solution I can see is to introduce a mutex that ensures
10132 #.      that a thread cannot exit while pthread_kill is being called on it.
10133 #
10134 #.      Note that in most real-world situations, like almost all race
10135 #.      conditions, this one will be extremely rare. To make it
10136 #.      measurable, one could exhaust all but 1-2 available pid values,
10137 #.      possibly by lowering the max pid parameter in /proc, forcing
10138 #.      the same tid to be reused rapidly.
10139 #. type: Plain text
10140 #: build/C/man2/tkill.2:85
10141 msgid ""
10142 "B<tkill>()  is an obsolete predecessor to B<tgkill>().  It only allows the "
10143 "target thread ID to be specified, which may result in the wrong thread being "
10144 "signaled if a thread terminates and its thread ID is recycled.  Avoid using "
10145 "this system call."
10146 msgstr ""
10147
10148 #. type: Plain text
10149 #: build/C/man2/tkill.2:92
10150 msgid "If I<tgid> is specified as -1, B<tgkill>()  is equivalent to B<tkill>()."
10151 msgstr ""
10152
10153 #. type: Plain text
10154 #: build/C/man2/tkill.2:95
10155 msgid ""
10156 "These are the raw system call interfaces, meant for internal thread library "
10157 "use."
10158 msgstr ""
10159
10160 #. type: Plain text
10161 #: build/C/man2/tkill.2:103
10162 msgid "An invalid thread ID, thread group ID, or signal was specified."
10163 msgstr ""
10164
10165 #. type: Plain text
10166 #: build/C/man2/tkill.2:108
10167 msgid "Permission denied.  For the required permissions, see B<kill>(2)."
10168 msgstr ""
10169
10170 #. type: Plain text
10171 #: build/C/man2/tkill.2:111
10172 msgid "No process with the specified thread ID (and thread group ID) exists."
10173 msgstr ""
10174
10175 #. type: Plain text
10176 #: build/C/man2/tkill.2:116
10177 msgid ""
10178 "B<tkill>()  is supported since Linux 2.4.19 / 2.5.4.  B<tgkill>()  was added "
10179 "in Linux 2.5.75."
10180 msgstr ""
10181
10182 #. type: Plain text
10183 #: build/C/man2/tkill.2:122
10184 msgid ""
10185 "B<tkill>()  and B<tgkill>()  are Linux-specific and should not be used in "
10186 "programs that are intended to be portable."
10187 msgstr ""
10188
10189 #. type: Plain text
10190 #: build/C/man2/tkill.2:128
10191 msgid ""
10192 "See the description of B<CLONE_THREAD> in B<clone>(2)  for an explanation of "
10193 "thread groups."
10194 msgstr ""
10195
10196 #. type: Plain text
10197 #: build/C/man2/tkill.2:131
10198 msgid ""
10199 "Glibc does not provide wrappers for these system calls; call them using "
10200 "B<syscall>(2)."
10201 msgstr ""
10202
10203 #. type: Plain text
10204 #: build/C/man2/tkill.2:136
10205 msgid "B<clone>(2), B<gettid>(2), B<kill>(2), B<rt_sigqueueinfo>(2)"
10206 msgstr ""
10207
10208 #. type: TH
10209 #: build/C/man2/wait.2:49
10210 #, no-wrap
10211 msgid "WAIT"
10212 msgstr ""
10213
10214 #. type: TH
10215 #: build/C/man2/wait.2:49
10216 #, no-wrap
10217 msgid "2012-12-21"
10218 msgstr ""
10219
10220 #. type: Plain text
10221 #: build/C/man2/wait.2:52
10222 msgid "wait, waitpid, waitid - wait for process to change state"
10223 msgstr ""
10224
10225 #. type: Plain text
10226 #: build/C/man2/wait.2:54
10227 msgid "B<#include E<lt>sys/types.hE<gt>>"
10228 msgstr ""
10229
10230 #. type: Plain text
10231 #: build/C/man2/wait.2:56
10232 msgid "B<#include E<lt>sys/wait.hE<gt>>"
10233 msgstr ""
10234
10235 #. type: Plain text
10236 #: build/C/man2/wait.2:58
10237 msgid "B<pid_t wait(int *>I<status>B<);>"
10238 msgstr ""
10239
10240 #. type: Plain text
10241 #: build/C/man2/wait.2:60
10242 msgid "B<pid_t waitpid(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<);>"
10243 msgstr ""
10244
10245 #. type: Plain text
10246 #: build/C/man2/wait.2:63
10247 msgid ""
10248 "B<int waitid(idtype_t >I<idtype>B<, id_t >I<id>B<, siginfo_t *>I<infop>B<, "
10249 "int >I<options>B<);>"
10250 msgstr ""
10251
10252 #. type: Plain text
10253 #: build/C/man2/wait.2:72
10254 msgid "B<waitid>():"
10255 msgstr ""
10256
10257 #. type: Plain text
10258 #: build/C/man2/wait.2:76
10259 msgid ""
10260 "_SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
10261 "_XOPEN_SOURCE_EXTENDED"
10262 msgstr ""
10263
10264 #. type: Plain text
10265 #: build/C/man2/wait.2:91
10266 msgid ""
10267 "All of these system calls are used to wait for state changes in a child of "
10268 "the calling process, and obtain information about the child whose state has "
10269 "changed.  A state change is considered to be: the child terminated; the "
10270 "child was stopped by a signal; or the child was resumed by a signal.  In the "
10271 "case of a terminated child, performing a wait allows the system to release "
10272 "the resources associated with the child; if a wait is not performed, then "
10273 "the terminated child remains in a \"zombie\" state (see NOTES below)."
10274 msgstr ""
10275
10276 #. type: Plain text
10277 #: build/C/man2/wait.2:103
10278 msgid ""
10279 "If a child has already changed state, then these calls return immediately.  "
10280 "Otherwise they block until either a child changes state or a signal handler "
10281 "interrupts the call (assuming that system calls are not automatically "
10282 "restarted using the B<SA_RESTART> flag of B<sigaction>(2)).  In the "
10283 "remainder of this page, a child whose state has changed and which has not "
10284 "yet been waited upon by one of these system calls is termed I<waitable>."
10285 msgstr ""
10286
10287 #. type: SS
10288 #: build/C/man2/wait.2:103
10289 #, no-wrap
10290 msgid "wait() and waitpid()"
10291 msgstr ""
10292
10293 #. type: Plain text
10294 #: build/C/man2/wait.2:111
10295 msgid ""
10296 "The B<wait>()  system call suspends execution of the calling process until "
10297 "one of its children terminates.  The call I<wait(&status)> is equivalent to:"
10298 msgstr ""
10299
10300 #. type: Plain text
10301 #: build/C/man2/wait.2:114
10302 #, no-wrap
10303 msgid "    waitpid(-1, &status, 0);\n"
10304 msgstr ""
10305
10306 #. type: Plain text
10307 #: build/C/man2/wait.2:128
10308 msgid ""
10309 "The B<waitpid>()  system call suspends execution of the calling process "
10310 "until a child specified by I<pid> argument has changed state.  By default, "
10311 "B<waitpid>()  waits only for terminated children, but this behavior is "
10312 "modifiable via the I<options> argument, as described below."
10313 msgstr ""
10314
10315 #. type: Plain text
10316 #: build/C/man2/wait.2:132
10317 msgid "The value of I<pid> can be:"
10318 msgstr ""
10319
10320 #. type: IP
10321 #: build/C/man2/wait.2:132
10322 #, no-wrap
10323 msgid "E<lt> -1"
10324 msgstr ""
10325
10326 #. type: Plain text
10327 #: build/C/man2/wait.2:136
10328 msgid ""
10329 "meaning wait for any child process whose process group ID is equal to the "
10330 "absolute value of I<pid>."
10331 msgstr ""
10332
10333 #. type: IP
10334 #: build/C/man2/wait.2:136
10335 #, no-wrap
10336 msgid "-1"
10337 msgstr ""
10338
10339 #. type: Plain text
10340 #: build/C/man2/wait.2:138
10341 msgid "meaning wait for any child process."
10342 msgstr ""
10343
10344 #. type: IP
10345 #: build/C/man2/wait.2:138
10346 #, no-wrap
10347 msgid "0"
10348 msgstr ""
10349
10350 #. type: Plain text
10351 #: build/C/man2/wait.2:141
10352 msgid ""
10353 "meaning wait for any child process whose process group ID is equal to that "
10354 "of the calling process."
10355 msgstr ""
10356
10357 #. type: IP
10358 #: build/C/man2/wait.2:141
10359 #, no-wrap
10360 msgid "E<gt> 0"
10361 msgstr ""
10362
10363 #. type: Plain text
10364 #: build/C/man2/wait.2:145
10365 msgid "meaning wait for the child whose process ID is equal to the value of I<pid>."
10366 msgstr ""
10367
10368 #. type: Plain text
10369 #: build/C/man2/wait.2:149
10370 msgid "The value of I<options> is an OR of zero or more of the following constants:"
10371 msgstr ""
10372
10373 #. type: TP
10374 #: build/C/man2/wait.2:149 build/C/man2/wait.2:278
10375 #, no-wrap
10376 msgid "B<WNOHANG>"
10377 msgstr ""
10378
10379 #. type: Plain text
10380 #: build/C/man2/wait.2:152
10381 msgid "return immediately if no child has exited."
10382 msgstr ""
10383
10384 #. type: TP
10385 #: build/C/man2/wait.2:152
10386 #, no-wrap
10387 msgid "B<WUNTRACED>"
10388 msgstr ""
10389
10390 #. type: Plain text
10391 #: build/C/man2/wait.2:161
10392 msgid ""
10393 "also return if a child has stopped (but not traced via B<ptrace>(2)).  "
10394 "Status for I<traced> children which have stopped is provided even if this "
10395 "option is not specified."
10396 msgstr ""
10397
10398 #. type: TP
10399 #: build/C/man2/wait.2:161
10400 #, no-wrap
10401 msgid "B<WCONTINUED> (since Linux 2.6.10)"
10402 msgstr ""
10403
10404 #. type: Plain text
10405 #: build/C/man2/wait.2:165
10406 msgid "also return if a stopped child has been resumed by delivery of B<SIGCONT>."
10407 msgstr ""
10408
10409 #. type: Plain text
10410 #: build/C/man2/wait.2:167
10411 msgid "(For Linux-only options, see below.)"
10412 msgstr ""
10413
10414 #. type: Plain text
10415 #: build/C/man2/wait.2:181
10416 msgid ""
10417 "If I<status> is not NULL, B<wait>()  and B<waitpid>()  store status "
10418 "information in the I<int> to which it points.  This integer can be inspected "
10419 "with the following macros (which take the integer itself as an argument, not "
10420 "a pointer to it, as is done in B<wait>()  and B<waitpid>()!):"
10421 msgstr ""
10422
10423 #. type: TP
10424 #: build/C/man2/wait.2:181
10425 #, no-wrap
10426 msgid "B<WIFEXITED(>I<status>B<)>"
10427 msgstr ""
10428
10429 #. type: Plain text
10430 #: build/C/man2/wait.2:189
10431 msgid ""
10432 "returns true if the child terminated normally, that is, by calling "
10433 "B<exit>(3)  or B<_exit>(2), or by returning from main()."
10434 msgstr ""
10435
10436 #. type: TP
10437 #: build/C/man2/wait.2:189
10438 #, no-wrap
10439 msgid "B<WEXITSTATUS(>I<status>B<)>"
10440 msgstr ""
10441
10442 #. type: Plain text
10443 #: build/C/man2/wait.2:202
10444 msgid ""
10445 "returns the exit status of the child.  This consists of the least "
10446 "significant 8 bits of the I<status> argument that the child specified in a "
10447 "call to B<exit>(3)  or B<_exit>(2)  or as the argument for a return "
10448 "statement in main().  This macro should only be employed if B<WIFEXITED> "
10449 "returned true."
10450 msgstr ""
10451
10452 #. type: TP
10453 #: build/C/man2/wait.2:202
10454 #, no-wrap
10455 msgid "B<WIFSIGNALED(>I<status>B<)>"
10456 msgstr ""
10457
10458 #. type: Plain text
10459 #: build/C/man2/wait.2:205
10460 msgid "returns true if the child process was terminated by a signal."
10461 msgstr ""
10462
10463 #. type: TP
10464 #: build/C/man2/wait.2:205
10465 #, no-wrap
10466 msgid "B<WTERMSIG(>I<status>B<)>"
10467 msgstr ""
10468
10469 #. type: Plain text
10470 #: build/C/man2/wait.2:212
10471 msgid ""
10472 "returns the number of the signal that caused the child process to "
10473 "terminate.  This macro should only be employed if B<WIFSIGNALED> returned "
10474 "true."
10475 msgstr ""
10476
10477 #. type: TP
10478 #: build/C/man2/wait.2:212
10479 #, no-wrap
10480 msgid "B<WCOREDUMP(>I<status>B<)>"
10481 msgstr ""
10482
10483 #. type: Plain text
10484 #: build/C/man2/wait.2:221
10485 msgid ""
10486 "returns true if the child produced a core dump.  This macro should only be "
10487 "employed if B<WIFSIGNALED> returned true.  This macro is not specified in "
10488 "POSIX.1-2001 and is not available on some UNIX implementations (e.g., AIX, "
10489 "SunOS).  Only use this enclosed in #ifdef WCOREDUMP ... #endif."
10490 msgstr ""
10491
10492 #. type: TP
10493 #: build/C/man2/wait.2:221
10494 #, no-wrap
10495 msgid "B<WIFSTOPPED(>I<status>B<)>"
10496 msgstr ""
10497
10498 #. type: Plain text
10499 #: build/C/man2/wait.2:228
10500 msgid ""
10501 "returns true if the child process was stopped by delivery of a signal; this "
10502 "is only possible if the call was done using B<WUNTRACED> or when the child "
10503 "is being traced (see B<ptrace>(2))."
10504 msgstr ""
10505
10506 #. type: TP
10507 #: build/C/man2/wait.2:228
10508 #, no-wrap
10509 msgid "B<WSTOPSIG(>I<status>B<)>"
10510 msgstr ""
10511
10512 #. type: Plain text
10513 #: build/C/man2/wait.2:234
10514 msgid ""
10515 "returns the number of the signal which caused the child to stop.  This macro "
10516 "should only be employed if B<WIFSTOPPED> returned true."
10517 msgstr ""
10518
10519 #. type: TP
10520 #: build/C/man2/wait.2:234
10521 #, no-wrap
10522 msgid "B<WIFCONTINUED(>I<status>B<)>"
10523 msgstr ""
10524
10525 #. type: Plain text
10526 #: build/C/man2/wait.2:239
10527 msgid ""
10528 "(since Linux 2.6.10)  returns true if the child process was resumed by "
10529 "delivery of B<SIGCONT>."
10530 msgstr ""
10531
10532 #. type: SS
10533 #: build/C/man2/wait.2:239
10534 #, no-wrap
10535 msgid "waitid()"
10536 msgstr ""
10537
10538 #. type: Plain text
10539 #: build/C/man2/wait.2:244
10540 msgid ""
10541 "The B<waitid>()  system call (available since Linux 2.6.9) provides more "
10542 "precise control over which child state changes to wait for."
10543 msgstr ""
10544
10545 #. type: Plain text
10546 #: build/C/man2/wait.2:250
10547 msgid ""
10548 "The I<idtype> and I<id> arguments select the child(ren) to wait for, as "
10549 "follows:"
10550 msgstr ""
10551
10552 #. type: IP
10553 #: build/C/man2/wait.2:250
10554 #, no-wrap
10555 msgid "I<idtype> == B<P_PID>"
10556 msgstr ""
10557
10558 #. type: Plain text
10559 #: build/C/man2/wait.2:253
10560 msgid "Wait for the child whose process ID matches I<id>."
10561 msgstr ""
10562
10563 #. type: IP
10564 #: build/C/man2/wait.2:253
10565 #, no-wrap
10566 msgid "I<idtype> == B<P_PGID>"
10567 msgstr ""
10568
10569 #. type: Plain text
10570 #: build/C/man2/wait.2:256
10571 msgid "Wait for any child whose process group ID matches I<id>."
10572 msgstr ""
10573
10574 #. type: IP
10575 #: build/C/man2/wait.2:256
10576 #, no-wrap
10577 msgid "I<idtype> == B<P_ALL>"
10578 msgstr ""
10579
10580 #. type: Plain text
10581 #: build/C/man2/wait.2:260
10582 msgid "Wait for any child; I<id> is ignored."
10583 msgstr ""
10584
10585 #. type: Plain text
10586 #: build/C/man2/wait.2:264
10587 msgid ""
10588 "The child state changes to wait for are specified by ORing one or more of "
10589 "the following flags in I<options>:"
10590 msgstr ""
10591
10592 #. type: TP
10593 #: build/C/man2/wait.2:264
10594 #, no-wrap
10595 msgid "B<WEXITED>"
10596 msgstr ""
10597
10598 #. type: Plain text
10599 #: build/C/man2/wait.2:267
10600 msgid "Wait for children that have terminated."
10601 msgstr ""
10602
10603 #. type: TP
10604 #: build/C/man2/wait.2:267
10605 #, no-wrap
10606 msgid "B<WSTOPPED>"
10607 msgstr ""
10608
10609 #. type: Plain text
10610 #: build/C/man2/wait.2:270
10611 msgid "Wait for children that have been stopped by delivery of a signal."
10612 msgstr ""
10613
10614 #. type: TP
10615 #: build/C/man2/wait.2:270
10616 #, no-wrap
10617 msgid "B<WCONTINUED>"
10618 msgstr ""
10619
10620 #. type: Plain text
10621 #: build/C/man2/wait.2:275
10622 msgid ""
10623 "Wait for (previously stopped) children that have been resumed by delivery of "
10624 "B<SIGCONT>."
10625 msgstr ""
10626
10627 #. type: Plain text
10628 #: build/C/man2/wait.2:278
10629 msgid "The following flags may additionally be ORed in I<options>:"
10630 msgstr ""
10631
10632 #. type: Plain text
10633 #: build/C/man2/wait.2:282
10634 msgid "As for B<waitpid>()."
10635 msgstr ""
10636
10637 #. type: TP
10638 #: build/C/man2/wait.2:282
10639 #, no-wrap
10640 msgid "B<WNOWAIT>"
10641 msgstr ""
10642
10643 #. type: Plain text
10644 #: build/C/man2/wait.2:286
10645 msgid ""
10646 "Leave the child in a waitable state; a later wait call can be used to again "
10647 "retrieve the child status information."
10648 msgstr ""
10649
10650 #. type: Plain text
10651 #: build/C/man2/wait.2:293
10652 msgid ""
10653 "Upon successful return, B<waitid>()  fills in the following fields of the "
10654 "I<siginfo_t> structure pointed to by I<infop>:"
10655 msgstr ""
10656
10657 #. type: Plain text
10658 #: build/C/man2/wait.2:296
10659 msgid "The process ID of the child."
10660 msgstr ""
10661
10662 #. type: Plain text
10663 #: build/C/man2/wait.2:300
10664 msgid ""
10665 "The real user ID of the child.  (This field is not set on most other "
10666 "implementations.)"
10667 msgstr ""
10668
10669 #. type: Plain text
10670 #: build/C/man2/wait.2:304
10671 msgid "Always set to B<SIGCHLD>."
10672 msgstr ""
10673
10674 #. type: TP
10675 #: build/C/man2/wait.2:304
10676 #, no-wrap
10677 msgid "I<si_status>"
10678 msgstr ""
10679
10680 #. type: Plain text
10681 #: build/C/man2/wait.2:314
10682 msgid ""
10683 "Either the exit status of the child, as given to B<_exit>(2)  (or "
10684 "B<exit>(3)), or the signal that caused the child to terminate, stop, or "
10685 "continue.  The I<si_code> field can be used to determine how to interpret "
10686 "this field."
10687 msgstr ""
10688
10689 #. type: Plain text
10690 #: build/C/man2/wait.2:331
10691 msgid ""
10692 "Set to one of: B<CLD_EXITED> (child called B<_exit>(2)); B<CLD_KILLED> "
10693 "(child killed by signal); B<CLD_DUMPED> (child killed by signal, and dumped "
10694 "core); B<CLD_STOPPED> (child stopped by signal); B<CLD_TRAPPED> (traced "
10695 "child has trapped); or B<CLD_CONTINUED> (child continued by B<SIGCONT>)."
10696 msgstr ""
10697
10698 #.  POSIX.1-2001 leaves this possibility unspecified; most
10699 #.  implementations (including Linux) zero out the structure
10700 #.  in this case, but at least one implementation (AIX 5.1)
10701 #.  does not -- MTK Nov 04
10702 #. type: Plain text
10703 #: build/C/man2/wait.2:353
10704 msgid ""
10705 "If B<WNOHANG> was specified in I<options> and there were no children in a "
10706 "waitable state, then B<waitid>()  returns 0 immediately and the state of the "
10707 "I<siginfo_t> structure pointed to by I<infop> is unspecified.  To "
10708 "distinguish this case from that where a child was in a waitable state, zero "
10709 "out the I<si_pid> field before the call and check for a nonzero value in "
10710 "this field after the call returns."
10711 msgstr ""
10712
10713 #. type: Plain text
10714 #: build/C/man2/wait.2:357
10715 msgid ""
10716 "B<wait>(): on success, returns the process ID of the terminated child; on "
10717 "error, -1 is returned."
10718 msgstr ""
10719
10720 #. type: Plain text
10721 #: build/C/man2/wait.2:366
10722 msgid ""
10723 "B<waitpid>(): on success, returns the process ID of the child whose state "
10724 "has changed; if B<WNOHANG> was specified and one or more child(ren) "
10725 "specified by I<pid> exist, but have not yet changed state, then 0 is "
10726 "returned.  On error, -1 is returned."
10727 msgstr ""
10728
10729 #.  FIXME: As reported by Vegard Nossum, if infop is NULL, then waitid()
10730 #.  returns the PID of the child.  Either this is a bug, or it is intended
10731 #.  behavior that needs to be documented.  See my Jan 2009 LKML mail
10732 #.  "waitid() return value strangeness when infop is NULL".
10733 #. type: Plain text
10734 #: build/C/man2/wait.2:382
10735 msgid ""
10736 "B<waitid>(): returns 0 on success or if B<WNOHANG> was specified and no "
10737 "child(ren) specified by I<id> has yet changed state; on error, -1 is "
10738 "returned.  Each of these calls sets I<errno> to an appropriate value in the "
10739 "case of an error."
10740 msgstr ""
10741
10742 #. type: TP
10743 #: build/C/man2/wait.2:383 build/C/man2/wait.2:388
10744 #, no-wrap
10745 msgid "B<ECHILD>"
10746 msgstr ""
10747
10748 #. type: Plain text
10749 #: build/C/man2/wait.2:388
10750 msgid ""
10751 "(for B<wait>())  The calling process does not have any unwaited-for "
10752 "children."
10753 msgstr ""
10754
10755 #. type: Plain text
10756 #: build/C/man2/wait.2:408
10757 msgid ""
10758 "(for B<waitpid>()  or B<waitid>())  The process specified by I<pid> "
10759 "(B<waitpid>())  or I<idtype> and I<id> (B<waitid>())  does not exist or is "
10760 "not a child of the calling process.  (This can happen for one's own child if "
10761 "the action for B<SIGCHLD> is set to B<SIG_IGN>.  See also the I<Linux Notes> "
10762 "section about threads.)"
10763 msgstr ""
10764
10765 #. type: Plain text
10766 #: build/C/man2/wait.2:415
10767 msgid ""
10768 "B<WNOHANG> was not set and an unblocked signal or a B<SIGCHLD> was caught; "
10769 "see B<signal>(7)."
10770 msgstr ""
10771
10772 #. type: Plain text
10773 #: build/C/man2/wait.2:420
10774 msgid "The I<options> argument was invalid."
10775 msgstr ""
10776
10777 #. type: Plain text
10778 #: build/C/man2/wait.2:435
10779 msgid ""
10780 "A child that terminates, but has not been waited for becomes a \"zombie\".  "
10781 "The kernel maintains a minimal set of information about the zombie process "
10782 "(PID, termination status, resource usage information)  in order to allow the "
10783 "parent to later perform a wait to obtain information about the child.  As "
10784 "long as a zombie is not removed from the system via a wait, it will consume "
10785 "a slot in the kernel process table, and if this table fills, it will not be "
10786 "possible to create further processes.  If a parent process terminates, then "
10787 "its \"zombie\" children (if any)  are adopted by B<init>(8), which "
10788 "automatically performs a wait to remove the zombies."
10789 msgstr ""
10790
10791 #. type: Plain text
10792 #: build/C/man2/wait.2:476
10793 msgid ""
10794 "POSIX.1-2001 specifies that if the disposition of B<SIGCHLD> is set to "
10795 "B<SIG_IGN> or the B<SA_NOCLDWAIT> flag is set for B<SIGCHLD> (see "
10796 "B<sigaction>(2)), then children that terminate do not become zombies and a "
10797 "call to B<wait>()  or B<waitpid>()  will block until all children have "
10798 "terminated, and then fail with I<errno> set to B<ECHILD>.  (The original "
10799 "POSIX standard left the behavior of setting B<SIGCHLD> to B<SIG_IGN> "
10800 "unspecified.  Note that even though the default disposition of B<SIGCHLD> is "
10801 "\"ignore\", explicitly setting the disposition to B<SIG_IGN> results in "
10802 "different treatment of zombie process children.)  Linux 2.6 conforms to this "
10803 "specification.  However, Linux 2.4 (and earlier) does not: if a B<wait>()  "
10804 "or B<waitpid>()  call is made while B<SIGCHLD> is being ignored, the call "
10805 "behaves just as though B<SIGCHLD> were not being ignored, that is, the call "
10806 "blocks until the next child terminates and then returns the process ID and "
10807 "status of that child."
10808 msgstr ""
10809
10810 #. type: Plain text
10811 #: build/C/man2/wait.2:492
10812 msgid ""
10813 "In the Linux kernel, a kernel-scheduled thread is not a distinct construct "
10814 "from a process.  Instead, a thread is simply a process that is created using "
10815 "the Linux-unique B<clone>(2)  system call; other routines such as the "
10816 "portable B<pthread_create>(3)  call are implemented using B<clone>(2).  "
10817 "Before Linux 2.4, a thread was just a special case of a process, and as a "
10818 "consequence one thread could not wait on the children of another thread, "
10819 "even when the latter belongs to the same thread group.  However, POSIX "
10820 "prescribes such functionality, and since Linux 2.4 a thread can, and by "
10821 "default will, wait on children of other threads in the same thread group."
10822 msgstr ""
10823
10824 #. type: Plain text
10825 #: build/C/man2/wait.2:499
10826 msgid ""
10827 "The following Linux-specific I<options> are for use with children created "
10828 "using B<clone>(2); they cannot be used with B<waitid>():"
10829 msgstr ""
10830
10831 #. type: TP
10832 #: build/C/man2/wait.2:499
10833 #, no-wrap
10834 msgid "B<__WCLONE>"
10835 msgstr ""
10836
10837 #.  since 0.99pl10
10838 #. type: Plain text
10839 #: build/C/man2/wait.2:510
10840 msgid ""
10841 "Wait for \"clone\" children only.  If omitted then wait for \"non-clone\" "
10842 "children only.  (A \"clone\" child is one which delivers no signal, or a "
10843 "signal other than B<SIGCHLD> to its parent upon termination.)  This option "
10844 "is ignored if B<__WALL> is also specified."
10845 msgstr ""
10846
10847 #. type: TP
10848 #: build/C/man2/wait.2:510
10849 #, no-wrap
10850 msgid "B<__WALL> (since Linux 2.4)"
10851 msgstr ""
10852
10853 #.  since patch-2.3.48
10854 #. type: Plain text
10855 #: build/C/man2/wait.2:515
10856 msgid "Wait for all children, regardless of type (\"clone\" or \"non-clone\")."
10857 msgstr ""
10858
10859 #. type: TP
10860 #: build/C/man2/wait.2:515
10861 #, no-wrap
10862 msgid "B<__WNOTHREAD> (since Linux 2.4)"
10863 msgstr ""
10864
10865 #.  since patch-2.4.0-test8
10866 #. type: Plain text
10867 #: build/C/man2/wait.2:521
10868 msgid ""
10869 "Do not wait for children of other threads in the same thread group.  This "
10870 "was the default before Linux 2.4."
10871 msgstr ""
10872
10873 #. type: Plain text
10874 #: build/C/man2/wait.2:536
10875 msgid ""
10876 "According to POSIX.1-2008, an application calling B<waitid>()  must ensure "
10877 "that I<infop> points to a I<siginfo_t> structure (i.e., that it is a "
10878 "non-NULL pointer).  On Linux, if I<infop> is NULL, B<waitid>()  succeeds, "
10879 "and returns the process ID of the waited-for child.  Applications should "
10880 "avoid relying on this inconsistent, nonstandard, and unnecessary feature."
10881 msgstr ""
10882
10883 #.  fork.2 refers to this example program.
10884 #. type: Plain text
10885 #: build/C/man2/wait.2:553
10886 msgid ""
10887 "The following program demonstrates the use of B<fork>(2)  and B<waitpid>().  "
10888 "The program creates a child process.  If no command-line argument is "
10889 "supplied to the program, then the child suspends its execution using "
10890 "B<pause>(2), to allow the user to send signals to the child.  Otherwise, if "
10891 "a command-line argument is supplied, then the child exits immediately, using "
10892 "the integer supplied on the command line as the exit status.  The parent "
10893 "process executes a loop that monitors the child using B<waitpid>(), and uses "
10894 "the W*() macros described above to analyze the wait status value."
10895 msgstr ""
10896
10897 #. type: Plain text
10898 #: build/C/man2/wait.2:569
10899 #, no-wrap
10900 msgid ""
10901 "$B< ./a.out &>\n"
10902 "Child PID is 32360\n"
10903 "[1] 32359\n"
10904 "$B< kill -STOP 32360>\n"
10905 "stopped by signal 19\n"
10906 "$B< kill -CONT 32360>\n"
10907 "continued\n"
10908 "$B< kill -TERM 32360>\n"
10909 "killed by signal 15\n"
10910 "[1]+  Done                    ./a.out\n"
10911 "$\n"
10912 msgstr ""
10913
10914 #. type: Plain text
10915 #: build/C/man2/wait.2:578
10916 #, no-wrap
10917 msgid ""
10918 "#include E<lt>sys/wait.hE<gt>\n"
10919 "#include E<lt>stdlib.hE<gt>\n"
10920 "#include E<lt>unistd.hE<gt>\n"
10921 "#include E<lt>stdio.hE<gt>\n"
10922 msgstr ""
10923
10924 #. type: Plain text
10925 #: build/C/man2/wait.2:584
10926 #, no-wrap
10927 msgid ""
10928 "int\n"
10929 "main(int argc, char *argv[])\n"
10930 "{\n"
10931 "    pid_t cpid, w;\n"
10932 "    int status;\n"
10933 msgstr ""
10934
10935 #. type: Plain text
10936 #: build/C/man2/wait.2:590
10937 #, no-wrap
10938 msgid ""
10939 "    cpid = fork();\n"
10940 "    if (cpid == -1) {\n"
10941 "        perror(\"fork\");\n"
10942 "        exit(EXIT_FAILURE);\n"
10943 "    }\n"
10944 msgstr ""
10945
10946 #. type: Plain text
10947 #: build/C/man2/wait.2:596
10948 #, no-wrap
10949 msgid ""
10950 "    if (cpid == 0) {            /* Code executed by child */\n"
10951 "        printf(\"Child PID is %ld\\en\", (long) getpid());\n"
10952 "        if (argc == 1)\n"
10953 "            pause();                    /* Wait for signals */\n"
10954 "        _exit(atoi(argv[1]));\n"
10955 msgstr ""
10956
10957 #. type: Plain text
10958 #: build/C/man2/wait.2:604
10959 #, no-wrap
10960 msgid ""
10961 "    } else {                    /* Code executed by parent */\n"
10962 "        do {\n"
10963 "            w = waitpid(cpid, &status, WUNTRACED | WCONTINUED);\n"
10964 "            if (w == -1) {\n"
10965 "                perror(\"waitpid\");\n"
10966 "                exit(EXIT_FAILURE);\n"
10967 "            }\n"
10968 msgstr ""
10969
10970 #. type: Plain text
10971 #: build/C/man2/wait.2:618
10972 #, no-wrap
10973 msgid ""
10974 "            if (WIFEXITED(status)) {\n"
10975 "                printf(\"exited, status=%d\\en\", WEXITSTATUS(status));\n"
10976 "            } else if (WIFSIGNALED(status)) {\n"
10977 "                printf(\"killed by signal %d\\en\", WTERMSIG(status));\n"
10978 "            } else if (WIFSTOPPED(status)) {\n"
10979 "                printf(\"stopped by signal %d\\en\", WSTOPSIG(status));\n"
10980 "            } else if (WIFCONTINUED(status)) {\n"
10981 "                printf(\"continued\\en\");\n"
10982 "            }\n"
10983 "        } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n"
10984 "        exit(EXIT_SUCCESS);\n"
10985 "    }\n"
10986 "}\n"
10987 msgstr ""
10988
10989 #. type: Plain text
10990 #: build/C/man2/wait.2:631
10991 msgid ""
10992 "B<_exit>(2), B<clone>(2), B<fork>(2), B<kill>(2), B<ptrace>(2), "
10993 "B<sigaction>(2), B<signal>(2), B<wait4>(2), B<pthread_create>(3), "
10994 "B<credentials>(7), B<signal>(7)"
10995 msgstr ""
10996
10997 #. type: TH
10998 #: build/C/man2/wait4.2:33
10999 #, no-wrap
11000 msgid "WAIT4"
11001 msgstr ""
11002
11003 #. type: TH
11004 #: build/C/man2/wait4.2:33
11005 #, no-wrap
11006 msgid "2012-09-23"
11007 msgstr ""
11008
11009 #. type: Plain text
11010 #: build/C/man2/wait4.2:36
11011 msgid "wait3, wait4 - wait for process to change state, BSD style"
11012 msgstr ""
11013
11014 #. type: Plain text
11015 #: build/C/man2/wait4.2:42
11016 #, no-wrap
11017 msgid ""
11018 "B<#include E<lt>sys/types.hE<gt>>\n"
11019 "B<#include E<lt>sys/time.hE<gt>>\n"
11020 "B<#include E<lt>sys/resource.hE<gt>>\n"
11021 "B<#include E<lt>sys/wait.hE<gt>>\n"
11022 msgstr ""
11023
11024 #. type: Plain text
11025 #: build/C/man2/wait4.2:45
11026 #, no-wrap
11027 msgid ""
11028 "B<pid_t wait3(int *>I<status>B<, int >I<options>B<,>\n"
11029 "B<            struct rusage *>I<rusage>B<);>\n"
11030 msgstr ""
11031
11032 #. type: Plain text
11033 #: build/C/man2/wait4.2:48
11034 #, no-wrap
11035 msgid ""
11036 "B<pid_t wait4(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<,>\n"
11037 "B<            struct rusage *>I<rusage>B<);>\n"
11038 msgstr ""
11039
11040 #. type: Plain text
11041 #: build/C/man2/wait4.2:57
11042 msgid "B<wait3>():"
11043 msgstr ""
11044
11045 #. type: Plain text
11046 #: build/C/man2/wait4.2:63
11047 msgid "B<wait4>():"
11048 msgstr ""
11049
11050 #. type: Plain text
11051 #: build/C/man2/wait4.2:65
11052 msgid "_BSD_SOURCE"
11053 msgstr ""
11054
11055 #. type: Plain text
11056 #: build/C/man2/wait4.2:73
11057 msgid ""
11058 "These functions are obsolete; use B<waitpid>(2)  or B<waitid>(2)  in new "
11059 "programs."
11060 msgstr ""
11061
11062 #. type: Plain text
11063 #: build/C/man2/wait4.2:83
11064 msgid ""
11065 "The B<wait3>()  and B<wait4>()  system calls are similar to B<waitpid>(2), "
11066 "but additionally return resource usage information about the child in the "
11067 "structure pointed to by I<rusage>."
11068 msgstr ""
11069
11070 #. type: Plain text
11071 #: build/C/man2/wait4.2:89
11072 msgid ""
11073 "Other than the use of the I<rusage> argument, the following B<wait3>()  "
11074 "call:"
11075 msgstr ""
11076
11077 #. type: Plain text
11078 #: build/C/man2/wait4.2:92
11079 #, no-wrap
11080 msgid "    wait3(status, options, rusage);\n"
11081 msgstr ""
11082
11083 #. type: Plain text
11084 #: build/C/man2/wait4.2:95 build/C/man2/wait4.2:109
11085 msgid "is equivalent to:"
11086 msgstr ""
11087
11088 #. type: Plain text
11089 #: build/C/man2/wait4.2:98
11090 #, no-wrap
11091 msgid "    waitpid(-1, status, options);\n"
11092 msgstr ""
11093
11094 #. type: Plain text
11095 #: build/C/man2/wait4.2:103
11096 msgid "Similarly, the following B<wait4>()  call:"
11097 msgstr ""
11098
11099 #. type: Plain text
11100 #: build/C/man2/wait4.2:106
11101 #, no-wrap
11102 msgid "    wait4(pid, status, options, rusage);\n"
11103 msgstr ""
11104
11105 #. type: Plain text
11106 #: build/C/man2/wait4.2:112
11107 #, no-wrap
11108 msgid "    waitpid(pid, status, options);\n"
11109 msgstr ""
11110
11111 #. type: Plain text
11112 #: build/C/man2/wait4.2:122
11113 msgid ""
11114 "In other words, B<wait3>()  waits of any child, while B<wait4>()  can be "
11115 "used to select a specific child, or children, on which to wait.  See "
11116 "B<wait>(2)  for further details."
11117 msgstr ""
11118
11119 #. type: Plain text
11120 #: build/C/man2/wait4.2:132
11121 msgid ""
11122 "If I<rusage> is not NULL, the I<struct rusage> to which it points will be "
11123 "filled with accounting information about the child.  See B<getrusage>(2)  "
11124 "for details."
11125 msgstr ""
11126
11127 #. type: Plain text
11128 #: build/C/man2/wait4.2:135 build/C/man2/wait4.2:138
11129 msgid "As for B<waitpid>(2)."
11130 msgstr ""
11131
11132 #. type: Plain text
11133 #: build/C/man2/wait4.2:140
11134 msgid "4.3BSD."
11135 msgstr ""
11136
11137 #. type: Plain text
11138 #: build/C/man2/wait4.2:147
11139 msgid ""
11140 "SUSv1 included a specification of B<wait3>(); SUSv2 included B<wait3>(), but "
11141 "marked it LEGACY; SUSv3 removed it."
11142 msgstr ""
11143
11144 #. type: Plain text
11145 #: build/C/man2/wait4.2:159
11146 msgid ""
11147 "Including I<E<lt>sys/time.hE<gt>> is not required these days, but increases "
11148 "portability.  (Indeed, I<E<lt>sys/resource.hE<gt>> defines the I<rusage> "
11149 "structure with fields of type I<struct timeval> defined in "
11150 "I<E<lt>sys/time.hE<gt>>.)"
11151 msgstr ""
11152
11153 #. type: Plain text
11154 #: build/C/man2/wait4.2:165
11155 msgid ""
11156 "On Linux, B<wait3>()  is a library function implemented on top of the "
11157 "B<wait4>()  system call."
11158 msgstr ""
11159
11160 #. type: Plain text
11161 #: build/C/man2/wait4.2:172
11162 msgid ""
11163 "B<fork>(2), B<getrusage>(2), B<sigaction>(2), B<signal>(2), B<wait>(2), "
11164 "B<signal>(7)"
11165 msgstr ""