OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.37.
[linuxjm/LDP_man-pages.git] / po4a / signal / po / signal.pot
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2012-03-22 04:26+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=CHARSET\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: build/C/man3/bsd_signal.3:23
21 #, no-wrap
22 msgid "BSD_SIGNAL"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man3/bsd_signal.3:23 build/C/man2/getitimer.2:7
27 #, no-wrap
28 msgid "2009-03-15"
29 msgstr ""
30
31 #. type: TH
32 #: build/C/man3/bsd_signal.3:23 build/C/man2/eventfd.2:21 build/C/man2/getitimer.2:7 build/C/man3/gsignal.3:25 build/C/man2/kill.2:44 build/C/man2/killpg.2:40 build/C/man2/pause.2:30 build/C/man2/prctl.2:46 build/C/man3/profil.3:28 build/C/man3/psignal.3:28 build/C/man3/raise.3:27 build/C/man2/rt_sigqueueinfo.2:23 build/C/man2/sgetmask.2:24 build/C/man2/sigaction.2:45 build/C/man2/sigaltstack.2:25 build/C/man7/sigevent.7:24 build/C/man3/siginterrupt.3:29 build/C/man2/signal.2:34 build/C/man7/signal.7:44 build/C/man2/signalfd.2:19 build/C/man3/sigpause.3:23 build/C/man2/sigpending.2:27 build/C/man2/sigprocmask.2:27 build/C/man3/sigqueue.3:26 build/C/man2/sigreturn.2:27 build/C/man3/sigset.3:24 build/C/man3/sigsetops.3:29 build/C/man2/sigsuspend.2:27 build/C/man3/sigvec.3:24 build/C/man3/sigwait.3:24 build/C/man2/sigwaitinfo.2:23 build/C/man3/sysv_signal.3:23 build/C/man2/timer_create.2:29 build/C/man2/timer_delete.2:23 build/C/man2/timer_getoverrun.2:23 build/C/man2/timer_settime.2:23 build/C/man2/timerfd_create.2:20 build/C/man2/tkill.2:29 build/C/man2/wait.2:50 build/C/man2/wait4.2:34
33 #, no-wrap
34 msgid "Linux Programmer's Manual"
35 msgstr ""
36
37 #. type: SH
38 #: build/C/man3/bsd_signal.3:24 build/C/man2/eventfd.2:22 build/C/man2/getitimer.2:8 build/C/man3/gsignal.3:26 build/C/man2/kill.2:45 build/C/man2/killpg.2:41 build/C/man2/pause.2:31 build/C/man2/prctl.2:47 build/C/man3/profil.3:29 build/C/man3/psignal.3:29 build/C/man3/raise.3:28 build/C/man2/rt_sigqueueinfo.2:24 build/C/man2/sgetmask.2:25 build/C/man2/sigaction.2:46 build/C/man2/sigaltstack.2:26 build/C/man7/sigevent.7:25 build/C/man3/siginterrupt.3:30 build/C/man2/signal.2:35 build/C/man7/signal.7:45 build/C/man2/signalfd.2:20 build/C/man3/sigpause.3:24 build/C/man2/sigpending.2:28 build/C/man2/sigprocmask.2:28 build/C/man3/sigqueue.3:27 build/C/man2/sigreturn.2:28 build/C/man3/sigset.3:25 build/C/man3/sigsetops.3:30 build/C/man2/sigsuspend.2:28 build/C/man3/sigvec.3:25 build/C/man3/sigwait.3:25 build/C/man2/sigwaitinfo.2:24 build/C/man3/sysv_signal.3:24 build/C/man2/timer_create.2:30 build/C/man2/timer_delete.2:24 build/C/man2/timer_getoverrun.2:24 build/C/man2/timer_settime.2:24 build/C/man2/timerfd_create.2:21 build/C/man2/tkill.2:30 build/C/man2/wait.2:51 build/C/man2/wait4.2:35
39 #, no-wrap
40 msgid "NAME"
41 msgstr ""
42
43 #. type: Plain text
44 #: build/C/man3/bsd_signal.3:26
45 msgid "bsd_signal - signal handling with BSD semantics"
46 msgstr ""
47
48 #. type: SH
49 #: build/C/man3/bsd_signal.3:26 build/C/man2/eventfd.2:24 build/C/man2/getitimer.2:10 build/C/man3/gsignal.3:28 build/C/man2/kill.2:47 build/C/man2/killpg.2:43 build/C/man2/pause.2:33 build/C/man2/prctl.2:49 build/C/man3/profil.3:31 build/C/man3/psignal.3:31 build/C/man3/raise.3:30 build/C/man2/rt_sigqueueinfo.2:26 build/C/man2/sgetmask.2:27 build/C/man2/sigaction.2:48 build/C/man2/sigaltstack.2:28 build/C/man7/sigevent.7:27 build/C/man3/siginterrupt.3:32 build/C/man2/signal.2:37 build/C/man2/signalfd.2:22 build/C/man3/sigpause.3:26 build/C/man2/sigpending.2:30 build/C/man2/sigprocmask.2:30 build/C/man3/sigqueue.3:29 build/C/man2/sigreturn.2:30 build/C/man3/sigset.3:27 build/C/man3/sigsetops.3:33 build/C/man2/sigsuspend.2:30 build/C/man3/sigvec.3:27 build/C/man3/sigwait.3:27 build/C/man2/sigwaitinfo.2:26 build/C/man3/sysv_signal.3:26 build/C/man2/timer_create.2:32 build/C/man2/timer_delete.2:26 build/C/man2/timer_getoverrun.2:26 build/C/man2/timer_settime.2:27 build/C/man2/timerfd_create.2:24 build/C/man2/tkill.2:32 build/C/man2/wait.2:53 build/C/man2/wait4.2:37
50 #, no-wrap
51 msgid "SYNOPSIS"
52 msgstr ""
53
54 #. type: Plain text
55 #: build/C/man3/bsd_signal.3:28
56 msgid "B<#define _XOPEN_SOURCE> /* See feature_test_macros(7) */"
57 msgstr ""
58
59 #. type: Plain text
60 #: build/C/man3/bsd_signal.3:30 build/C/man2/killpg.2:45 build/C/man2/sigaltstack.2:30 build/C/man2/signal.2:39 build/C/man2/sigpending.2:32 build/C/man2/sigprocmask.2:32 build/C/man3/sigqueue.3:31 build/C/man3/sigset.3:29 build/C/man3/sigsetops.3:35 build/C/man2/sigsuspend.2:32 build/C/man3/sigvec.3:29 build/C/man3/sysv_signal.3:30
61 msgid "B<#include E<lt>signal.hE<gt>>"
62 msgstr ""
63
64 #. type: Plain text
65 #: build/C/man3/bsd_signal.3:32 build/C/man2/signal.2:41 build/C/man3/sigset.3:31 build/C/man3/sysv_signal.3:32
66 msgid "B<typedef void (*sighandler_t)(int);>"
67 msgstr ""
68
69 #. type: Plain text
70 #: build/C/man3/bsd_signal.3:34
71 msgid "B<sighandler_t bsd_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
72 msgstr ""
73
74 #. type: SH
75 #: build/C/man3/bsd_signal.3:34 build/C/man2/eventfd.2:28 build/C/man2/getitimer.2:19 build/C/man3/gsignal.3:47 build/C/man2/kill.2:65 build/C/man2/killpg.2:59 build/C/man2/pause.2:37 build/C/man2/prctl.2:56 build/C/man3/profil.3:44 build/C/man3/psignal.3:54 build/C/man3/raise.3:36 build/C/man2/rt_sigqueueinfo.2:33 build/C/man2/sgetmask.2:31 build/C/man2/sigaction.2:65 build/C/man2/sigaltstack.2:49 build/C/man7/sigevent.7:50 build/C/man3/siginterrupt.3:53 build/C/man2/signal.2:43 build/C/man7/signal.7:47 build/C/man2/signalfd.2:26 build/C/man3/sigpause.3:34 build/C/man2/sigpending.2:44 build/C/man2/sigprocmask.2:45 build/C/man3/sigqueue.3:41 build/C/man2/sigreturn.2:32 build/C/man3/sigset.3:56 build/C/man3/sigsetops.3:61 build/C/man2/sigsuspend.2:44 build/C/man3/sigvec.3:47 build/C/man3/sigwait.3:43 build/C/man2/sigwaitinfo.2:44 build/C/man3/sysv_signal.3:34 build/C/man2/timer_create.2:50 build/C/man2/timer_delete.2:42 build/C/man2/timer_getoverrun.2:42 build/C/man2/timer_settime.2:47 build/C/man2/timerfd_create.2:36 build/C/man2/tkill.2:38 build/C/man2/wait.2:82 build/C/man2/wait4.2:68
76 #, no-wrap
77 msgid "DESCRIPTION"
78 msgstr ""
79
80 #. type: Plain text
81 #: build/C/man3/bsd_signal.3:39
82 msgid ""
83 "The B<bsd_signal>()  function takes the same arguments, and performs the "
84 "same task, as B<signal>(2)."
85 msgstr ""
86
87 #. type: Plain text
88 #: build/C/man3/bsd_signal.3:52
89 msgid ""
90 "The difference between the two is that B<bsd_signal>()  is guaranteed to "
91 "provide reliable signal semantics, that is: a) the disposition of the signal "
92 "is not reset to the default when the handler is invoked; b) delivery of "
93 "further instances of the signal is blocked while the signal handler is "
94 "executing; and c) if the handler interrupts a blocking system call, then the "
95 "system call is automatically restarted.  A portable application cannot rely "
96 "on B<signal>(2)  to provide these guarantees."
97 msgstr ""
98
99 #. type: SH
100 #: build/C/man3/bsd_signal.3:52 build/C/man2/eventfd.2:222 build/C/man2/getitimer.2:117 build/C/man2/kill.2:99 build/C/man2/killpg.2:88 build/C/man2/pause.2:42 build/C/man2/prctl.2:381 build/C/man3/profil.3:66 build/C/man3/psignal.3:87 build/C/man3/raise.3:59 build/C/man2/rt_sigqueueinfo.2:124 build/C/man2/sgetmask.2:54 build/C/man2/sigaction.2:651 build/C/man2/sigaltstack.2:131 build/C/man3/siginterrupt.3:71 build/C/man2/signal.2:95 build/C/man2/signalfd.2:248 build/C/man3/sigpause.3:46 build/C/man2/sigpending.2:51 build/C/man2/sigprocmask.2:91 build/C/man3/sigqueue.3:81 build/C/man2/sigreturn.2:51 build/C/man3/sigset.3:127 build/C/man3/sigsetops.3:105 build/C/man2/sigsuspend.2:68 build/C/man3/sigvec.3:197 build/C/man3/sigwait.3:66 build/C/man2/sigwaitinfo.2:98 build/C/man3/sysv_signal.3:49 build/C/man2/timer_create.2:165 build/C/man2/timer_delete.2:50 build/C/man2/timer_getoverrun.2:79 build/C/man2/timer_settime.2:169 build/C/man2/timerfd_create.2:286 build/C/man2/tkill.2:69 build/C/man2/wait.2:354 build/C/man2/wait4.2:127
101 #, no-wrap
102 msgid "RETURN VALUE"
103 msgstr ""
104
105 #. type: Plain text
106 #: build/C/man3/bsd_signal.3:58
107 msgid ""
108 "The B<bsd_signal>()  function returns the previous value of the signal "
109 "handler, or B<SIG_ERR> on error."
110 msgstr ""
111
112 #. type: SH
113 #: build/C/man3/bsd_signal.3:58 build/C/man2/eventfd.2:229 build/C/man2/getitimer.2:122 build/C/man2/kill.2:104 build/C/man2/killpg.2:93 build/C/man2/pause.2:53 build/C/man2/prctl.2:398 build/C/man2/rt_sigqueueinfo.2:129 build/C/man2/sgetmask.2:59 build/C/man2/sigaction.2:654 build/C/man2/sigaltstack.2:135 build/C/man3/siginterrupt.3:76 build/C/man2/signal.2:100 build/C/man2/signalfd.2:262 build/C/man2/sigpending.2:54 build/C/man2/sigprocmask.2:94 build/C/man3/sigqueue.3:89 build/C/man3/sigset.3:152 build/C/man3/sigsetops.3:121 build/C/man2/sigsuspend.2:72 build/C/man3/sigvec.3:214 build/C/man3/sigwait.3:71 build/C/man2/sigwaitinfo.2:107 build/C/man3/sysv_signal.3:55 build/C/man2/timer_create.2:173 build/C/man2/timer_delete.2:57 build/C/man2/timer_getoverrun.2:87 build/C/man2/timer_settime.2:178 build/C/man2/timerfd_create.2:301 build/C/man2/tkill.2:73 build/C/man2/wait.2:383 build/C/man2/wait4.2:130
114 #, no-wrap
115 msgid "ERRORS"
116 msgstr ""
117
118 #. type: Plain text
119 #: build/C/man3/bsd_signal.3:61 build/C/man3/sysv_signal.3:58
120 msgid "As for B<signal>(2)."
121 msgstr ""
122
123 #. type: SH
124 #: build/C/man3/bsd_signal.3:61 build/C/man2/eventfd.2:266 build/C/man2/getitimer.2:143 build/C/man3/gsignal.3:93 build/C/man2/kill.2:120 build/C/man2/killpg.2:110 build/C/man2/pause.2:57 build/C/man2/prctl.2:475 build/C/man3/profil.3:68 build/C/man3/psignal.3:97 build/C/man3/raise.3:62 build/C/man2/rt_sigqueueinfo.2:171 build/C/man2/sgetmask.2:61 build/C/man2/sigaction.2:666 build/C/man2/sigaltstack.2:154 build/C/man7/sigevent.7:128 build/C/man3/siginterrupt.3:80 build/C/man2/signal.2:105 build/C/man7/signal.7:834 build/C/man2/signalfd.2:304 build/C/man3/sigpause.3:54 build/C/man2/sigpending.2:59 build/C/man2/sigprocmask.2:99 build/C/man3/sigqueue.3:112 build/C/man2/sigreturn.2:58 build/C/man3/sigset.3:171 build/C/man3/sigsetops.3:126 build/C/man2/sigsuspend.2:80 build/C/man3/sigvec.3:219 build/C/man3/sigwait.3:77 build/C/man2/sigwaitinfo.2:126 build/C/man3/sysv_signal.3:58 build/C/man2/timer_create.2:191 build/C/man2/timer_delete.2:64 build/C/man2/timer_getoverrun.2:94 build/C/man2/timer_settime.2:203 build/C/man2/timerfd_create.2:370 build/C/man2/tkill.2:90 build/C/man2/wait.2:421 build/C/man2/wait4.2:133
125 #, no-wrap
126 msgid "CONFORMING TO"
127 msgstr ""
128
129 #. type: Plain text
130 #: build/C/man3/bsd_signal.3:68
131 msgid ""
132 "4.2BSD, POSIX.1-2001.  POSIX.1-2008 removes the specification of "
133 "B<bsd_signal>(), recommending the use of B<sigaction>(2)  instead."
134 msgstr ""
135
136 #. type: SH
137 #: build/C/man3/bsd_signal.3:68 build/C/man2/eventfd.2:271 build/C/man2/getitimer.2:153 build/C/man2/kill.2:122 build/C/man2/killpg.2:114 build/C/man2/rt_sigqueueinfo.2:173 build/C/man2/sgetmask.2:63 build/C/man2/sigaction.2:669 build/C/man2/sigaltstack.2:156 build/C/man2/signal.2:107 build/C/man2/signalfd.2:309 build/C/man3/sigpause.3:58 build/C/man2/sigpending.2:61 build/C/man2/sigprocmask.2:101 build/C/man3/sigqueue.3:114 build/C/man2/sigreturn.2:62 build/C/man3/sigset.3:188 build/C/man3/sigsetops.3:128 build/C/man2/sigsuspend.2:82 build/C/man3/sigvec.3:225 build/C/man3/sigwait.3:79 build/C/man2/sigwaitinfo.2:128 build/C/man3/sysv_signal.3:60 build/C/man2/timer_create.2:193 build/C/man2/timer_getoverrun.2:96 build/C/man2/tkill.2:96 build/C/man2/wait.2:423 build/C/man2/wait4.2:135
138 #, no-wrap
139 msgid "NOTES"
140 msgstr ""
141
142 #. type: Plain text
143 #: build/C/man3/bsd_signal.3:74
144 msgid "Use of B<bsd_signal>()  should be avoided; use B<sigaction>(2)  instead."
145 msgstr ""
146
147 #. type: Plain text
148 #: build/C/man3/bsd_signal.3:85
149 msgid ""
150 "On modern Linux systems, B<bsd_signal>()  and B<signal>(2)  are equivalent.  "
151 "But on older systems, B<signal>(2)  provided unreliable signal semantics; "
152 "see B<signal>(2)  for details."
153 msgstr ""
154
155 #. type: Plain text
156 #: build/C/man3/bsd_signal.3:92 build/C/man3/sysv_signal.3:85
157 msgid ""
158 "The use of I<sighandler_t> is a GNU extension; this type is only defined if "
159 "the B<_GNU_SOURCE> feature test macro is defined."
160 msgstr ""
161
162 #. type: SH
163 #: build/C/man3/bsd_signal.3:92 build/C/man2/eventfd.2:417 build/C/man2/getitimer.2:219 build/C/man3/gsignal.3:101 build/C/man2/kill.2:170 build/C/man2/killpg.2:133 build/C/man2/pause.2:59 build/C/man2/prctl.2:489 build/C/man3/profil.3:79 build/C/man3/psignal.3:111 build/C/man3/raise.3:64 build/C/man2/rt_sigqueueinfo.2:183 build/C/man2/sgetmask.2:74 build/C/man2/sigaction.2:782 build/C/man2/sigaltstack.2:230 build/C/man7/sigevent.7:130 build/C/man3/siginterrupt.3:89 build/C/man2/signal.2:259 build/C/man7/signal.7:845 build/C/man2/signalfd.2:430 build/C/man3/sigpause.3:96 build/C/man2/sigpending.2:82 build/C/man2/sigprocmask.2:131 build/C/man3/sigqueue.3:147 build/C/man2/sigreturn.2:72 build/C/man3/sigset.3:264 build/C/man3/sigsetops.3:166 build/C/man2/sigsuspend.2:104 build/C/man3/sigvec.3:250 build/C/man3/sigwait.3:86 build/C/man2/sigwaitinfo.2:179 build/C/man3/sysv_signal.3:85 build/C/man2/timer_create.2:397 build/C/man2/timer_delete.2:66 build/C/man2/timer_getoverrun.2:128 build/C/man2/timer_settime.2:208 build/C/man2/timerfd_create.2:540 build/C/man2/tkill.2:105 build/C/man2/wait.2:605 build/C/man2/wait4.2:153
164 #, no-wrap
165 msgid "SEE ALSO"
166 msgstr ""
167
168 #. type: Plain text
169 #: build/C/man3/bsd_signal.3:97
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:97 build/C/man2/eventfd.2:428 build/C/man2/getitimer.2:226 build/C/man3/gsignal.3:105 build/C/man2/kill.2:180 build/C/man2/killpg.2:139 build/C/man2/pause.2:64 build/C/man2/prctl.2:492 build/C/man3/profil.3:84 build/C/man3/psignal.3:116 build/C/man3/raise.3:71 build/C/man2/rt_sigqueueinfo.2:191 build/C/man2/sgetmask.2:77 build/C/man2/sigaction.2:801 build/C/man2/sigaltstack.2:237 build/C/man7/sigevent.7:140 build/C/man3/siginterrupt.3:91 build/C/man2/signal.2:278 build/C/man7/signal.7:878 build/C/man2/signalfd.2:443 build/C/man3/sigpause.3:104 build/C/man2/sigpending.2:90 build/C/man2/sigprocmask.2:142 build/C/man3/sigqueue.3:155 build/C/man2/sigreturn.2:77 build/C/man3/sigset.3:274 build/C/man3/sigsetops.3:171 build/C/man2/sigsuspend.2:114 build/C/man3/sigvec.3:260 build/C/man3/sigwait.3:94 build/C/man2/sigwaitinfo.2:191 build/C/man3/sysv_signal.3:90 build/C/man2/timer_create.2:410 build/C/man2/timer_delete.2:72 build/C/man2/timer_getoverrun.2:138 build/C/man2/timer_settime.2:212 build/C/man2/timerfd_create.2:552 build/C/man2/tkill.2:110 build/C/man2/wait.2:617 build/C/man2/wait4.2:160
175 #, no-wrap
176 msgid "COLOPHON"
177 msgstr ""
178
179 #. type: Plain text
180 #: build/C/man3/bsd_signal.3:104 build/C/man2/eventfd.2:435 build/C/man2/getitimer.2:233 build/C/man3/gsignal.3:112 build/C/man2/kill.2:187 build/C/man2/killpg.2:146 build/C/man2/pause.2:71 build/C/man2/prctl.2:499 build/C/man3/profil.3:91 build/C/man3/psignal.3:123 build/C/man3/raise.3:78 build/C/man2/rt_sigqueueinfo.2:198 build/C/man2/sgetmask.2:84 build/C/man2/sigaction.2:808 build/C/man2/sigaltstack.2:244 build/C/man7/sigevent.7:147 build/C/man3/siginterrupt.3:98 build/C/man2/signal.2:285 build/C/man7/signal.7:885 build/C/man2/signalfd.2:450 build/C/man3/sigpause.3:111 build/C/man2/sigpending.2:97 build/C/man2/sigprocmask.2:149 build/C/man3/sigqueue.3:162 build/C/man2/sigreturn.2:84 build/C/man3/sigset.3:281 build/C/man3/sigsetops.3:178 build/C/man2/sigsuspend.2:121 build/C/man3/sigvec.3:267 build/C/man3/sigwait.3:101 build/C/man2/sigwaitinfo.2:198 build/C/man3/sysv_signal.3:97 build/C/man2/timer_create.2:417 build/C/man2/timer_delete.2:79 build/C/man2/timer_getoverrun.2:145 build/C/man2/timer_settime.2:219 build/C/man2/timerfd_create.2:559 build/C/man2/tkill.2:117 build/C/man2/wait.2:624 build/C/man2/wait4.2:167
181 msgid ""
182 "This page is part of release 3.37 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:21
189 #, no-wrap
190 msgid "EVENTFD"
191 msgstr ""
192
193 #. type: TH
194 #: build/C/man2/eventfd.2:21
195 #, no-wrap
196 msgid "2010-08-30"
197 msgstr ""
198
199 #. type: TH
200 #: build/C/man2/eventfd.2:21 build/C/man2/getitimer.2:7 build/C/man2/kill.2:44 build/C/man2/killpg.2:40 build/C/man2/pause.2:30 build/C/man2/prctl.2:46 build/C/man3/profil.3:28 build/C/man2/rt_sigqueueinfo.2:23 build/C/man2/sgetmask.2:24 build/C/man2/sigaction.2:45 build/C/man2/sigaltstack.2:25 build/C/man2/signal.2:34 build/C/man7/signal.7:44 build/C/man2/signalfd.2:19 build/C/man3/sigpause.3:23 build/C/man2/sigpending.2:27 build/C/man2/sigprocmask.2:27 build/C/man3/sigqueue.3:26 build/C/man2/sigreturn.2:27 build/C/man3/sigset.3:24 build/C/man3/sigsetops.3:29 build/C/man2/sigsuspend.2:27 build/C/man3/sigvec.3:24 build/C/man3/sigwait.3:24 build/C/man2/sigwaitinfo.2:23 build/C/man2/timer_create.2:29 build/C/man2/timer_delete.2:23 build/C/man2/timer_getoverrun.2:23 build/C/man2/timer_settime.2:23 build/C/man2/timerfd_create.2:20 build/C/man2/tkill.2:29 build/C/man2/wait.2:50 build/C/man2/wait4.2:34
201 #, no-wrap
202 msgid "Linux"
203 msgstr ""
204
205 #. type: Plain text
206 #: build/C/man2/eventfd.2:24
207 msgid "eventfd - create a file descriptor for event notification"
208 msgstr ""
209
210 #. type: Plain text
211 #: build/C/man2/eventfd.2:26
212 msgid "B<#include E<lt>sys/eventfd.hE<gt>>"
213 msgstr ""
214
215 #. type: Plain text
216 #: build/C/man2/eventfd.2:28
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:38
222 msgid ""
223 "B<eventfd>()  creates an \"eventfd object\" that can be used as an event "
224 "wait/notify mechanism by userspace applications, and by the kernel to notify "
225 "userspace applications of events.  The object contains an unsigned 64-bit "
226 "integer (I<uint64_t>)  counter that is maintained by the kernel.  This "
227 "counter is initialized with the value specified in the argument I<initval>."
228 msgstr ""
229
230 #. type: Plain text
231 #: build/C/man2/eventfd.2:43
232 msgid ""
233 "The following values may be bitwise ORed in I<flags> to change the behaviour "
234 "of B<eventfd>():"
235 msgstr ""
236
237 #. type: TP
238 #: build/C/man2/eventfd.2:43
239 #, no-wrap
240 msgid "B<EFD_CLOEXEC> (since Linux 2.6.27)"
241 msgstr ""
242
243 #. type: Plain text
244 #: build/C/man2/eventfd.2:53 build/C/man2/signalfd.2:94 build/C/man2/timerfd_create.2:102
245 msgid ""
246 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See "
247 "the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this "
248 "may be useful."
249 msgstr ""
250
251 #. type: TP
252 #: build/C/man2/eventfd.2:53
253 #, no-wrap
254 msgid "B<EFD_NONBLOCK> (since Linux 2.6.27)"
255 msgstr ""
256
257 #. type: Plain text
258 #: build/C/man2/eventfd.2:61 build/C/man2/signalfd.2:84 build/C/man2/timerfd_create.2:92
259 msgid ""
260 "Set the B<O_NONBLOCK> file status flag on the new open file description.  "
261 "Using this flag saves extra calls to B<fcntl>(2)  to achieve the same "
262 "result."
263 msgstr ""
264
265 #. type: TP
266 #: build/C/man2/eventfd.2:61
267 #, no-wrap
268 msgid "B<EFD_SEMAPHORE> (since Linux 2.6.30)"
269 msgstr ""
270
271 #. type: Plain text
272 #: build/C/man2/eventfd.2:65
273 msgid ""
274 "Provide semaphore-like semantics for reads from the new file descriptor.  "
275 "See below."
276 msgstr ""
277
278 #. type: Plain text
279 #: build/C/man2/eventfd.2:69 build/C/man2/signalfd.2:98
280 msgid ""
281 "In Linux up to version 2.6.26, the I<flags> argument is unused, and must be "
282 "specified as zero."
283 msgstr ""
284
285 #. type: Plain text
286 #: build/C/man2/eventfd.2:75
287 msgid ""
288 "As its return value, B<eventfd>()  returns a new file descriptor that can be "
289 "used to refer to the eventfd object.  The following operations can be "
290 "performed on the file descriptor:"
291 msgstr ""
292
293 #. type: TP
294 #: build/C/man2/eventfd.2:75 build/C/man2/signalfd.2:101 build/C/man2/timerfd_create.2:210
295 #, no-wrap
296 msgid "B<read>(2)"
297 msgstr ""
298
299 #. type: Plain text
300 #: build/C/man2/eventfd.2:85
301 msgid ""
302 "Each successful B<read>(2)  returns an 8-byte integer.  A B<read>(2)  will "
303 "fail with the error B<EINVAL> if the size of the supplied buffer is less "
304 "than 8 bytes."
305 msgstr ""
306
307 #. type: Plain text
308 #: build/C/man2/eventfd.2:90
309 msgid ""
310 "The value returned by B<read>(2)  is in host byte order, i.e., the native "
311 "byte order for integers on the host machine."
312 msgstr ""
313
314 #. type: Plain text
315 #: build/C/man2/eventfd.2:97
316 msgid ""
317 "The semantics of B<read>(2)  depend on whether the eventfd counter currently "
318 "has a nonzero value and whether the B<EFD_SEMAPHORE> flag was specified when "
319 "creating the eventfd file descriptor:"
320 msgstr ""
321
322 #. type: IP
323 #: build/C/man2/eventfd.2:98 build/C/man2/eventfd.2:105 build/C/man2/eventfd.2:112 build/C/man2/eventfd.2:157 build/C/man2/eventfd.2:167 build/C/man2/eventfd.2:177 build/C/man3/psignal.3:103 build/C/man3/psignal.3:107 build/C/man2/sigaction.2:294 build/C/man2/sigaction.2:309 build/C/man2/sigaction.2:325 build/C/man2/sigaction.2:340 build/C/man2/sigaction.2:387 build/C/man2/sigaction.2:423 build/C/man2/signal.2:66 build/C/man2/signal.2:71 build/C/man2/signal.2:78 build/C/man2/signal.2:205 build/C/man2/signal.2:209 build/C/man2/signal.2:248 build/C/man7/signal.7:147 build/C/man7/signal.7:155 build/C/man7/signal.7:611 build/C/man7/signal.7:613 build/C/man7/signal.7:634 build/C/man7/signal.7:649 build/C/man7/signal.7:653 build/C/man7/signal.7:660 build/C/man7/signal.7:676 build/C/man7/signal.7:682 build/C/man7/signal.7:689 build/C/man7/signal.7:694 build/C/man7/signal.7:713 build/C/man7/signal.7:732 build/C/man7/signal.7:739 build/C/man7/signal.7:748 build/C/man7/signal.7:756 build/C/man7/signal.7:762 build/C/man7/signal.7:767 build/C/man7/signal.7:787 build/C/man7/signal.7:806 build/C/man7/signal.7:809 build/C/man7/signal.7:812 build/C/man7/signal.7:815 build/C/man7/signal.7:820 build/C/man7/signal.7:826 build/C/man7/signal.7:830 build/C/man3/sigwait.3:59 build/C/man3/sigwait.3:64 build/C/man2/timer_create.2:214 build/C/man2/timer_create.2:217 build/C/man2/timer_create.2:220 build/C/man2/timer_create.2:224 build/C/man2/timer_create.2:227 build/C/man2/timer_create.2:233 build/C/man2/timer_create.2:237
324 #, no-wrap
325 msgid "*"
326 msgstr ""
327
328 #. type: Plain text
329 #: build/C/man2/eventfd.2:105
330 msgid ""
331 "If B<EFD_SEMAPHORE> was not specified and the eventfd counter has a nonzero "
332 "value, then a B<read>(2)  returns 8 bytes containing that value, and the "
333 "counter's value is reset to zero."
334 msgstr ""
335
336 #. type: Plain text
337 #: build/C/man2/eventfd.2:112
338 msgid ""
339 "If B<EFD_SEMAPHORE> was specified and the eventfd counter has a nonzero "
340 "value, then a B<read>(2)  returns 8 bytes containing the value 1, and the "
341 "counter's value is decremented by 1."
342 msgstr ""
343
344 #. type: Plain text
345 #: build/C/man2/eventfd.2:122
346 msgid ""
347 "If the eventfd counter is zero at the time of the call to B<read>(2), then "
348 "the call either blocks until the counter becomes nonzero (at which time, the "
349 "B<read>(2)  proceeds as described above)  or fails with the error B<EAGAIN> "
350 "if the file descriptor has been made nonblocking."
351 msgstr ""
352
353 #. type: TP
354 #: build/C/man2/eventfd.2:123
355 #, no-wrap
356 msgid "B<write>(2)"
357 msgstr ""
358
359 #. type: Plain text
360 #: build/C/man2/eventfd.2:140
361 msgid ""
362 "A B<write>(2)  call adds the 8-byte integer value supplied in its buffer to "
363 "the counter.  The maximum value that may be stored in the counter is the "
364 "largest unsigned 64-bit value minus 1 (i.e., 0xfffffffffffffffe).  If the "
365 "addition would cause the counter's value to exceed the maximum, then the "
366 "B<write>(2)  either blocks until a B<read>(2)  is performed on the file "
367 "descriptor, or fails with the error B<EAGAIN> if the file descriptor has "
368 "been made nonblocking."
369 msgstr ""
370
371 #. type: Plain text
372 #: build/C/man2/eventfd.2:147
373 msgid ""
374 "A B<write>(2)  will fail with the error B<EINVAL> if the size of the "
375 "supplied buffer is less than 8 bytes, or if an attempt is made to write the "
376 "value 0xffffffffffffffff."
377 msgstr ""
378
379 #. type: TP
380 #: build/C/man2/eventfd.2:147 build/C/man2/signalfd.2:139 build/C/man2/timerfd_create.2:243
381 #, no-wrap
382 msgid "B<poll>(2), B<select>(2) (and similar)"
383 msgstr ""
384
385 #. type: Plain text
386 #: build/C/man2/eventfd.2:156
387 msgid ""
388 "The returned file descriptor supports B<poll>(2)  (and analogously "
389 "B<epoll>(7))  and B<select>(2), as follows:"
390 msgstr ""
391
392 #. type: Plain text
393 #: build/C/man2/eventfd.2:167
394 msgid ""
395 "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the "
396 "B<poll>(2)  B<POLLIN> flag)  if the counter has a value greater than 0."
397 msgstr ""
398
399 #. type: Plain text
400 #: build/C/man2/eventfd.2:177
401 msgid ""
402 "The file descriptor is writable (the B<select>(2)  I<writefds> argument; the "
403 "B<poll>(2)  B<POLLOUT> flag)  if it is possible to write a value of at least "
404 "\"1\" without blocking."
405 msgstr ""
406
407 #. type: Plain text
408 #: build/C/man2/eventfd.2:197
409 msgid ""
410 "If an overflow of the counter value was detected, then B<select>(2)  "
411 "indicates the file descriptor as being both readable and writable, and "
412 "B<poll>(2)  returns a B<POLLERR> event.  As noted above, B<write>(2)  can "
413 "never overflow the counter.  However an overflow can occur if 2^64 eventfd "
414 "\"signal posts\" were performed by the KAIO subsystem (theoretically "
415 "possible, but practically unlikely).  If an overflow has occurred, then "
416 "B<read>(2)  will return that maximum I<uint64_t> value (i.e., "
417 "0xffffffffffffffff)."
418 msgstr ""
419
420 #. type: Plain text
421 #: build/C/man2/eventfd.2:205
422 msgid ""
423 "The eventfd file descriptor also supports the other file-descriptor "
424 "multiplexing APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
425 msgstr ""
426
427 #. type: TP
428 #: build/C/man2/eventfd.2:205 build/C/man2/signalfd.2:159 build/C/man2/timerfd_create.2:261
429 #, no-wrap
430 msgid "B<close>(2)"
431 msgstr ""
432
433 #. type: Plain text
434 #: build/C/man2/eventfd.2:210
435 msgid ""
436 "When the file descriptor is no longer required it should be closed.  When "
437 "all file descriptors associated with the same eventfd object have been "
438 "closed, the resources for object are freed by the kernel."
439 msgstr ""
440
441 #. type: Plain text
442 #: build/C/man2/eventfd.2:222
443 msgid ""
444 "A copy of the file descriptor created by B<eventfd>()  is inherited by the "
445 "child produced by B<fork>(2).  The duplicate file descriptor is associated "
446 "with the same eventfd object.  File descriptors created by B<eventfd>()  are "
447 "preserved across B<execve>(2), unless the close-on-exec flag has been set."
448 msgstr ""
449
450 #. type: Plain text
451 #: build/C/man2/eventfd.2:229
452 msgid ""
453 "On success, B<eventfd>()  returns a new eventfd file descriptor.  On error, "
454 "-1 is returned and I<errno> is set to indicate the error."
455 msgstr ""
456
457 #. type: TP
458 #: build/C/man2/eventfd.2:230 build/C/man2/getitimer.2:130 build/C/man2/kill.2:105 build/C/man2/killpg.2:94 build/C/man2/prctl.2:403 build/C/man2/prctl.2:408 build/C/man2/prctl.2:418 build/C/man2/prctl.2:423 build/C/man2/rt_sigqueueinfo.2:136 build/C/man2/sigaction.2:659 build/C/man2/sigaltstack.2:140 build/C/man3/siginterrupt.3:77 build/C/man2/signal.2:101 build/C/man2/signalfd.2:268 build/C/man2/signalfd.2:276 build/C/man3/sigqueue.3:96 build/C/man3/sigsetops.3:122 build/C/man3/sigwait.3:72 build/C/man2/sigwaitinfo.2:122 build/C/man2/timer_create.2:177 build/C/man2/timer_delete.2:58 build/C/man2/timer_getoverrun.2:88 build/C/man2/timer_settime.2:187 build/C/man2/timer_settime.2:195 build/C/man2/timerfd_create.2:304 build/C/man2/timerfd_create.2:312 build/C/man2/timerfd_create.2:348 build/C/man2/timerfd_create.2:355 build/C/man2/timerfd_create.2:361 build/C/man2/tkill.2:74 build/C/man2/wait.2:416
459 #, no-wrap
460 msgid "B<EINVAL>"
461 msgstr ""
462
463 #. type: Plain text
464 #: build/C/man2/eventfd.2:234
465 msgid "An unsupported value was specified in I<flags>."
466 msgstr ""
467
468 #. type: TP
469 #: build/C/man2/eventfd.2:234 build/C/man2/signalfd.2:283 build/C/man2/timerfd_create.2:319
470 #, no-wrap
471 msgid "B<EMFILE>"
472 msgstr ""
473
474 #. type: Plain text
475 #: build/C/man2/eventfd.2:237
476 msgid "The per-process limit on open file descriptors has been reached."
477 msgstr ""
478
479 #. type: TP
480 #: build/C/man2/eventfd.2:237 build/C/man2/signalfd.2:286 build/C/man2/timerfd_create.2:322
481 #, no-wrap
482 msgid "B<ENFILE>"
483 msgstr ""
484
485 #. type: Plain text
486 #: build/C/man2/eventfd.2:241 build/C/man2/signalfd.2:290 build/C/man2/timerfd_create.2:326
487 msgid "The system-wide limit on the total number of open files has been reached."
488 msgstr ""
489
490 #. type: TP
491 #: build/C/man2/eventfd.2:241 build/C/man2/signalfd.2:290 build/C/man2/timerfd_create.2:326
492 #, no-wrap
493 msgid "B<ENODEV>"
494 msgstr ""
495
496 #. type: Plain text
497 #: build/C/man2/eventfd.2:249 build/C/man2/signalfd.2:293 build/C/man2/timerfd_create.2:329
498 msgid "Could not mount (internal) anonymous inode device."
499 msgstr ""
500
501 #. type: TP
502 #: build/C/man2/eventfd.2:249 build/C/man2/sigaltstack.2:145 build/C/man2/signalfd.2:293 build/C/man2/timer_create.2:185 build/C/man2/timerfd_create.2:329
503 #, no-wrap
504 msgid "B<ENOMEM>"
505 msgstr ""
506
507 #. type: Plain text
508 #: build/C/man2/eventfd.2:253
509 msgid "There was insufficient memory to create a new eventfd file descriptor."
510 msgstr ""
511
512 #. type: SH
513 #: build/C/man2/eventfd.2:253 build/C/man2/prctl.2:470 build/C/man3/psignal.3:93 build/C/man2/rt_sigqueueinfo.2:164 build/C/man2/signalfd.2:296 build/C/man3/sigqueue.3:110 build/C/man2/timer_create.2:189 build/C/man2/timer_delete.2:62 build/C/man2/timer_getoverrun.2:92 build/C/man2/timer_settime.2:201 build/C/man2/timerfd_create.2:367 build/C/man2/tkill.2:85
514 #, no-wrap
515 msgid "VERSIONS"
516 msgstr ""
517
518 #.  eventfd() is in glibc 2.7, but reportedly does not build
519 #. type: Plain text
520 #: build/C/man2/eventfd.2:266
521 msgid ""
522 "B<eventfd>()  is available on Linux since kernel 2.6.22.  Working support is "
523 "provided in glibc since version 2.8.  The B<eventfd2>()  system call (see "
524 "NOTES) is available on Linux since kernel 2.6.27.  Since version 2.9, the "
525 "glibc B<eventfd>()  wrapper will employ the B<eventfd2>()  system call, if "
526 "it is supported by the kernel."
527 msgstr ""
528
529 #. type: Plain text
530 #: build/C/man2/eventfd.2:271
531 msgid "B<eventfd>()  and B<eventfd2>()  are Linux-specific."
532 msgstr ""
533
534 #. type: Plain text
535 #: build/C/man2/eventfd.2:279
536 msgid ""
537 "Applications can use an eventfd file descriptor instead of a pipe (see "
538 "B<pipe>(2))  in all cases where a pipe is used simply to signal events.  The "
539 "kernel overhead of an eventfd file descriptor is much lower than that of a "
540 "pipe, and only one file descriptor is required (versus the two required for "
541 "a pipe)."
542 msgstr ""
543
544 #.  or eventually syslets/threadlets
545 #. type: Plain text
546 #: build/C/man2/eventfd.2:285
547 msgid ""
548 "When used in the kernel, an eventfd file descriptor can provide a "
549 "kernel-userspace bridge allowing, for example, functionalities like KAIO "
550 "(kernel AIO)  to signal to a file descriptor that some operation is "
551 "complete."
552 msgstr ""
553
554 #. type: Plain text
555 #: build/C/man2/eventfd.2:302
556 msgid ""
557 "A key point about an eventfd file descriptor is that it can be monitored "
558 "just like any other file descriptor using B<select>(2), B<poll>(2), or "
559 "B<epoll>(7).  This means that an application can simultaneously monitor the "
560 "readiness of \"traditional\" files and the readiness of other kernel "
561 "mechanisms that support the eventfd interface.  (Without the B<eventfd>()  "
562 "interface, these mechanisms could not be multiplexed via B<select>(2), "
563 "B<poll>(2), or B<epoll>(7).)"
564 msgstr ""
565
566 #. type: SS
567 #: build/C/man2/eventfd.2:302 build/C/man2/signalfd.2:333
568 #, no-wrap
569 msgid "Underlying Linux system calls"
570 msgstr ""
571
572 #. type: Plain text
573 #: build/C/man2/eventfd.2:316
574 msgid ""
575 "There are two underlying Linux system calls: B<eventfd>()  and the more "
576 "recent B<eventfd2>().  The former system call does not implement a I<flags> "
577 "argument.  The latter system call implements the I<flags> values described "
578 "above.  The glibc wrapper function will use B<eventfd2>()  where it is "
579 "available."
580 msgstr ""
581
582 #. type: SS
583 #: build/C/man2/eventfd.2:316
584 #, no-wrap
585 msgid "Additional glibc features"
586 msgstr ""
587
588 #. type: Plain text
589 #: build/C/man2/eventfd.2:320
590 msgid ""
591 "The GNU C library defines an additional type, and two functions that attempt "
592 "to abstract some of the details of reading and writing on an eventfd file "
593 "descriptor:"
594 msgstr ""
595
596 #. type: Plain text
597 #: build/C/man2/eventfd.2:324
598 #, no-wrap
599 msgid "typedef uint64_t eventfd_t;\n"
600 msgstr ""
601
602 #. type: Plain text
603 #: build/C/man2/eventfd.2:327
604 #, no-wrap
605 msgid ""
606 "int eventfd_read(int fd, eventfd_t *value);\n"
607 "int eventfd_write(int fd, eventfd_t value);\n"
608 msgstr ""
609
610 #. type: Plain text
611 #: build/C/man2/eventfd.2:334
612 msgid ""
613 "The functions perform the read and write operations on an eventfd file "
614 "descriptor, returning 0 if the correct number of bytes was transferred, or "
615 "-1 otherwise."
616 msgstr ""
617
618 #. type: SH
619 #: build/C/man2/eventfd.2:334 build/C/man2/sigaction.2:779 build/C/man2/sigaltstack.2:213 build/C/man2/signalfd.2:357 build/C/man2/timer_create.2:251 build/C/man2/timer_getoverrun.2:125 build/C/man2/timer_settime.2:205 build/C/man2/timerfd_create.2:372 build/C/man2/wait.2:522
620 #, no-wrap
621 msgid "EXAMPLE"
622 msgstr ""
623
624 #. type: Plain text
625 #: build/C/man2/eventfd.2:343
626 msgid ""
627 "The following program creates an eventfd file descriptor and then forks to "
628 "create a child process.  While the parent briefly sleeps, the child writes "
629 "each of the integers supplied in the program's command-line arguments to the "
630 "eventfd file descriptor.  When the parent has finished sleeping, it reads "
631 "from the eventfd file descriptor."
632 msgstr ""
633
634 #. type: Plain text
635 #: build/C/man2/eventfd.2:345
636 msgid "The following shell session shows a sample run of the program:"
637 msgstr ""
638
639 #. type: Plain text
640 #: build/C/man2/eventfd.2:357
641 #, no-wrap
642 msgid ""
643 "$B< ./a.out 1 2 4 7 14>\n"
644 "Child writing 1 to efd\n"
645 "Child writing 2 to efd\n"
646 "Child writing 4 to efd\n"
647 "Child writing 7 to efd\n"
648 "Child writing 14 to efd\n"
649 "Child completed write loop\n"
650 "Parent about to read\n"
651 "Parent read 28 (0x1c) from efd\n"
652 msgstr ""
653
654 #. type: SS
655 #: build/C/man2/eventfd.2:359 build/C/man2/signalfd.2:380 build/C/man2/timerfd_create.2:400 build/C/man2/wait.2:557
656 #, no-wrap
657 msgid "Program source"
658 msgstr ""
659
660 #. type: Plain text
661 #: build/C/man2/eventfd.2:367
662 #, no-wrap
663 msgid ""
664 "#include E<lt>sys/eventfd.hE<gt>\n"
665 "#include E<lt>unistd.hE<gt>\n"
666 "#include E<lt>stdlib.hE<gt>\n"
667 "#include E<lt>stdio.hE<gt>\n"
668 "#include E<lt>stdint.hE<gt>             /* Definition of uint64_t */\n"
669 msgstr ""
670
671 #. type: Plain text
672 #: build/C/man2/eventfd.2:370 build/C/man2/signalfd.2:391
673 #, no-wrap
674 msgid ""
675 "#define handle_error(msg) \\e\n"
676 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
677 msgstr ""
678
679 #. type: Plain text
680 #: build/C/man2/eventfd.2:377
681 #, no-wrap
682 msgid ""
683 "int\n"
684 "main(int argc, char *argv[])\n"
685 "{\n"
686 "    int efd, j;\n"
687 "    uint64_t u;\n"
688 "    ssize_t s;\n"
689 msgstr ""
690
691 #. type: Plain text
692 #: build/C/man2/eventfd.2:382
693 #, no-wrap
694 msgid ""
695 "    if (argc E<lt> 2) {\n"
696 "        fprintf(stderr, \"Usage: %s E<lt>numE<gt>...\\en\", argv[0]);\n"
697 "        exit(EXIT_FAILURE);\n"
698 "    }\n"
699 msgstr ""
700
701 #. type: Plain text
702 #: build/C/man2/eventfd.2:386
703 #, no-wrap
704 msgid ""
705 "    efd = eventfd(0, 0);\n"
706 "    if (efd == -1)\n"
707 "        handle_error(\"eventfd\");\n"
708 msgstr ""
709
710 #. type: Plain text
711 #: build/C/man2/eventfd.2:398
712 #, no-wrap
713 msgid ""
714 "    switch (fork()) {\n"
715 "    case 0:\n"
716 "        for (j = 1; j E<lt> argc; j++) {\n"
717 "            printf(\"Child writing %s to efd\\en\", argv[j]);\n"
718 "            u = strtoull(argv[j], NULL, 0);\n"
719 "                    /* strtoull() allows various bases */\n"
720 "            s = write(efd, &u, sizeof(uint64_t));\n"
721 "            if (s != sizeof(uint64_t))\n"
722 "                handle_error(\"write\");\n"
723 "        }\n"
724 "        printf(\"Child completed write loop\\en\");\n"
725 msgstr ""
726
727 #. type: Plain text
728 #: build/C/man2/eventfd.2:400
729 #, no-wrap
730 msgid "        exit(EXIT_SUCCESS);\n"
731 msgstr ""
732
733 #. type: Plain text
734 #: build/C/man2/eventfd.2:403
735 #, no-wrap
736 msgid ""
737 "    default:\n"
738 "        sleep(2);\n"
739 msgstr ""
740
741 #. type: Plain text
742 #: build/C/man2/eventfd.2:411
743 #, no-wrap
744 msgid ""
745 "        printf(\"Parent about to read\\en\");\n"
746 "        s = read(efd, &u, sizeof(uint64_t));\n"
747 "        if (s != sizeof(uint64_t))\n"
748 "            handle_error(\"read\");\n"
749 "        printf(\"Parent read %llu (0x%llx) from efd\\en\",\n"
750 "                (unsigned long long) u, (unsigned long long) u);\n"
751 "        exit(EXIT_SUCCESS);\n"
752 msgstr ""
753
754 #. type: Plain text
755 #: build/C/man2/eventfd.2:416
756 #, no-wrap
757 msgid ""
758 "    case -1:\n"
759 "        handle_error(\"fork\");\n"
760 "    }\n"
761 "}\n"
762 msgstr ""
763
764 #. type: Plain text
765 #: build/C/man2/eventfd.2:428
766 msgid ""
767 "B<futex>(2), B<pipe>(2), B<poll>(2), B<read>(2), B<select>(2), "
768 "B<signalfd>(2), B<timerfd_create>(2), B<write>(2), B<epoll>(7), "
769 "B<sem_overview>(7)"
770 msgstr ""
771
772 #. type: TH
773 #: build/C/man2/getitimer.2:7
774 #, no-wrap
775 msgid "GETITIMER"
776 msgstr ""
777
778 #. type: Plain text
779 #: build/C/man2/getitimer.2:10
780 msgid "getitimer, setitimer - get or set value of an interval timer"
781 msgstr ""
782
783 #. type: Plain text
784 #: build/C/man2/getitimer.2:13
785 #, no-wrap
786 msgid "B<#include E<lt>sys/time.hE<gt>>\n"
787 msgstr ""
788
789 #. type: Plain text
790 #: build/C/man2/getitimer.2:15
791 #, no-wrap
792 msgid "B<int getitimer(int >I<which>B<, struct itimerval *>I<curr_value>B<);>\n"
793 msgstr ""
794
795 #. type: Plain text
796 #: build/C/man2/getitimer.2:18
797 #, no-wrap
798 msgid ""
799 "B<int setitimer(int >I<which>B<, const struct itimerval *>I<new_value>B<,>\n"
800 "B<              struct itimerval *>I<old_value>B<);>\n"
801 msgstr ""
802
803 #. type: Plain text
804 #: build/C/man2/getitimer.2:24
805 msgid ""
806 "The system provides each process with three interval timers, each "
807 "decrementing in a distinct time domain.  When any timer expires, a signal is "
808 "sent to the process, and the timer (potentially) restarts."
809 msgstr ""
810
811 #. type: TP
812 #: build/C/man2/getitimer.2:24
813 #, no-wrap
814 msgid "B<ITIMER_REAL>"
815 msgstr ""
816
817 #. type: Plain text
818 #: build/C/man2/getitimer.2:29
819 msgid "decrements in real time, and delivers B<SIGALRM> upon expiration."
820 msgstr ""
821
822 #. type: TP
823 #: build/C/man2/getitimer.2:29
824 #, no-wrap
825 msgid "B<ITIMER_VIRTUAL>"
826 msgstr ""
827
828 #. type: Plain text
829 #: build/C/man2/getitimer.2:34
830 msgid ""
831 "decrements only when the process is executing, and delivers B<SIGVTALRM> "
832 "upon expiration."
833 msgstr ""
834
835 #. type: TP
836 #: build/C/man2/getitimer.2:34
837 #, no-wrap
838 msgid "B<ITIMER_PROF>"
839 msgstr ""
840
841 #. type: Plain text
842 #: build/C/man2/getitimer.2:44
843 msgid ""
844 "decrements both when the process executes and when the system is executing "
845 "on behalf of the process.  Coupled with B<ITIMER_VIRTUAL>, this timer is "
846 "usually used to profile the time spent by the application in user and kernel "
847 "space.  B<SIGPROF> is delivered upon expiration."
848 msgstr ""
849
850 #. type: Plain text
851 #: build/C/man2/getitimer.2:46
852 msgid "Timer values are defined by the following structures:"
853 msgstr ""
854
855 #. type: Plain text
856 #: build/C/man2/getitimer.2:54
857 #, no-wrap
858 msgid ""
859 "struct itimerval {\n"
860 "    struct timeval it_interval; /* next value */\n"
861 "    struct timeval it_value;    /* current value */\n"
862 "};\n"
863 msgstr ""
864
865 #. type: Plain text
866 #: build/C/man2/getitimer.2:59
867 #, no-wrap
868 msgid ""
869 "struct timeval {\n"
870 "    long tv_sec;                /* seconds */\n"
871 "    long tv_usec;               /* microseconds */\n"
872 "};\n"
873 msgstr ""
874
875 #. type: Plain text
876 #: build/C/man2/getitimer.2:81
877 msgid ""
878 "The function B<getitimer>()  fills the structure pointed to by I<curr_value> "
879 "with the current setting for the timer specified by I<which> (one of "
880 "B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, or B<ITIMER_PROF>).  The element "
881 "I<it_value> is set to the amount of time remaining on the timer, or zero if "
882 "the timer is disabled.  Similarly, I<it_interval> is set to the reset value."
883 msgstr ""
884
885 #. type: Plain text
886 #: build/C/man2/getitimer.2:89
887 msgid ""
888 "The function B<setitimer>()  sets the specified timer to the value in "
889 "I<new_value>.  If I<old_value> is non-NULL, the old value of the timer is "
890 "stored there."
891 msgstr ""
892
893 #. type: Plain text
894 #: build/C/man2/getitimer.2:99
895 msgid ""
896 "Timers decrement from I<it_value> to zero, generate a signal, and reset to "
897 "I<it_interval>.  A timer which is set to zero (I<it_value> is zero or the "
898 "timer expires and I<it_interval> is zero) stops."
899 msgstr ""
900
901 #. type: Plain text
902 #: build/C/man2/getitimer.2:105
903 msgid ""
904 "Both I<tv_sec> and I<tv_usec> are significant in determining the duration of "
905 "a timer."
906 msgstr ""
907
908 #. type: Plain text
909 #: build/C/man2/getitimer.2:117
910 msgid ""
911 "Timers will never expire before the requested time, but may expire some "
912 "(short) time afterward, which depends on the system timer resolution and on "
913 "the system load; see B<time>(7).  (But see BUGS below.)  Upon expiration, a "
914 "signal will be generated and the timer reset.  If the timer expires while "
915 "the process is active (always true for B<ITIMER_VIRTUAL>)  the signal will "
916 "be delivered immediately when generated.  Otherwise the delivery will be "
917 "offset by a small time dependent on the system loading."
918 msgstr ""
919
920 #. type: Plain text
921 #: build/C/man2/getitimer.2:122 build/C/man2/killpg.2:93 build/C/man2/tkill.2:73
922 msgid ""
923 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
924 "appropriately."
925 msgstr ""
926
927 #. type: TP
928 #: build/C/man2/getitimer.2:123 build/C/man2/prctl.2:399 build/C/man2/sigaction.2:655 build/C/man2/sigaltstack.2:136 build/C/man2/sigpending.2:55 build/C/man2/sigsuspend.2:73 build/C/man2/timer_settime.2:180 build/C/man2/timerfd_create.2:341
929 #, no-wrap
930 msgid "B<EFAULT>"
931 msgstr ""
932
933 #. type: Plain text
934 #: build/C/man2/getitimer.2:130 build/C/man2/timerfd_create.2:348
935 msgid "I<new_value>, I<old_value>, or I<curr_value> is not valid a pointer."
936 msgstr ""
937
938 #. type: Plain text
939 #: build/C/man2/getitimer.2:143
940 msgid ""
941 "I<which> is not one of B<ITIMER_REAL>, B<ITIMER_VIRTUAL>, or B<ITIMER_PROF>; "
942 "or (since Linux 2.6.22) one of the I<tv_usec> fields in the structure "
943 "pointed to by I<new_value> contains a value outside the range 0 to 999999."
944 msgstr ""
945
946 #. type: Plain text
947 #: build/C/man2/getitimer.2:153
948 msgid ""
949 "POSIX.1-2001, SVr4, 4.4BSD (this call first appeared in 4.2BSD).  "
950 "POSIX.1-2008 marks B<getitimer>()  and B<setitimer>()  obsolete, "
951 "recommending the use of the POSIX timers API (B<timer_gettime>(2), "
952 "B<timer_settime>(2), etc.) instead."
953 msgstr ""
954
955 #. type: Plain text
956 #: build/C/man2/getitimer.2:159
957 msgid ""
958 "A child created via B<fork>(2)  does not inherit its parent's interval "
959 "timers.  Interval timers are preserved across an B<execve>(2)."
960 msgstr ""
961
962 #. type: Plain text
963 #: build/C/man2/getitimer.2:169
964 msgid ""
965 "POSIX.1 leaves the interaction between B<setitimer>()  and the three "
966 "interfaces B<alarm>(2), B<sleep>(3), and B<usleep>(3)  unspecified."
967 msgstr ""
968
969 #. type: SH
970 #: build/C/man2/getitimer.2:169 build/C/man2/kill.2:160 build/C/man3/profil.3:70 build/C/man3/psignal.3:99 build/C/man2/sigaction.2:770 build/C/man7/signal.7:836 build/C/man2/signalfd.2:349 build/C/man2/sigpending.2:76 build/C/man3/sigset.3:230 build/C/man2/timer_getoverrun.2:112 build/C/man2/timerfd_create.2:534
971 #, no-wrap
972 msgid "BUGS"
973 msgstr ""
974
975 #. type: Plain text
976 #: build/C/man2/getitimer.2:178
977 msgid ""
978 "The generation and delivery of a signal are distinct, and only one instance "
979 "of each of the signals listed above may be pending for a process.  Under "
980 "very heavy loading, an B<ITIMER_REAL> timer may expire before the signal "
981 "from a previous expiration has been delivered.  The second signal in such an "
982 "event will be lost."
983 msgstr ""
984
985 #. type: Plain text
986 #: build/C/man2/getitimer.2:193
987 msgid ""
988 "On Linux kernels before 2.6.16, timer values are represented in jiffies.  If "
989 "a request is made set a timer with a value whose jiffies representation "
990 "exceeds B<MAX_SEC_IN_JIFFIES> (defined in I<include/linux/jiffies.h>), then "
991 "the timer is silently truncated to this ceiling value.  On Linux/i386 "
992 "(where, since Linux 2.6.13, the default jiffy is 0.004 seconds), this means "
993 "that the ceiling value for a timer is approximately 99.42 days.  Since Linux "
994 "2.6.16, the kernel uses a different internal representation for times, and "
995 "this ceiling is removed."
996 msgstr ""
997
998 #.  4 Jul 2005: It looks like this bug may remain in 2.4.x.
999 #.      http://lkml.org/lkml/2005/7/1/165
1000 #. type: Plain text
1001 #: build/C/man2/getitimer.2:200
1002 msgid ""
1003 "On certain systems (including i386), Linux kernels before version 2.6.12 "
1004 "have a bug which will produce premature timer expirations of up to one jiffy "
1005 "under some circumstances.  This bug is fixed in kernel 2.6.12."
1006 msgstr ""
1007
1008 #.  Bugzilla report 25 Apr 2006:
1009 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6443
1010 #.  "setitimer() should reject noncanonical arguments"
1011 #. type: Plain text
1012 #: build/C/man2/getitimer.2:219
1013 msgid ""
1014 "POSIX.1-2001 says that B<setitimer>()  should fail if a I<tv_usec> value is "
1015 "specified that is outside of the range 0 to 999999.  However, in kernels up "
1016 "to and including 2.6.21, Linux does not give an error, but instead silently "
1017 "adjusts the corresponding seconds value for the timer.  From kernel 2.6.22 "
1018 "onward, this nonconformance has been repaired: an improper I<tv_usec> value "
1019 "results in an B<EINVAL> error."
1020 msgstr ""
1021
1022 #. type: Plain text
1023 #: build/C/man2/getitimer.2:226
1024 msgid ""
1025 "B<gettimeofday>(2), B<sigaction>(2), B<signal>(2), B<timer_create>(2), "
1026 "B<timerfd_create>(2), B<time>(7)"
1027 msgstr ""
1028
1029 #. type: TH
1030 #: build/C/man3/gsignal.3:25
1031 #, no-wrap
1032 msgid "GSIGNAL"
1033 msgstr ""
1034
1035 #. type: TH
1036 #: build/C/man3/gsignal.3:25 build/C/man3/profil.3:28 build/C/man3/sigvec.3:24
1037 #, no-wrap
1038 msgid "2007-07-26"
1039 msgstr ""
1040
1041 #. type: Plain text
1042 #: build/C/man3/gsignal.3:28
1043 msgid "gsignal, ssignal - software signal facility"
1044 msgstr ""
1045
1046 #. type: Plain text
1047 #: build/C/man3/gsignal.3:31 build/C/man2/kill.2:52 build/C/man3/psignal.3:34 build/C/man3/raise.3:33 build/C/man2/sigaction.2:51 build/C/man3/siginterrupt.3:35 build/C/man3/sigpause.3:29 build/C/man3/sigwait.3:30 build/C/man2/sigwaitinfo.2:29
1048 #, no-wrap
1049 msgid "B<#include E<lt>signal.hE<gt>>\n"
1050 msgstr ""
1051
1052 #. type: Plain text
1053 #: build/C/man3/gsignal.3:33
1054 #, no-wrap
1055 msgid "B<typedef void (*sighandler_t)(int);>\n"
1056 msgstr ""
1057
1058 #. type: Plain text
1059 #: build/C/man3/gsignal.3:35
1060 #, no-wrap
1061 msgid "B<int gsignal(int>I<signum>B<);>\n"
1062 msgstr ""
1063
1064 #. type: Plain text
1065 #: build/C/man3/gsignal.3:37
1066 #, no-wrap
1067 msgid "B<sighandler_t ssignal(int >I<signum>B<, sighandler_t >I<action>B<);>\n"
1068 msgstr ""
1069
1070 #. type: Plain text
1071 #: build/C/man3/gsignal.3:42 build/C/man2/kill.2:59 build/C/man2/killpg.2:51 build/C/man3/profil.3:40 build/C/man3/psignal.3:44 build/C/man2/sigaction.2:59 build/C/man2/sigaltstack.2:36 build/C/man3/siginterrupt.3:42 build/C/man2/sigpending.2:38 build/C/man2/sigprocmask.2:39 build/C/man3/sigqueue.3:37 build/C/man3/sigset.3:43 build/C/man3/sigsetops.3:49 build/C/man2/sigsuspend.2:38 build/C/man3/sigvec.3:43 build/C/man3/sigwait.3:37 build/C/man2/sigwaitinfo.2:39 build/C/man2/timer_create.2:46 build/C/man2/timer_delete.2:38 build/C/man2/timer_getoverrun.2:38 build/C/man2/timer_settime.2:42 build/C/man2/wait.2:68 build/C/man2/wait4.2:54
1072 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1073 msgstr ""
1074
1075 #. type: Plain text
1076 #: build/C/man3/gsignal.3:47
1077 msgid "B<gsignal>(), B<ssignal>(): _SVID_SOURCE"
1078 msgstr ""
1079
1080 #. type: Plain text
1081 #: build/C/man3/gsignal.3:55
1082 msgid ""
1083 "Don't use these functions under Linux.  Due to a historical mistake, under "
1084 "Linux these functions are aliases for B<raise>(3)  and B<signal>(2), "
1085 "respectively."
1086 msgstr ""
1087
1088 #. type: Plain text
1089 #: build/C/man3/gsignal.3:93
1090 msgid ""
1091 "Elsewhere, on System V-like systems, these functions implement software "
1092 "signaling, entirely independent of the classical B<signal>(2)  and "
1093 "B<kill>(2)  functions.  The function B<ssignal>()  defines the action to "
1094 "take when the software signal with number I<signum> is raised using the "
1095 "function B<gsignal>(), and returns the previous such action or B<SIG_DFL>.  "
1096 "The function B<gsignal>()  does the following: if no action (or the action "
1097 "B<SIG_DFL>)  was specified for I<signum>, then it does nothing and returns "
1098 "0.  If the action B<SIG_IGN> was specified for I<signum>, then it does "
1099 "nothing and returns 1.  Otherwise, it resets the action to B<SIG_DFL> and "
1100 "calls the action function with argument I<signum>, and returns the value "
1101 "returned by that function.  The range of possible values I<signum> varies "
1102 "(often 1-15 or 1-17)."
1103 msgstr ""
1104
1105 #. type: Plain text
1106 #: build/C/man3/gsignal.3:101
1107 msgid ""
1108 "These functions are available under AIX, DG/UX, HP-UX, SCO, Solaris, Tru64.  "
1109 "They are called obsolete under most of these systems, and are broken under "
1110 "Linux libc and glibc.  Some systems also have B<gsignal_r>()  and "
1111 "B<ssignal_r>()."
1112 msgstr ""
1113
1114 #. type: Plain text
1115 #: build/C/man3/gsignal.3:105
1116 msgid "B<kill>(2), B<signal>(2), B<raise>(3)"
1117 msgstr ""
1118
1119 #. type: TH
1120 #: build/C/man2/kill.2:44
1121 #, no-wrap
1122 msgid "KILL"
1123 msgstr ""
1124
1125 #. type: TH
1126 #: build/C/man2/kill.2:44
1127 #, no-wrap
1128 msgid "2009-09-15"
1129 msgstr ""
1130
1131 #. type: Plain text
1132 #: build/C/man2/kill.2:47
1133 msgid "kill - send signal to a process"
1134 msgstr ""
1135
1136 #. type: Plain text
1137 #: build/C/man2/kill.2:50
1138 #, no-wrap
1139 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
1140 msgstr ""
1141
1142 #. type: Plain text
1143 #: build/C/man2/kill.2:54
1144 #, no-wrap
1145 msgid "B<int kill(pid_t >I<pid>B<, int >I<sig>B<);>\n"
1146 msgstr ""
1147
1148 #. type: Plain text
1149 #: build/C/man2/kill.2:64
1150 msgid "B<kill>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
1151 msgstr ""
1152
1153 #. type: Plain text
1154 #: build/C/man2/kill.2:70
1155 msgid ""
1156 "The B<kill>()  system call can be used to send any signal to any process "
1157 "group or process."
1158 msgstr ""
1159
1160 #. type: Plain text
1161 #: build/C/man2/kill.2:73
1162 msgid ""
1163 "If I<pid> is positive, then signal I<sig> is sent to the process with the ID "
1164 "specified by I<pid>."
1165 msgstr ""
1166
1167 #. type: Plain text
1168 #: build/C/man2/kill.2:76
1169 msgid ""
1170 "If I<pid> equals 0, then I<sig> is sent to every process in the process "
1171 "group of the calling process."
1172 msgstr ""
1173
1174 #. type: Plain text
1175 #: build/C/man2/kill.2:80
1176 msgid ""
1177 "If I<pid> equals -1, then I<sig> is sent to every process for which the "
1178 "calling process has permission to send signals, except for process 1 "
1179 "(I<init>), but see below."
1180 msgstr ""
1181
1182 #. type: Plain text
1183 #: build/C/man2/kill.2:83
1184 msgid ""
1185 "If I<pid> is less than -1, then I<sig> is sent to every process in the "
1186 "process group whose ID is I<-pid>."
1187 msgstr ""
1188
1189 #. type: Plain text
1190 #: build/C/man2/kill.2:88
1191 msgid ""
1192 "If I<sig> is 0, then no signal is sent, but error checking is still "
1193 "performed; this can be used to check for the existence of a process ID or "
1194 "process group ID."
1195 msgstr ""
1196
1197 #. type: Plain text
1198 #: build/C/man2/kill.2:99 build/C/man2/killpg.2:88
1199 msgid ""
1200 "For a process to have permission to send a signal it must either be "
1201 "privileged (under Linux: have the B<CAP_KILL> capability), or the real or "
1202 "effective user ID of the sending process must equal the real or saved "
1203 "set-user-ID of the target process.  In the case of B<SIGCONT> it suffices "
1204 "when the sending and receiving processes belong to the same session."
1205 msgstr ""
1206
1207 #. type: Plain text
1208 #: build/C/man2/kill.2:104
1209 msgid ""
1210 "On success (at least one signal was sent), zero is returned.  On error, -1 "
1211 "is returned, and I<errno> is set appropriately."
1212 msgstr ""
1213
1214 #. type: Plain text
1215 #: build/C/man2/kill.2:108
1216 msgid "An invalid signal was specified."
1217 msgstr ""
1218
1219 #. type: TP
1220 #: build/C/man2/kill.2:108 build/C/man2/killpg.2:98 build/C/man2/prctl.2:432 build/C/man2/prctl.2:444 build/C/man2/prctl.2:454 build/C/man2/rt_sigqueueinfo.2:143 build/C/man2/sigaltstack.2:149 build/C/man3/sigqueue.3:100 build/C/man2/tkill.2:77
1221 #, no-wrap
1222 msgid "B<EPERM>"
1223 msgstr ""
1224
1225 #. type: Plain text
1226 #: build/C/man2/kill.2:112 build/C/man2/killpg.2:102
1227 msgid ""
1228 "The process does not have permission to send the signal to any of the target "
1229 "processes."
1230 msgstr ""
1231
1232 #. type: TP
1233 #: build/C/man2/kill.2:112 build/C/man2/killpg.2:102 build/C/man2/killpg.2:106 build/C/man2/rt_sigqueueinfo.2:151 build/C/man3/sigqueue.3:106 build/C/man2/tkill.2:82
1234 #, no-wrap
1235 msgid "B<ESRCH>"
1236 msgstr ""
1237
1238 #. type: Plain text
1239 #: build/C/man2/kill.2:120
1240 msgid ""
1241 "The pid or process group does not exist.  Note that an existing process "
1242 "might be a zombie, a process which already committed termination, but has "
1243 "not yet been B<wait>(2)ed for."
1244 msgstr ""
1245
1246 #. type: Plain text
1247 #: build/C/man2/kill.2:122 build/C/man2/pause.2:59 build/C/man2/wait.2:423
1248 msgid "SVr4, 4.3BSD, POSIX.1-2001."
1249 msgstr ""
1250
1251 #. type: Plain text
1252 #: build/C/man2/kill.2:130
1253 msgid ""
1254 "The only signals that can be sent to process ID 1, the I<init> process, are "
1255 "those for which I<init> has explicitly installed signal handlers.  This is "
1256 "done to assure the system is not brought down accidentally."
1257 msgstr ""
1258
1259 #. type: Plain text
1260 #: build/C/man2/kill.2:136
1261 msgid ""
1262 "POSIX.1-2001 requires that I<kill(-1,sig)> send I<sig> to all processes that "
1263 "the calling process may send signals to, except possibly for some "
1264 "implementation-defined system processes.  Linux allows a process to signal "
1265 "itself, but on Linux the call I<kill(-1,sig)> does not signal the calling "
1266 "process."
1267 msgstr ""
1268
1269 #. type: Plain text
1270 #: build/C/man2/kill.2:146
1271 msgid ""
1272 "POSIX.1-2001 requires that if a process sends a signal to itself, and the "
1273 "sending thread does not have the signal blocked, and no other thread has it "
1274 "unblocked or is waiting for it in B<sigwait>(3), at least one unblocked "
1275 "signal must be delivered to the sending thread before the B<kill>()  "
1276 "returns."
1277 msgstr ""
1278
1279 #. type: SS
1280 #: build/C/man2/kill.2:146 build/C/man3/sigpause.3:75 build/C/man2/wait.2:477
1281 #, no-wrap
1282 msgid "Linux Notes"
1283 msgstr ""
1284
1285 #.  In the 0.* kernels things chopped and changed quite
1286 #.  a bit - MTK, 24 Jul 02
1287 #. type: Plain text
1288 #: build/C/man2/kill.2:160
1289 msgid ""
1290 "Across different kernel versions, Linux has enforced different rules for the "
1291 "permissions required for an unprivileged process to send a signal to another "
1292 "process.  In kernels 1.0 to 1.2.2, a signal could be sent if the effective "
1293 "user ID of the sender matched that of the receiver, or the real user ID of "
1294 "the sender matched that of the receiver.  From kernel 1.2.3 until 1.3.77, a "
1295 "signal could be sent if the effective user ID of the sender matched either "
1296 "the real or effective user ID of the receiver.  The current rules, which "
1297 "conform to POSIX.1-2001, were adopted in kernel 1.3.78."
1298 msgstr ""
1299
1300 #. type: Plain text
1301 #: build/C/man2/kill.2:170
1302 msgid ""
1303 "In 2.6 kernels up to and including 2.6.7, there was a bug that meant that "
1304 "when sending signals to a process group, B<kill>()  failed with the error "
1305 "B<EPERM> if the caller did have permission to send the signal to I<any> "
1306 "(rather than I<all>) of the members of the process group.  Notwithstanding "
1307 "this error return, the signal was still delivered to all of the processes "
1308 "for which the caller had permission to signal."
1309 msgstr ""
1310
1311 #. type: Plain text
1312 #: build/C/man2/kill.2:180
1313 msgid ""
1314 "B<_exit>(2), B<killpg>(2), B<signal>(2), B<tkill>(2), B<exit>(3), "
1315 "B<sigqueue>(3), B<capabilities>(7), B<credentials>(7), B<signal>(7)"
1316 msgstr ""
1317
1318 #. type: TH
1319 #: build/C/man2/killpg.2:40
1320 #, no-wrap
1321 msgid "KILLPG"
1322 msgstr ""
1323
1324 #. type: TH
1325 #: build/C/man2/killpg.2:40 build/C/man3/sigset.3:24 build/C/man2/wait4.2:34
1326 #, no-wrap
1327 msgid "2010-09-20"
1328 msgstr ""
1329
1330 #. type: Plain text
1331 #: build/C/man2/killpg.2:43
1332 msgid "killpg - send signal to a process group"
1333 msgstr ""
1334
1335 #. type: Plain text
1336 #: build/C/man2/killpg.2:47
1337 msgid "B<int killpg(int >I<pgrp>B<, int >I<sig>B<);>"
1338 msgstr ""
1339
1340 #. type: TP
1341 #: build/C/man2/killpg.2:54
1342 #, no-wrap
1343 msgid "B<killpg>():"
1344 msgstr ""
1345
1346 #. type: Plain text
1347 #: build/C/man2/killpg.2:58 build/C/man2/sigaltstack.2:44 build/C/man3/siginterrupt.3:49 build/C/man2/wait4.2:61
1348 msgid ""
1349 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
1350 "_XOPEN_SOURCE_EXTENDED"
1351 msgstr ""
1352
1353 #. type: Plain text
1354 #: build/C/man2/killpg.2:68
1355 msgid ""
1356 "B<killpg>()  sends the signal I<sig> to the process group I<pgrp>.  See "
1357 "B<signal>(7)  for a list of signals."
1358 msgstr ""
1359
1360 #. type: Plain text
1361 #: build/C/man2/killpg.2:77
1362 msgid ""
1363 "If I<pgrp> is 0, B<killpg>()  sends the signal to the calling process's "
1364 "process group.  (POSIX says: If I<pgrp> is less than or equal to 1, the "
1365 "behavior is undefined.)"
1366 msgstr ""
1367
1368 #. type: Plain text
1369 #: build/C/man2/killpg.2:98
1370 msgid "I<Sig> is not a valid signal number."
1371 msgstr ""
1372
1373 #. type: Plain text
1374 #: build/C/man2/killpg.2:106
1375 msgid "No process can be found in the process group specified by I<pgrp>."
1376 msgstr ""
1377
1378 #. type: Plain text
1379 #: build/C/man2/killpg.2:110
1380 msgid ""
1381 "The process group was given as 0 but the sending process does not have a "
1382 "process group."
1383 msgstr ""
1384
1385 #. type: Plain text
1386 #: build/C/man2/killpg.2:114
1387 msgid ""
1388 "SVr4, 4.4BSD (the B<killpg>()  function call first appeared in 4BSD), "
1389 "POSIX.1-2001."
1390 msgstr ""
1391
1392 #. type: Plain text
1393 #: build/C/man2/killpg.2:128
1394 msgid ""
1395 "There are various differences between the permission checking in BSD-type "
1396 "systems and System V-type systems.  See the POSIX rationale for B<kill>().  "
1397 "A difference not mentioned by POSIX concerns the return value B<EPERM>: BSD "
1398 "documents that no signal is sent and B<EPERM> returned when the permission "
1399 "check failed for at least one target process, while POSIX documents B<EPERM> "
1400 "only when the permission check failed for all target processes."
1401 msgstr ""
1402
1403 #. type: Plain text
1404 #: build/C/man2/killpg.2:133
1405 msgid ""
1406 "On Linux, B<killpg>()  is implemented as a library function that makes the "
1407 "call I<kill(-pgrp,\\ sig)>."
1408 msgstr ""
1409
1410 #. type: Plain text
1411 #: build/C/man2/killpg.2:139
1412 msgid ""
1413 "B<getpgrp>(2), B<kill>(2), B<signal>(2), B<capabilities>(7), "
1414 "B<credentials>(7)"
1415 msgstr ""
1416
1417 #. type: TH
1418 #: build/C/man2/pause.2:30
1419 #, no-wrap
1420 msgid "PAUSE"
1421 msgstr ""
1422
1423 #. type: TH
1424 #: build/C/man2/pause.2:30
1425 #, no-wrap
1426 msgid "2008-10-06"
1427 msgstr ""
1428
1429 #. type: Plain text
1430 #: build/C/man2/pause.2:33
1431 msgid "pause - wait for signal"
1432 msgstr ""
1433
1434 #. type: Plain text
1435 #: build/C/man2/pause.2:35 build/C/man3/profil.3:33
1436 msgid "B<#include E<lt>unistd.hE<gt>>"
1437 msgstr ""
1438
1439 #. type: Plain text
1440 #: build/C/man2/pause.2:37
1441 msgid "B<int pause(void);>"
1442 msgstr ""
1443
1444 #. type: Plain text
1445 #: build/C/man2/pause.2:42
1446 msgid ""
1447 "B<pause>()  causes the calling process (or thread) to sleep until a signal "
1448 "is delivered that either terminates the process or causes the invocation of "
1449 "a signal-catching function."
1450 msgstr ""
1451
1452 #.  .BR ERESTARTNOHAND .
1453 #. type: Plain text
1454 #: build/C/man2/pause.2:53
1455 msgid ""
1456 "B<pause>()  only returns when a signal was caught and the signal-catching "
1457 "function returned.  In this case B<pause>()  returns -1, and I<errno> is set "
1458 "to B<EINTR>."
1459 msgstr ""
1460
1461 #. type: TP
1462 #: build/C/man2/pause.2:54 build/C/man2/sigsuspend.2:77 build/C/man2/sigwaitinfo.2:116 build/C/man2/wait.2:409
1463 #, no-wrap
1464 msgid "B<EINTR>"
1465 msgstr ""
1466
1467 #. type: Plain text
1468 #: build/C/man2/pause.2:57
1469 msgid "a signal was caught and the signal-catching function returned."
1470 msgstr ""
1471
1472 #. type: Plain text
1473 #: build/C/man2/pause.2:64
1474 msgid "B<kill>(2), B<select>(2), B<signal>(2), B<sigsuspend>(2)"
1475 msgstr ""
1476
1477 #. type: TH
1478 #: build/C/man2/prctl.2:46
1479 #, no-wrap
1480 msgid "PRCTL"
1481 msgstr ""
1482
1483 #. type: TH
1484 #: build/C/man2/prctl.2:46
1485 #, no-wrap
1486 msgid "2011-09-17"
1487 msgstr ""
1488
1489 #. type: Plain text
1490 #: build/C/man2/prctl.2:49
1491 msgid "prctl - operations on a process"
1492 msgstr ""
1493
1494 #. type: Plain text
1495 #: build/C/man2/prctl.2:52
1496 #, no-wrap
1497 msgid "B<#include E<lt>sys/prctl.hE<gt>>\n"
1498 msgstr ""
1499
1500 #. type: Plain text
1501 #: build/C/man2/prctl.2:55
1502 #, no-wrap
1503 msgid ""
1504 "B<int prctl(int >I<option>B<, unsigned long >I<arg2>B<, unsigned long "
1505 ">I<arg3>B<,>\n"
1506 "B<          unsigned long >I<arg4>B<, unsigned long >I<arg5>B<);>\n"
1507 msgstr ""
1508
1509 #. type: Plain text
1510 #: build/C/man2/prctl.2:62
1511 msgid ""
1512 "B<prctl>()  is called with a first argument describing what to do (with "
1513 "values defined in I<E<lt>linux/prctl.hE<gt>>), and further arguments with a "
1514 "significance depending on the first one.  The first argument can be:"
1515 msgstr ""
1516
1517 #. type: TP
1518 #: build/C/man2/prctl.2:62
1519 #, no-wrap
1520 msgid "B<PR_CAPBSET_READ> (since Linux 2.6.25)"
1521 msgstr ""
1522
1523 #. type: Plain text
1524 #: build/C/man2/prctl.2:74
1525 msgid ""
1526 "Return (as the function result) 1 if the capability specified in I<arg2> is "
1527 "in the calling thread's capability bounding set, or 0 if it is not.  (The "
1528 "capability constants are defined in I<E<lt>linux/capability.hE<gt>>.)  The "
1529 "capability bounding set dictates whether the process can receive the "
1530 "capability through a file's permitted capability set on a subsequent call to "
1531 "B<execve>(2)."
1532 msgstr ""
1533
1534 #. type: Plain text
1535 #: build/C/man2/prctl.2:79
1536 msgid ""
1537 "If the capability specified in I<arg2> is not valid, then the call fails "
1538 "with the error B<EINVAL>."
1539 msgstr ""
1540
1541 #. type: TP
1542 #: build/C/man2/prctl.2:79
1543 #, no-wrap
1544 msgid "B<PR_CAPBSET_DROP> (since Linux 2.6.25)"
1545 msgstr ""
1546
1547 #. type: Plain text
1548 #: build/C/man2/prctl.2:88
1549 msgid ""
1550 "If the calling thread has the B<CAP_SETPCAP> capability, then drop the "
1551 "capability specified by I<arg2> from the calling thread's capability "
1552 "bounding set.  Any children of the calling thread will inherit the newly "
1553 "reduced bounding set."
1554 msgstr ""
1555
1556 #. type: Plain text
1557 #: build/C/man2/prctl.2:100
1558 msgid ""
1559 "The call fails with the error: B<EPERM> if the calling thread does not have "
1560 "the B<CAP_SETPCAP>; B<EINVAL> if I<arg2> does not represent a valid "
1561 "capability; or B<EINVAL> if file capabilities are not enabled in the kernel, "
1562 "in which case bounding sets are not supported."
1563 msgstr ""
1564
1565 #. type: TP
1566 #: build/C/man2/prctl.2:100
1567 #, no-wrap
1568 msgid "B<PR_SET_DUMPABLE> (since Linux 2.3.20)"
1569 msgstr ""
1570
1571 #.  See http://marc.theaimsgroup.com/?l=linux-kernel&m=115270289030630&w=2
1572 #.  Subject:    Fix prctl privilege escalation (CVE-2006-2451)
1573 #.  From:       Marcel Holtmann <marcel () holtmann ! org>
1574 #.  Date:       2006-07-12 11:12:00
1575 #. type: Plain text
1576 #: build/C/man2/prctl.2:126
1577 msgid ""
1578 "Set the state of the flag determining whether core dumps are produced for "
1579 "this process upon delivery of a signal whose default behavior is to produce "
1580 "a core dump.  (Normally this flag is set for a process by default, but it is "
1581 "cleared when a set-user-ID or set-group-ID program is executed and also by "
1582 "various system calls that manipulate process UIDs and GIDs).  In kernels up "
1583 "to and including 2.6.12, I<arg2> must be either 0 (process is not dumpable) "
1584 "or 1 (process is dumpable).  Between kernels 2.6.13 and 2.6.17, the value 2 "
1585 "was also permitted, which caused any binary which normally would not be "
1586 "dumped to be dumped readable by root only; for security reasons, this "
1587 "feature has been removed.  (See also the description of "
1588 "I</proc/sys/fs/suid_dumpable> in B<proc>(5).)  Processes that are not "
1589 "dumpable can not be attached via B<ptrace(2)> B<PTRACE_ATTACH>."
1590 msgstr ""
1591
1592 #. type: TP
1593 #: build/C/man2/prctl.2:126
1594 #, no-wrap
1595 msgid "B<PR_GET_DUMPABLE> (since Linux 2.3.20)"
1596 msgstr ""
1597
1598 #.  Since Linux 2.6.13, the dumpable flag can have the value 2,
1599 #.  but in 2.6.13 PR_GET_DUMPABLE simply returns 1 if the dumpable
1600 #.  flags has a nonzero value.  This was fixed in 2.6.14.
1601 #. type: Plain text
1602 #: build/C/man2/prctl.2:133
1603 msgid ""
1604 "Return (as the function result) the current state of the calling process's "
1605 "dumpable flag."
1606 msgstr ""
1607
1608 #. type: TP
1609 #: build/C/man2/prctl.2:133
1610 #, no-wrap
1611 msgid "B<PR_SET_ENDIAN> (since Linux 2.6.18, PowerPC only)"
1612 msgstr ""
1613
1614 #.  Respectively 0, 1, 2
1615 #. type: Plain text
1616 #: build/C/man2/prctl.2:143
1617 msgid ""
1618 "Set the endian-ness of the calling process to the value given in I<arg2>, "
1619 "which should be one of the following: B<PR_ENDIAN_BIG>, B<PR_ENDIAN_LITTLE>, "
1620 "or B<PR_ENDIAN_PPC_LITTLE> (PowerPC pseudo little endian)."
1621 msgstr ""
1622
1623 #. type: TP
1624 #: build/C/man2/prctl.2:143
1625 #, no-wrap
1626 msgid "B<PR_GET_ENDIAN> (since Linux 2.6.18, PowerPC only)"
1627 msgstr ""
1628
1629 #. type: Plain text
1630 #: build/C/man2/prctl.2:148
1631 msgid ""
1632 "Return the endian-ness of the calling process, in the location pointed to by "
1633 "I<(int\\ *) arg2>."
1634 msgstr ""
1635
1636 #. type: TP
1637 #: build/C/man2/prctl.2:148
1638 #, no-wrap
1639 msgid "B<PR_SET_FPEMU> (since Linux 2.4.18, 2.5.9, only on ia64)"
1640 msgstr ""
1641
1642 #. type: Plain text
1643 #: build/C/man2/prctl.2:155
1644 msgid ""
1645 "Set floating-point emulation control bits to I<arg2>.  Pass "
1646 "B<PR_FPEMU_NOPRINT> to silently emulate fp operations accesses, or "
1647 "B<PR_FPEMU_SIGFPE> to not emulate fp operations and send B<SIGFPE> instead."
1648 msgstr ""
1649
1650 #. type: TP
1651 #: build/C/man2/prctl.2:155
1652 #, no-wrap
1653 msgid "B<PR_GET_FPEMU> (since Linux 2.4.18, 2.5.9, only on ia64)"
1654 msgstr ""
1655
1656 #. type: Plain text
1657 #: build/C/man2/prctl.2:160
1658 msgid ""
1659 "Return floating-point emulation control bits, in the location pointed to by "
1660 "I<(int\\ *) arg2>."
1661 msgstr ""
1662
1663 #. type: TP
1664 #: build/C/man2/prctl.2:160
1665 #, no-wrap
1666 msgid "B<PR_SET_FPEXC> (since Linux 2.4.21, 2.5.32, only on PowerPC)"
1667 msgstr ""
1668
1669 #. type: Plain text
1670 #: build/C/man2/prctl.2:173
1671 msgid ""
1672 "Set floating-point exception mode to I<arg2>.  Pass B<PR_FP_EXC_SW_ENABLE> "
1673 "to use FPEXC for FP exception enables, B<PR_FP_EXC_DIV> for floating-point "
1674 "divide by zero, B<PR_FP_EXC_OVF> for floating-point overflow, "
1675 "B<PR_FP_EXC_UND> for floating-point underflow, B<PR_FP_EXC_RES> for "
1676 "floating-point inexact result, B<PR_FP_EXC_INV> for floating-point invalid "
1677 "operation, B<PR_FP_EXC_DISABLED> for FP exceptions disabled, "
1678 "B<PR_FP_EXC_NONRECOV> for async nonrecoverable exception mode, "
1679 "B<PR_FP_EXC_ASYNC> for async recoverable exception mode, "
1680 "B<PR_FP_EXC_PRECISE> for precise exception mode."
1681 msgstr ""
1682
1683 #. type: TP
1684 #: build/C/man2/prctl.2:173
1685 #, no-wrap
1686 msgid "B<PR_GET_FPEXC> (since Linux 2.4.21, 2.5.32, only on PowerPC)"
1687 msgstr ""
1688
1689 #. type: Plain text
1690 #: build/C/man2/prctl.2:178
1691 msgid ""
1692 "Return floating-point exception mode, in the location pointed to by I<(int\\ "
1693 "*) arg2>."
1694 msgstr ""
1695
1696 #. type: TP
1697 #: build/C/man2/prctl.2:178
1698 #, no-wrap
1699 msgid "B<PR_SET_KEEPCAPS> (since Linux 2.2.18)"
1700 msgstr ""
1701
1702 #. type: Plain text
1703 #: build/C/man2/prctl.2:196
1704 msgid ""
1705 "Set the state of the thread's \"keep capabilities\" flag, which determines "
1706 "whether the threads's permitted capability set is cleared when a change is "
1707 "made to the threads's user IDs such that the threads's real UID, effective "
1708 "UID, and saved set-user-ID all become nonzero when at least one of them "
1709 "previously had the value 0.  By default, the permitted capability set is "
1710 "cleared when such a change is made; setting the \"keep capabilities\" flag "
1711 "prevents it from being cleared.  I<arg2> must be either 0 (permitted "
1712 "capabilities are cleared)  or 1 (permitted capabilities are kept).  (A "
1713 "thread's I<effective> capability set is always cleared when such a "
1714 "credential change is made, regardless of the setting of the \"keep "
1715 "capabilities\" flag.)  The \"keep capabilities\" value will be reset to 0 on "
1716 "subsequent calls to B<execve>(2)."
1717 msgstr ""
1718
1719 #. type: TP
1720 #: build/C/man2/prctl.2:196
1721 #, no-wrap
1722 msgid "B<PR_GET_KEEPCAPS> (since Linux 2.2.18)"
1723 msgstr ""
1724
1725 #. type: Plain text
1726 #: build/C/man2/prctl.2:200
1727 msgid ""
1728 "Return (as the function result) the current state of the calling threads's "
1729 "\"keep capabilities\" flag."
1730 msgstr ""
1731
1732 #. type: TP
1733 #: build/C/man2/prctl.2:200
1734 #, no-wrap
1735 msgid "B<PR_SET_NAME> (since Linux 2.6.9)"
1736 msgstr ""
1737
1738 #.  TASK_COMM_LEN in include/linux/sched.h
1739 #. type: Plain text
1740 #: build/C/man2/prctl.2:208
1741 msgid ""
1742 "Set the process name for the calling process, using the value in the "
1743 "location pointed to by I<(char\\ *) arg2>.  The name can be up to 16 bytes "
1744 "long, and should be null-terminated if it contains fewer bytes."
1745 msgstr ""
1746
1747 #. type: TP
1748 #: build/C/man2/prctl.2:208
1749 #, no-wrap
1750 msgid "B<PR_GET_NAME> (since Linux 2.6.11)"
1751 msgstr ""
1752
1753 #. type: Plain text
1754 #: build/C/man2/prctl.2:215
1755 msgid ""
1756 "Return the process name for the calling process, in the buffer pointed to by "
1757 "I<(char\\ *) arg2>.  The buffer should allow space for up to 16 bytes; the "
1758 "returned string will be null-terminated if it is shorter than that."
1759 msgstr ""
1760
1761 #. type: TP
1762 #: build/C/man2/prctl.2:215
1763 #, no-wrap
1764 msgid "B<PR_SET_PDEATHSIG> (since Linux 2.1.57)"
1765 msgstr ""
1766
1767 #. type: Plain text
1768 #: build/C/man2/prctl.2:224
1769 msgid ""
1770 "Set the parent process death signal of the calling process to I<arg2> "
1771 "(either a signal value in the range 1..maxsig, or 0 to clear).  This is the "
1772 "signal that the calling process will get when its parent dies.  This value "
1773 "is cleared for the child of a B<fork>(2)."
1774 msgstr ""
1775
1776 #. type: TP
1777 #: build/C/man2/prctl.2:224
1778 #, no-wrap
1779 msgid "B<PR_GET_PDEATHSIG> (since Linux 2.3.15)"
1780 msgstr ""
1781
1782 #. type: Plain text
1783 #: build/C/man2/prctl.2:229
1784 msgid ""
1785 "Return the current value of the parent process death signal, in the location "
1786 "pointed to by I<(int\\ *) arg2>."
1787 msgstr ""
1788
1789 #. type: TP
1790 #: build/C/man2/prctl.2:229
1791 #, no-wrap
1792 msgid "B<PR_SET_SECCOMP> (since Linux 2.6.23)"
1793 msgstr ""
1794
1795 #.  See http://thread.gmane.org/gmane.linux.kernel/542632
1796 #.  [PATCH 0 of 2] seccomp updates
1797 #.  andrea@cpushare.com
1798 #. type: Plain text
1799 #: build/C/man2/prctl.2:253
1800 msgid ""
1801 "Set the secure computing mode for the calling thread.  In the current "
1802 "implementation, I<arg2> must be 1.  After the secure computing mode has been "
1803 "set to 1, the only system calls that the thread is permitted to make are "
1804 "B<read>(2), B<write>(2), B<_exit>(2), and B<sigreturn>(2).  Other system "
1805 "calls result in the delivery of a B<SIGKILL> signal.  Secure computing mode "
1806 "is useful for number-crunching applications that may need to execute "
1807 "untrusted byte code, perhaps obtained by reading from a pipe or socket.  "
1808 "This operation is only available if the kernel is configured with "
1809 "CONFIG_SECCOMP enabled."
1810 msgstr ""
1811
1812 #. type: TP
1813 #: build/C/man2/prctl.2:253
1814 #, no-wrap
1815 msgid "B<PR_GET_SECCOMP> (since Linux 2.6.23)"
1816 msgstr ""
1817
1818 #. type: Plain text
1819 #: build/C/man2/prctl.2:266
1820 msgid ""
1821 "Return the secure computing mode of the calling thread.  Not very useful for "
1822 "the current implementation (mode equals 1), but may be useful for other "
1823 "possible future modes: if the caller is not in secure computing mode, this "
1824 "operation returns 0; if the caller is in secure computing mode, then the "
1825 "B<prctl>()  call will cause a B<SIGKILL> signal to be sent to the process.  "
1826 "This operation is only available if the kernel is configured with "
1827 "CONFIG_SECCOMP enabled."
1828 msgstr ""
1829
1830 #. type: TP
1831 #: build/C/man2/prctl.2:266
1832 #, no-wrap
1833 msgid "B<PR_SET_SECUREBITS> (since Linux 2.6.26)"
1834 msgstr ""
1835
1836 #. type: Plain text
1837 #: build/C/man2/prctl.2:272
1838 msgid ""
1839 "Set the \"securebits\" flags of the calling thread to the value supplied in "
1840 "I<arg2>.  See B<capabilities>(7)."
1841 msgstr ""
1842
1843 #. type: TP
1844 #: build/C/man2/prctl.2:272
1845 #, no-wrap
1846 msgid "B<PR_GET_SECUREBITS> (since Linux 2.6.26)"
1847 msgstr ""
1848
1849 #. type: Plain text
1850 #: build/C/man2/prctl.2:278
1851 msgid ""
1852 "Return (as the function result)  the \"securebits\" flags of the calling "
1853 "thread.  See B<capabilities>(7)."
1854 msgstr ""
1855
1856 #. type: TP
1857 #: build/C/man2/prctl.2:278
1858 #, no-wrap
1859 msgid "B<PR_SET_TIMING> (since Linux 2.6.0-test4)"
1860 msgstr ""
1861
1862 #.  0
1863 #.  1
1864 #.  PR_TIMING_TIMESTAMP doesn't do anything in 2.6.26-rc8,
1865 #.  and looking at the patch history, it appears
1866 #.  that it never did anything.
1867 #. type: Plain text
1868 #: build/C/man2/prctl.2:295
1869 msgid ""
1870 "Set whether to use (normal, traditional) statistical process timing or "
1871 "accurate timestamp-based process timing, by passing B<PR_TIMING_STATISTICAL> "
1872 "or B<PR_TIMING_TIMESTAMP> to I<arg2>.  B<PR_TIMING_TIMESTAMP> is not "
1873 "currently implemented (attempting to set this mode will yield the error "
1874 "B<EINVAL>)."
1875 msgstr ""
1876
1877 #. type: TP
1878 #: build/C/man2/prctl.2:295
1879 #, no-wrap
1880 msgid "B<PR_GET_TIMING> (since Linux 2.6.0-test4)"
1881 msgstr ""
1882
1883 #. type: Plain text
1884 #: build/C/man2/prctl.2:299
1885 msgid ""
1886 "Return (as the function result) which process timing method is currently in "
1887 "use."
1888 msgstr ""
1889
1890 #. type: TP
1891 #: build/C/man2/prctl.2:299
1892 #, no-wrap
1893 msgid "B<PR_SET_TSC> (since Linux 2.6.26, x86 only)"
1894 msgstr ""
1895
1896 #. type: Plain text
1897 #: build/C/man2/prctl.2:312
1898 msgid ""
1899 "Set the state of the flag determining whether the timestamp counter can be "
1900 "read by the process.  Pass B<PR_TSC_ENABLE> to I<arg2> to allow it to be "
1901 "read, or B<PR_TSC_SIGSEGV> to generate a B<SIGSEGV> when the process tries "
1902 "to read the timestamp counter."
1903 msgstr ""
1904
1905 #. type: TP
1906 #: build/C/man2/prctl.2:312
1907 #, no-wrap
1908 msgid "B<PR_GET_TSC> (since Linux 2.6.26, x86 only)"
1909 msgstr ""
1910
1911 #. type: Plain text
1912 #: build/C/man2/prctl.2:318
1913 msgid ""
1914 "Return the state of the flag determining whether the timestamp counter can "
1915 "be read, in the location pointed to by I<(int\\ *) arg2>."
1916 msgstr ""
1917
1918 #. type: TP
1919 #: build/C/man2/prctl.2:318
1920 #, no-wrap
1921 msgid "B<PR_SET_UNALIGN>"
1922 msgstr ""
1923
1924 #. type: Plain text
1925 #: build/C/man2/prctl.2:328
1926 msgid ""
1927 "(Only on: ia64, since Linux 2.3.48; parisc, since Linux 2.6.15; PowerPC, "
1928 "since Linux 2.6.18; Alpha, since Linux 2.6.22)  Set unaligned access control "
1929 "bits to I<arg2>.  Pass B<PR_UNALIGN_NOPRINT> to silently fix up unaligned "
1930 "user accesses, or B<PR_UNALIGN_SIGBUS> to generate B<SIGBUS> on unaligned "
1931 "user access."
1932 msgstr ""
1933
1934 #. type: TP
1935 #: build/C/man2/prctl.2:328
1936 #, no-wrap
1937 msgid "B<PR_GET_UNALIGN>"
1938 msgstr ""
1939
1940 #. type: Plain text
1941 #: build/C/man2/prctl.2:335
1942 msgid ""
1943 "(see B<PR_SET_UNALIGN> for information on versions and architectures)  "
1944 "Return unaligned access control bits, in the location pointed to by I<(int\\ "
1945 "*) arg2>."
1946 msgstr ""
1947
1948 #. type: TP
1949 #: build/C/man2/prctl.2:335
1950 #, no-wrap
1951 msgid "B<PR_MCE_KILL> (since Linux 2.6.32)"
1952 msgstr ""
1953
1954 #. type: Plain text
1955 #: build/C/man2/prctl.2:375
1956 msgid ""
1957 "Set the machine check memory corruption kill policy for the current thread.  "
1958 "If I<arg2> is B<PR_MCE_KILL_CLEAR>, clear the thread memory corruption kill "
1959 "policy and use the system-wide default.  (The system-wide default is defined "
1960 "by I</proc/sys/vm/memory_failure_early_kill>; see B<proc>(5).)  If I<arg2> "
1961 "is B<PR_MCE_KILL_SET>, use a thread-specific memory corruption kill policy.  "
1962 "In this case, I<arg3> defines whether the policy is I<early kill> "
1963 "(B<PR_MCE_KILL_EARLY>), I<late kill> (B<PR_MCE_KILL_LATE>), or the "
1964 "system-wide default (B<PR_MCE_KILL_DEFAULT>).  Early kill means that the "
1965 "thread receives a B<SIGBUS> signal as soon as hardware memory corruption is "
1966 "detected inside its address space.  In late kill mode, the process is only "
1967 "killed when it accesses a corrupted page.  See B<sigaction>(2)  for more "
1968 "information on the B<SIGBUS> signal.  The policy is inherited by children.  "
1969 "The remaining unused B<prctl>()  arguments must be zero for future "
1970 "compatibility."
1971 msgstr ""
1972
1973 #. type: TP
1974 #: build/C/man2/prctl.2:375
1975 #, no-wrap
1976 msgid "B<PR_MCE_KILL_GET> (since Linux 2.6.32)"
1977 msgstr ""
1978
1979 #. type: Plain text
1980 #: build/C/man2/prctl.2:381
1981 msgid ""
1982 "Return the current per-process machine check kill policy.  All unused "
1983 "B<prctl>()  arguments must be zero."
1984 msgstr ""
1985
1986 #. type: Plain text
1987 #: build/C/man2/prctl.2:398
1988 msgid ""
1989 "On success, B<PR_GET_DUMPABLE>, B<PR_GET_KEEPCAPS>, B<PR_CAPBSET_READ>, "
1990 "B<PR_GET_TIMING>, B<PR_GET_SECUREBITS>, B<PR_MCE_KILL_GET>, and (if it "
1991 "returns)  B<PR_GET_SECCOMP> return the nonnegative values described above.  "
1992 "All other I<option> values return 0 on success.  On error, -1 is returned, "
1993 "and I<errno> is set appropriately."
1994 msgstr ""
1995
1996 #. type: Plain text
1997 #: build/C/man2/prctl.2:403
1998 msgid "I<arg2> is an invalid address."
1999 msgstr ""
2000
2001 #. type: Plain text
2002 #: build/C/man2/prctl.2:408
2003 msgid "The value of I<option> is not recognized."
2004 msgstr ""
2005
2006 #. type: Plain text
2007 #: build/C/man2/prctl.2:418
2008 msgid ""
2009 "I<option> is B<PR_MCE_KILL> or B<PR_MCE_KILL_GET>, and unused B<prctl>()  "
2010 "arguments were not specified as zero."
2011 msgstr ""
2012
2013 #. type: Plain text
2014 #: build/C/man2/prctl.2:423
2015 msgid "I<arg2> is not valid value for this I<option>."
2016 msgstr ""
2017
2018 #. type: Plain text
2019 #: build/C/man2/prctl.2:432
2020 msgid ""
2021 "I<option> is B<PR_SET_SECCOMP> or B<PR_SET_SECCOMP>, and the kernel was not "
2022 "configured with B<CONFIG_SECCOMP>."
2023 msgstr ""
2024
2025 #. type: Plain text
2026 #: build/C/man2/prctl.2:444
2027 msgid ""
2028 "I<option> is B<PR_SET_SECUREBITS>, and the caller does not have the "
2029 "B<CAP_SETPCAP> capability, or tried to unset a \"locked\" flag, or tried to "
2030 "set a flag whose corresponding locked flag was set (see B<capabilities>(7))."
2031 msgstr ""
2032
2033 #. type: Plain text
2034 #: build/C/man2/prctl.2:454
2035 msgid ""
2036 "I<option> is B<PR_SET_KEEPCAPS>, and the callers's "
2037 "B<SECURE_KEEP_CAPS_LOCKED> flag is set (see B<capabilities>(7))."
2038 msgstr ""
2039
2040 #.  The following can't actually happen, because prctl() in
2041 #.  seccomp mode will cause SIGKILL.
2042 #.  .TP
2043 #.  .B EPERM
2044 #.  .I option
2045 #.  is
2046 #.  .BR PR_SET_SECCOMP ,
2047 #.  and secure computing mode is already 1.
2048 #. type: Plain text
2049 #: build/C/man2/prctl.2:470
2050 msgid ""
2051 "I<option> is B<PR_CAPBSET_DROP>, and the caller does not have the "
2052 "B<CAP_SETPCAP> capability."
2053 msgstr ""
2054
2055 #.  The library interface was added in glibc 2.0.6
2056 #. type: Plain text
2057 #: build/C/man2/prctl.2:475
2058 msgid "The B<prctl>()  system call was introduced in Linux 2.1.57."
2059 msgstr ""
2060
2061 #. type: Plain text
2062 #: build/C/man2/prctl.2:482
2063 msgid ""
2064 "This call is Linux-specific.  IRIX has a B<prctl>()  system call (also "
2065 "introduced in Linux 2.1.44 as irix_prctl on the MIPS architecture), with "
2066 "prototype"
2067 msgstr ""
2068
2069 #. type: Plain text
2070 #: build/C/man2/prctl.2:484
2071 msgid "B<ptrdiff_t prctl(int >I<option>B<, int >I<arg2>B<, int >I<arg3>B<);>"
2072 msgstr ""
2073
2074 #. type: Plain text
2075 #: build/C/man2/prctl.2:489
2076 msgid ""
2077 "and options to get the maximum number of processes per user, get the maximum "
2078 "number of processors the calling process can use, find out whether a "
2079 "specified process is currently blocked, get or set the maximum stack size, "
2080 "etc."
2081 msgstr ""
2082
2083 #. type: Plain text
2084 #: build/C/man2/prctl.2:492
2085 msgid "B<signal>(2), B<core>(5)"
2086 msgstr ""
2087
2088 #. type: TH
2089 #: build/C/man3/profil.3:28
2090 #, no-wrap
2091 msgid "PROFIL"
2092 msgstr ""
2093
2094 #. type: Plain text
2095 #: build/C/man3/profil.3:31
2096 msgid "profil - execution time profile"
2097 msgstr ""
2098
2099 #. type: Plain text
2100 #: build/C/man3/profil.3:36
2101 msgid ""
2102 "B<int profil(unsigned short *>I<buf>B<, size_t >I<bufsiz>B<, size_t "
2103 ">I<offset>B<, unsigned int >I<scale>B<);>"
2104 msgstr ""
2105
2106 #. type: Plain text
2107 #: build/C/man3/profil.3:44
2108 msgid "B<profil>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
2109 msgstr ""
2110
2111 #. type: Plain text
2112 #: build/C/man3/profil.3:66
2113 msgid ""
2114 "This routine provides a means to find out in what areas your program spends "
2115 "most of its time.  The argument I<buf> points to I<bufsiz> bytes of core.  "
2116 "Every virtual 10 milliseconds, the user's program counter (PC)  is examined: "
2117 "I<offset> is subtracted and the result is multiplied by I<scale> and divided "
2118 "by 65536.  If the resulting value is less than I<bufsiz>, then the "
2119 "corresponding entry in I<buf> is incremented.  If I<buf> is NULL, profiling "
2120 "is disabled."
2121 msgstr ""
2122
2123 #. type: Plain text
2124 #: build/C/man3/profil.3:68
2125 msgid "Zero is always returned."
2126 msgstr ""
2127
2128 #. type: Plain text
2129 #: build/C/man3/profil.3:70
2130 msgid "Similar to a call in SVr4 (but not POSIX.1-2001)."
2131 msgstr ""
2132
2133 #. type: Plain text
2134 #: build/C/man3/profil.3:76
2135 msgid ""
2136 "B<profil>()  cannot be used on a program that also uses B<ITIMER_PROF> "
2137 "interval timers (see B<setitimer>(2))."
2138 msgstr ""
2139
2140 #. type: Plain text
2141 #: build/C/man3/profil.3:79
2142 msgid ""
2143 "True kernel profiling provides more accurate results.  Libc 4.4 contained a "
2144 "kernel patch providing a system call profil."
2145 msgstr ""
2146
2147 #. type: Plain text
2148 #: build/C/man3/profil.3:84
2149 msgid "B<gprof>(1), B<setitimer>(2), B<sigaction>(2), B<signal>(2)"
2150 msgstr ""
2151
2152 #. type: TH
2153 #: build/C/man3/psignal.3:28
2154 #, no-wrap
2155 msgid "PSIGNAL"
2156 msgstr ""
2157
2158 #. type: TH
2159 #: build/C/man3/psignal.3:28
2160 #, no-wrap
2161 msgid "2010-10-06"
2162 msgstr ""
2163
2164 #. type: TH
2165 #: build/C/man3/psignal.3:28 build/C/man3/raise.3:27 build/C/man7/sigevent.7:24
2166 #, no-wrap
2167 msgid "GNU"
2168 msgstr ""
2169
2170 #. type: Plain text
2171 #: build/C/man3/psignal.3:31
2172 msgid "psignal, psiginfo - print signal message"
2173 msgstr ""
2174
2175 #. type: Plain text
2176 #: build/C/man3/psignal.3:37
2177 #, no-wrap
2178 msgid ""
2179 "B<void psignal(int >I<sig>B<, const char *>I<s>B<);>\n"
2180 "B<void psiginfo(const siginfo_t *>I<pinfo>B<, const char *>I<s>B<);>\n"
2181 msgstr ""
2182
2183 #. type: Plain text
2184 #: build/C/man3/psignal.3:39
2185 #, no-wrap
2186 msgid "B<extern const char *const >I<sys_siglist>B<[];>\n"
2187 msgstr ""
2188
2189 #. type: Plain text
2190 #: build/C/man3/psignal.3:48
2191 msgid "B<psignal>(): _SVID_SOURCE || _BSD_SOURCE"
2192 msgstr ""
2193
2194 #. type: Plain text
2195 #: build/C/man3/psignal.3:51
2196 msgid ""
2197 "B<psiginfo>(): _XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ "
2198 "200809L"
2199 msgstr ""
2200
2201 #. type: Plain text
2202 #: build/C/man3/psignal.3:54
2203 msgid "I<sys_siglist>: _BSD_SOURCE"
2204 msgstr ""
2205
2206 #. type: Plain text
2207 #: build/C/man3/psignal.3:63
2208 msgid ""
2209 "The B<psignal>()  function displays a message on I<stderr> consisting of the "
2210 "string I<s>, a colon, a space, a string describing the signal number I<sig>, "
2211 "and a trailing newline.  If the string I<s> is NULL or empty, the colon and "
2212 "space are omitted.  If I<sig> is invalid, the message displayed will "
2213 "indicate an unknown signal."
2214 msgstr ""
2215
2216 #. type: Plain text
2217 #: build/C/man3/psignal.3:84
2218 msgid ""
2219 "The B<psiginfo>()  function is like B<psignal>(), except that it displays "
2220 "information about the signal described by I<pinfo>, which should point to a "
2221 "valid I<siginfo_t> structure.  As well as the signal description, "
2222 "B<psiginfo>()  displays information about the origin of the signal, and "
2223 "other information relevant to the signal (e.g., the relevant memory address "
2224 "for hardware-generated signals, the child process ID for B<SIGCHLD>, and the "
2225 "user ID and process ID of the sender, for signals set using B<kill>(2)  or "
2226 "B<sigqueue>(3))."
2227 msgstr ""
2228
2229 #. type: Plain text
2230 #: build/C/man3/psignal.3:87
2231 msgid ""
2232 "The array I<sys_siglist> holds the signal description strings indexed by "
2233 "signal number."
2234 msgstr ""
2235
2236 #. type: Plain text
2237 #: build/C/man3/psignal.3:93
2238 msgid "The B<psignal>()  and B<psiginfo>()  functions return no value."
2239 msgstr ""
2240
2241 #. type: Plain text
2242 #: build/C/man3/psignal.3:97
2243 msgid "The B<psiginfo>()  function was added to glibc in version 2.10."
2244 msgstr ""
2245
2246 #. type: Plain text
2247 #: build/C/man3/psignal.3:99
2248 msgid "POSIX.1-2008, 4.3BSD."
2249 msgstr ""
2250
2251 #. type: Plain text
2252 #: build/C/man3/psignal.3:103
2253 msgid "In glibc versions up to 2.12, B<psiginfo>()  had the following bugs:"
2254 msgstr ""
2255
2256 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12107
2257 #.  Reportedly now fixed; check glibc 2.13
2258 #. type: Plain text
2259 #: build/C/man3/psignal.3:107
2260 msgid "In some circumstances, a trailing newline is not printed."
2261 msgstr ""
2262
2263 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12108
2264 #.  Reportedly now fixed; check glibc 2.13
2265 #. type: Plain text
2266 #: build/C/man3/psignal.3:111
2267 msgid "Additional details are not displayed for real-time signals."
2268 msgstr ""
2269
2270 #. type: Plain text
2271 #: build/C/man3/psignal.3:116
2272 msgid "B<sigaction>(2), B<perror>(3), B<strsignal>(3), B<signal>(7)"
2273 msgstr ""
2274
2275 #. type: TH
2276 #: build/C/man3/raise.3:27
2277 #, no-wrap
2278 msgid "RAISE"
2279 msgstr ""
2280
2281 #. type: TH
2282 #: build/C/man3/raise.3:27 build/C/man2/sigprocmask.2:27
2283 #, no-wrap
2284 msgid "2008-10-17"
2285 msgstr ""
2286
2287 #. type: Plain text
2288 #: build/C/man3/raise.3:30
2289 msgid "raise - send a signal to the caller"
2290 msgstr ""
2291
2292 #. type: Plain text
2293 #: build/C/man3/raise.3:35
2294 #, no-wrap
2295 msgid "B<int raise(int >I<sig>B<);>\n"
2296 msgstr ""
2297
2298 #. type: Plain text
2299 #: build/C/man3/raise.3:41
2300 msgid ""
2301 "The B<raise>()  function sends a signal to the calling process or thread.  "
2302 "In a single-threaded program it is equivalent to"
2303 msgstr ""
2304
2305 #. type: Plain text
2306 #: build/C/man3/raise.3:45
2307 #, no-wrap
2308 msgid "kill(getpid(), sig);\n"
2309 msgstr ""
2310
2311 #. type: Plain text
2312 #: build/C/man3/raise.3:49
2313 msgid "In a multithreaded program it is equivalent to"
2314 msgstr ""
2315
2316 #. type: Plain text
2317 #: build/C/man3/raise.3:53
2318 #, no-wrap
2319 msgid "pthread_kill(pthread_self(), sig);\n"
2320 msgstr ""
2321
2322 #. type: Plain text
2323 #: build/C/man3/raise.3:59
2324 msgid ""
2325 "If the signal causes a handler to be called, B<raise>()  will only return "
2326 "after the signal handler has returned."
2327 msgstr ""
2328
2329 #. type: Plain text
2330 #: build/C/man3/raise.3:62
2331 msgid "B<raise>()  returns 0 on success, and nonzero for failure."
2332 msgstr ""
2333
2334 #. type: Plain text
2335 #: build/C/man3/raise.3:64 build/C/man2/signal.2:107
2336 msgid "C89, C99, POSIX.1-2001."
2337 msgstr ""
2338
2339 #. type: Plain text
2340 #: build/C/man3/raise.3:71
2341 msgid ""
2342 "B<getpid>(2), B<kill>(2), B<sigaction>(2), B<signal>(2), B<pthread_kill>(3), "
2343 "B<signal>(7)"
2344 msgstr ""
2345
2346 #. type: TH
2347 #: build/C/man2/rt_sigqueueinfo.2:23
2348 #, no-wrap
2349 msgid "RT_SIGQUEUEINFO"
2350 msgstr ""
2351
2352 #. type: TH
2353 #: build/C/man2/rt_sigqueueinfo.2:23 build/C/man7/signal.7:44 build/C/man3/sigqueue.3:26 build/C/man2/tkill.2:29
2354 #, no-wrap
2355 msgid "2011-09-18"
2356 msgstr ""
2357
2358 #. type: Plain text
2359 #: build/C/man2/rt_sigqueueinfo.2:26
2360 msgid "rt_sigqueueinfo, rt_tgsigqueueinfo - queue a signal and data"
2361 msgstr ""
2362
2363 #. type: Plain text
2364 #: build/C/man2/rt_sigqueueinfo.2:29
2365 #, no-wrap
2366 msgid ""
2367 "B<int rt_sigqueueinfo(pid_t >I<tgid>B<, int >I<sig>B<, siginfo_t "
2368 "*>I<uinfo>B<);>\n"
2369 msgstr ""
2370
2371 #. type: Plain text
2372 #: build/C/man2/rt_sigqueueinfo.2:32
2373 #, no-wrap
2374 msgid ""
2375 "B<int rt_tgsigqueueinfo(pid_t >I<tgid>B<, pid_t >I<tid>B<, int >I<sig>B<,>\n"
2376 "B<                      siginfo_t *>I<uinfo>B<);>\n"
2377 msgstr ""
2378
2379 #. type: Plain text
2380 #: build/C/man2/rt_sigqueueinfo.2:45
2381 msgid ""
2382 "The B<rt_sigqueueinfo>()  and B<rt_tgsigqueueinfo>()  system calls are the "
2383 "low-level interfaces used to send a signal plus data to a process or "
2384 "thread.  The receiver of the signal can obtain the accompanying data by "
2385 "establishing a signal handler with the B<sigaction>(2)  B<SA_SIGINFO> flag."
2386 msgstr ""
2387
2388 #. type: Plain text
2389 #: build/C/man2/rt_sigqueueinfo.2:51
2390 msgid ""
2391 "These system calls are not intended for direct application use; they are "
2392 "provided to allow the implementation of B<sigqueue>(3)  and "
2393 "B<pthread_sigqueue>(3)."
2394 msgstr ""
2395
2396 #. type: Plain text
2397 #: build/C/man2/rt_sigqueueinfo.2:63
2398 msgid ""
2399 "The B<rt_sigqueueinfo>()  system call sends the signal I<sig> to the thread "
2400 "group with the ID I<tgid>.  (The term \"thread group\" is synonymous with "
2401 "\"process\", and I<tid> corresponds to the traditional UNIX process ID.)  "
2402 "The signal will be delivered to an arbitrary member of the thread group "
2403 "(i.e., one of the threads that is not currently blocking the signal)."
2404 msgstr ""
2405
2406 #. type: Plain text
2407 #: build/C/man2/rt_sigqueueinfo.2:74
2408 msgid ""
2409 "The I<uinfo> argument specifies the data to accompany the signal.  This "
2410 "argument is a pointer to a structure of type I<siginfo_t>, described in "
2411 "B<sigaction>(2)  (and defined by including I<E<lt>sigaction.hE<gt>>).  The "
2412 "caller should set the following fields in this structure:"
2413 msgstr ""
2414
2415 #. type: TP
2416 #: build/C/man2/rt_sigqueueinfo.2:74 build/C/man7/sigevent.7:86 build/C/man2/wait.2:315
2417 #, no-wrap
2418 msgid "I<si_code>"
2419 msgstr ""
2420
2421 #.  tkill(2) or
2422 #. type: Plain text
2423 #: build/C/man2/rt_sigqueueinfo.2:90
2424 msgid ""
2425 "This must be one of the B<SI_*> codes in the kernel source file "
2426 "I<include/asm-generic/siginfo.h>, with the restriction that the code must be "
2427 "negative (i.e., cannot be B<SI_USER>, which is used by the kernel to "
2428 "indicate a signal sent by B<kill>(2))  and cannot (since Linux 2.6.39) be "
2429 "B<SI_TKILL> (which is used by the kernel to indicate a signal sent using "
2430 "B<tgkill>(2))."
2431 msgstr ""
2432
2433 #. type: TP
2434 #: build/C/man2/rt_sigqueueinfo.2:90 build/C/man2/wait.2:294
2435 #, no-wrap
2436 msgid "I<si_pid>"
2437 msgstr ""
2438
2439 #. type: Plain text
2440 #: build/C/man2/rt_sigqueueinfo.2:94
2441 msgid "This should be set to a process ID, typically the process ID of the sender."
2442 msgstr ""
2443
2444 #. type: TP
2445 #: build/C/man2/rt_sigqueueinfo.2:94 build/C/man2/wait.2:297
2446 #, no-wrap
2447 msgid "I<si_uid>"
2448 msgstr ""
2449
2450 #. type: Plain text
2451 #: build/C/man2/rt_sigqueueinfo.2:98
2452 msgid "This should be set to a user ID, typically the real user ID of the sender."
2453 msgstr ""
2454
2455 #. type: TP
2456 #: build/C/man2/rt_sigqueueinfo.2:98 build/C/man7/sigevent.7:94
2457 #, no-wrap
2458 msgid "I<si_value>"
2459 msgstr ""
2460
2461 #. type: Plain text
2462 #: build/C/man2/rt_sigqueueinfo.2:105
2463 msgid ""
2464 "This field contains the user data to accompany the signal.  For more "
2465 "information, see the description of the last (I<union sigval>)  argument of "
2466 "B<sigqueue>(3)."
2467 msgstr ""
2468
2469 #. type: Plain text
2470 #: build/C/man2/rt_sigqueueinfo.2:112
2471 msgid ""
2472 "Internally, the kernel sets the I<si_signo> field to the value specified in "
2473 "I<sig>, so that the receiver of the signal can also obtain the signal number "
2474 "via that field."
2475 msgstr ""
2476
2477 #. type: Plain text
2478 #: build/C/man2/rt_sigqueueinfo.2:124
2479 msgid ""
2480 "The B<rt_tgsigueueinfo>()  system call is like B<rt_sigueueinfo>(), but "
2481 "sends the signal and data to the single thread specified by the combination "
2482 "of I<tgid>, a thread group ID, and I<tid>, a thread in that thread group."
2483 msgstr ""
2484
2485 #. type: Plain text
2486 #: build/C/man2/rt_sigqueueinfo.2:129
2487 msgid ""
2488 "On success, these system calls return 0.  On error, they return -1 and "
2489 "I<errno> is set to indicate the error."
2490 msgstr ""
2491
2492 #. type: TP
2493 #: build/C/man2/rt_sigqueueinfo.2:130 build/C/man3/sigqueue.3:90 build/C/man2/sigwaitinfo.2:108 build/C/man2/timer_create.2:174
2494 #, no-wrap
2495 msgid "B<EAGAIN>"
2496 msgstr ""
2497
2498 #. type: Plain text
2499 #: build/C/man2/rt_sigqueueinfo.2:136 build/C/man3/sigqueue.3:96
2500 msgid ""
2501 "The limit of signals which may be queued has been reached.  (See "
2502 "B<signal>(7)  for further information.)"
2503 msgstr ""
2504
2505 #. type: Plain text
2506 #: build/C/man2/rt_sigqueueinfo.2:143
2507 msgid "I<sig>, I<tgid>, or I<tid> was invalid."
2508 msgstr ""
2509
2510 #. type: Plain text
2511 #: build/C/man2/rt_sigqueueinfo.2:151
2512 msgid ""
2513 "The caller does not have permission to send the signal to the target.  For "
2514 "the required permissions, see B<kill>(2).  Or: I<uinfo-E<gt>si_code> is "
2515 "invalid."
2516 msgstr ""
2517
2518 #. type: Plain text
2519 #: build/C/man2/rt_sigqueueinfo.2:157
2520 msgid "B<rt_sigqueinfo>(): No thread group matching I<tgid> was found."
2521 msgstr ""
2522
2523 #. type: Plain text
2524 #: build/C/man2/rt_sigqueueinfo.2:164
2525 msgid "B<rt_rtsigqueinfo>(): No thread matching I<tgid> and I<tid> was found."
2526 msgstr ""
2527
2528 #. type: Plain text
2529 #: build/C/man2/rt_sigqueueinfo.2:171
2530 msgid ""
2531 "The B<rt_sigqueueinfo>()  system call was added to Linux in version 2.2.  "
2532 "The B<rt_tgsigqueueinfo>()  system call was added to Linux in version "
2533 "2.6.31."
2534 msgstr ""
2535
2536 #. type: Plain text
2537 #: build/C/man2/rt_sigqueueinfo.2:173 build/C/man2/sgetmask.2:63 build/C/man2/timerfd_create.2:372
2538 msgid "These system calls are Linux-specific."
2539 msgstr ""
2540
2541 #. type: Plain text
2542 #: build/C/man2/rt_sigqueueinfo.2:178
2543 msgid ""
2544 "Since these system calls are not intended for application use, there are no "
2545 "glibc wrapper functions; use B<syscall>(2)  in the unlikely case that you "
2546 "want to call them directly."
2547 msgstr ""
2548
2549 #. type: Plain text
2550 #: build/C/man2/rt_sigqueueinfo.2:183
2551 msgid ""
2552 "As with B<kill>(2), the null signal (0) can be used to check if the "
2553 "specified process or thread exists."
2554 msgstr ""
2555
2556 #. type: Plain text
2557 #: build/C/man2/rt_sigqueueinfo.2:191
2558 msgid ""
2559 "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<tgkill>(2), "
2560 "B<pthread_sigqueue>(3), B<sigqueue>(3), B<signal>(7)"
2561 msgstr ""
2562
2563 #. type: TH
2564 #: build/C/man2/sgetmask.2:24
2565 #, no-wrap
2566 msgid "SGETMASK"
2567 msgstr ""
2568
2569 #. type: TH
2570 #: build/C/man2/sgetmask.2:24
2571 #, no-wrap
2572 msgid "2007-07-05"
2573 msgstr ""
2574
2575 #. type: Plain text
2576 #: build/C/man2/sgetmask.2:27
2577 msgid "sgetmask, ssetmask - manipulation of signal mask (obsolete)"
2578 msgstr ""
2579
2580 #. type: Plain text
2581 #: build/C/man2/sgetmask.2:29
2582 msgid "B<long sgetmask(void);>"
2583 msgstr ""
2584
2585 #. type: Plain text
2586 #: build/C/man2/sgetmask.2:31
2587 msgid "B<long ssetmask(long >I<newmask>B<);>"
2588 msgstr ""
2589
2590 #. type: Plain text
2591 #: build/C/man2/sgetmask.2:37
2592 msgid ""
2593 "These system calls are obsolete.  I<Do not use them>; use B<sigprocmask>(2)  "
2594 "instead."
2595 msgstr ""
2596
2597 #. type: Plain text
2598 #: build/C/man2/sgetmask.2:40
2599 msgid "B<sgetmask>()  returns the signal mask of the calling process."
2600 msgstr ""
2601
2602 #. type: Plain text
2603 #: build/C/man2/sgetmask.2:45
2604 msgid ""
2605 "B<ssetmask>()  sets the signal mask of the calling process to the value "
2606 "given in I<newmask>.  The previous signal mask is returned."
2607 msgstr ""
2608
2609 #. type: Plain text
2610 #: build/C/man2/sgetmask.2:54
2611 msgid ""
2612 "The signal masks dealt with by these two system calls are plain bit masks "
2613 "(unlike the I<sigset_t> used by B<sigprocmask>(2)); use B<sigmask>(3)  to "
2614 "create and inspect these masks."
2615 msgstr ""
2616
2617 #. type: Plain text
2618 #: build/C/man2/sgetmask.2:59
2619 msgid ""
2620 "B<sgetmask>()  always successfully returns the signal mask.  B<ssetmask>()  "
2621 "always succeeds, and returns the previous signal mask."
2622 msgstr ""
2623
2624 #. type: Plain text
2625 #: build/C/man2/sgetmask.2:61
2626 msgid "These system calls always succeed."
2627 msgstr ""
2628
2629 #. type: Plain text
2630 #: build/C/man2/sgetmask.2:66
2631 msgid "Glibc does not provide wrappers for these system calls; use B<syscall>(2)."
2632 msgstr ""
2633
2634 #. type: Plain text
2635 #: build/C/man2/sgetmask.2:69
2636 msgid ""
2637 "These system calls are unaware of signal numbers greater than 31 (i.e., "
2638 "real-time signals)."
2639 msgstr ""
2640
2641 #. type: Plain text
2642 #: build/C/man2/sgetmask.2:74
2643 msgid "It is not possible to block B<SIGSTOP> or B<SIGKILL>."
2644 msgstr ""
2645
2646 #. type: Plain text
2647 #: build/C/man2/sgetmask.2:77
2648 msgid "B<sigprocmask>(2), B<signal>(7)"
2649 msgstr ""
2650
2651 #. type: TH
2652 #: build/C/man2/sigaction.2:45
2653 #, no-wrap
2654 msgid "SIGACTION"
2655 msgstr ""
2656
2657 #. type: TH
2658 #: build/C/man2/sigaction.2:45
2659 #, no-wrap
2660 msgid "2011-09-08"
2661 msgstr ""
2662
2663 #. type: Plain text
2664 #: build/C/man2/sigaction.2:48
2665 msgid "sigaction - examine and change a signal action"
2666 msgstr ""
2667
2668 #. type: Plain text
2669 #: build/C/man2/sigaction.2:54
2670 #, no-wrap
2671 msgid ""
2672 "B<int sigaction(int >I<signum>B<, const struct sigaction *>I<act>B<,>\n"
2673 "B<              struct sigaction *>I<oldact>B<);>\n"
2674 msgstr ""
2675
2676 #. type: Plain text
2677 #: build/C/man2/sigaction.2:64
2678 msgid ""
2679 "B<sigaction>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
2680 "_POSIX_SOURCE"
2681 msgstr ""
2682
2683 #. type: Plain text
2684 #: build/C/man2/sigaction.2:73
2685 msgid ""
2686 "The B<sigaction>()  system call is used to change the action taken by a "
2687 "process on receipt of a specific signal.  (See B<signal>(7)  for an overview "
2688 "of signals.)"
2689 msgstr ""
2690
2691 #. type: Plain text
2692 #: build/C/man2/sigaction.2:79
2693 msgid ""
2694 "I<signum> specifies the signal and can be any valid signal except B<SIGKILL> "
2695 "and B<SIGSTOP>."
2696 msgstr ""
2697
2698 #. type: Plain text
2699 #: build/C/man2/sigaction.2:90
2700 msgid ""
2701 "If I<act> is non-NULL, the new action for signal I<signum> is installed from "
2702 "I<act>.  If I<oldact> is non-NULL, the previous action is saved in "
2703 "I<oldact>."
2704 msgstr ""
2705
2706 #. type: Plain text
2707 #: build/C/man2/sigaction.2:94
2708 msgid "The I<sigaction> structure is defined as something like:"
2709 msgstr ""
2710
2711 #. type: Plain text
2712 #: build/C/man2/sigaction.2:104
2713 #, no-wrap
2714 msgid ""
2715 "struct sigaction {\n"
2716 "    void     (*sa_handler)(int);\n"
2717 "    void     (*sa_sigaction)(int, siginfo_t *, void *);\n"
2718 "    sigset_t   sa_mask;\n"
2719 "    int        sa_flags;\n"
2720 "    void     (*sa_restorer)(void);\n"
2721 "};\n"
2722 msgstr ""
2723
2724 #. type: Plain text
2725 #: build/C/man2/sigaction.2:111
2726 msgid ""
2727 "On some architectures a union is involved: do not assign to both "
2728 "I<sa_handler> and I<sa_sigaction>."
2729 msgstr ""
2730
2731 #. type: Plain text
2732 #: build/C/man2/sigaction.2:118
2733 msgid ""
2734 "The I<sa_restorer> element is obsolete and should not be used.  POSIX does "
2735 "not specify a I<sa_restorer> element."
2736 msgstr ""
2737
2738 #. type: Plain text
2739 #: build/C/man2/sigaction.2:128
2740 msgid ""
2741 "I<sa_handler> specifies the action to be associated with I<signum> and may "
2742 "be B<SIG_DFL> for the default action, B<SIG_IGN> to ignore this signal, or a "
2743 "pointer to a signal handling function.  This function receives the signal "
2744 "number as its only argument."
2745 msgstr ""
2746
2747 #. type: Plain text
2748 #: build/C/man2/sigaction.2:150
2749 msgid ""
2750 "If B<SA_SIGINFO> is specified in I<sa_flags>, then I<sa_sigaction> (instead "
2751 "of I<sa_handler>)  specifies the signal-handling function for I<signum>.  "
2752 "This function receives the signal number as its first argument, a pointer to "
2753 "a I<siginfo_t> as its second argument and a pointer to a I<ucontext_t> (cast "
2754 "to I<void\\ *>) as its third argument.  (Commonly, the handler function "
2755 "doesn't make any use of the third argument.  See B<getcontext>(2)  for "
2756 "further information about I<ucontext_t>.)"
2757 msgstr ""
2758
2759 #. type: Plain text
2760 #: build/C/man2/sigaction.2:160
2761 msgid ""
2762 "I<sa_mask> specifies a mask of signals which should be blocked (i.e., added "
2763 "to the signal mask of the thread in which the signal handler is invoked)  "
2764 "during execution of the signal handler.  In addition, the signal which "
2765 "triggered the handler will be blocked, unless the B<SA_NODEFER> flag is "
2766 "used."
2767 msgstr ""
2768
2769 #. type: Plain text
2770 #: build/C/man2/sigaction.2:164
2771 msgid ""
2772 "I<sa_flags> specifies a set of flags which modify the behavior of the "
2773 "signal.  It is formed by the bitwise OR of zero or more of the following:"
2774 msgstr ""
2775
2776 #. type: TP
2777 #: build/C/man2/sigaction.2:165
2778 #, no-wrap
2779 msgid "B<SA_NOCLDSTOP>"
2780 msgstr ""
2781
2782 #. type: Plain text
2783 #: build/C/man2/sigaction.2:182
2784 msgid ""
2785 "If I<signum> is B<SIGCHLD>, do not receive notification when child processes "
2786 "stop (i.e., when they receive one of B<SIGSTOP>, B<SIGTSTP>, B<SIGTTIN> or "
2787 "B<SIGTTOU>)  or resume (i.e., they receive B<SIGCONT>)  (see B<wait>(2)).  "
2788 "This flag is only meaningful when establishing a handler for B<SIGCHLD>."
2789 msgstr ""
2790
2791 #. type: TP
2792 #: build/C/man2/sigaction.2:182
2793 #, no-wrap
2794 msgid "B<SA_NOCLDWAIT> (since Linux 2.6)"
2795 msgstr ""
2796
2797 #.  To be precise: Linux 2.5.60 -- MTK
2798 #. type: Plain text
2799 #: build/C/man2/sigaction.2:196
2800 msgid ""
2801 "If I<signum> is B<SIGCHLD>, do not transform children into zombies when they "
2802 "terminate.  See also B<waitpid>(2).  This flag is only meaningful when "
2803 "establishing a handler for B<SIGCHLD>, or when setting that signal's "
2804 "disposition to B<SIG_DFL>."
2805 msgstr ""
2806
2807 #. type: Plain text
2808 #: build/C/man2/sigaction.2:208
2809 msgid ""
2810 "If the B<SA_NOCLDWAIT> flag is set when establishing a handler for "
2811 "B<SIGCHLD>, POSIX.1 leaves it unspecified whether a B<SIGCHLD> signal is "
2812 "generated when a child process terminates.  On Linux, a B<SIGCHLD> signal is "
2813 "generated in this case; on some other implementations, it is not."
2814 msgstr ""
2815
2816 #. type: TP
2817 #: build/C/man2/sigaction.2:208
2818 #, no-wrap
2819 msgid "B<SA_NODEFER>"
2820 msgstr ""
2821
2822 #. type: Plain text
2823 #: build/C/man2/sigaction.2:215
2824 msgid ""
2825 "Do not prevent the signal from being received from within its own signal "
2826 "handler.  This flag is only meaningful when establishing a signal handler.  "
2827 "B<SA_NOMASK> is an obsolete, nonstandard synonym for this flag."
2828 msgstr ""
2829
2830 #. type: TP
2831 #: build/C/man2/sigaction.2:215
2832 #, no-wrap
2833 msgid "B<SA_ONSTACK>"
2834 msgstr ""
2835
2836 #. type: Plain text
2837 #: build/C/man2/sigaction.2:221
2838 msgid ""
2839 "Call the signal handler on an alternate signal stack provided by "
2840 "B<sigaltstack>(2).  If an alternate stack is not available, the default "
2841 "stack will be used.  This flag is only meaningful when establishing a signal "
2842 "handler."
2843 msgstr ""
2844
2845 #. type: TP
2846 #: build/C/man2/sigaction.2:221
2847 #, no-wrap
2848 msgid "B<SA_RESETHAND>"
2849 msgstr ""
2850
2851 #. type: Plain text
2852 #: build/C/man2/sigaction.2:228
2853 msgid ""
2854 "Restore the signal action to the default state once the signal handler has "
2855 "been called.  This flag is only meaningful when establishing a signal "
2856 "handler.  B<SA_ONESHOT> is an obsolete, nonstandard synonym for this flag."
2857 msgstr ""
2858
2859 #. type: TP
2860 #: build/C/man2/sigaction.2:228
2861 #, no-wrap
2862 msgid "B<SA_RESTART>"
2863 msgstr ""
2864
2865 #. type: Plain text
2866 #: build/C/man2/sigaction.2:236
2867 msgid ""
2868 "Provide behavior compatible with BSD signal semantics by making certain "
2869 "system calls restartable across signals.  This flag is only meaningful when "
2870 "establishing a signal handler.  See B<signal>(7)  for a discussion of system "
2871 "call restarting."
2872 msgstr ""
2873
2874 #. type: TP
2875 #: build/C/man2/sigaction.2:236
2876 #, no-wrap
2877 msgid "B<SA_SIGINFO> (since Linux 2.2)"
2878 msgstr ""
2879
2880 #.  (The
2881 #.  .I sa_sigaction
2882 #.  field was added in Linux 2.1.86.)
2883 #. type: Plain text
2884 #: build/C/man2/sigaction.2:247
2885 msgid ""
2886 "The signal handler takes 3 arguments, not one.  In this case, "
2887 "I<sa_sigaction> should be set instead of I<sa_handler>.  This flag is only "
2888 "meaningful when establishing a signal handler."
2889 msgstr ""
2890
2891 #. type: Plain text
2892 #: build/C/man2/sigaction.2:254
2893 msgid ""
2894 "The I<siginfo_t> argument to I<sa_sigaction> is a struct with the following "
2895 "elements:"
2896 msgstr ""
2897
2898 #.  FIXME
2899 #.  si_trapno seems to be only used on SPARC and Alpha;
2900 #.  this page could use a little more detail on its purpose there.
2901 #.  In the kernel: si_tid
2902 #. type: Plain text
2903 #: build/C/man2/sigaction.2:285
2904 #, no-wrap
2905 msgid ""
2906 "siginfo_t {\n"
2907 "    int      si_signo;    /* Signal number */\n"
2908 "    int      si_errno;    /* An errno value */\n"
2909 "    int      si_code;     /* Signal code */\n"
2910 "    int      si_trapno;   /* Trap number that caused\n"
2911 "                             hardware-generated signal\n"
2912 "                             (unused on most architectures) */\n"
2913 "    pid_t    si_pid;      /* Sending process ID */\n"
2914 "    uid_t    si_uid;      /* Real user ID of sending process */\n"
2915 "    int      si_status;   /* Exit value or signal */\n"
2916 "    clock_t  si_utime;    /* User time consumed */\n"
2917 "    clock_t  si_stime;    /* System time consumed */\n"
2918 "    sigval_t si_value;    /* Signal value */\n"
2919 "    int      si_int;      /* POSIX.1b signal */\n"
2920 "    void    *si_ptr;      /* POSIX.1b signal */\n"
2921 "    int      si_overrun;  /* Timer overrun count; POSIX.1b timers */\n"
2922 "    int      si_timerid;  /* Timer ID; POSIX.1b timers */\n"
2923 "    void    *si_addr;     /* Memory location which caused fault */\n"
2924 "    long     si_band;     /* Band event (was I<int> in\n"
2925 "                             glibc 2.3.2 and earlier) */\n"
2926 "    int      si_fd;       /* File descriptor */\n"
2927 "    short    si_addr_lsb; /* Least significant bit of address\n"
2928 "                             (since kernel 2.6.32) */\n"
2929 "}\n"
2930 msgstr ""
2931
2932 #. type: Plain text
2933 #: build/C/man2/sigaction.2:294
2934 msgid ""
2935 "I<si_signo>, I<si_errno> and I<si_code> are defined for all signals.  "
2936 "(I<si_errno> is generally unused on Linux.)  The rest of the struct may be a "
2937 "union, so that one should only read the fields that are meaningful for the "
2938 "given signal:"
2939 msgstr ""
2940
2941 #. type: Plain text
2942 #: build/C/man2/sigaction.2:309
2943 msgid ""
2944 "Signals sent with B<kill>(2)  and B<sigqueue>(3)  fill in I<si_pid> and "
2945 "I<si_uid>.  In addition, signals sent with B<sigqueue>(3)  fill in I<si_int> "
2946 "and I<si_ptr> with the values specified by the sender of the signal; see "
2947 "B<sigqueue>(3)  for more details."
2948 msgstr ""
2949
2950 #. type: Plain text
2951 #: build/C/man2/sigaction.2:325
2952 msgid ""
2953 "Signals sent by POSIX.1b timers (since Linux 2.6) fill in I<si_overrun> and "
2954 "I<si_timerid>.  The I<si_timerid> field is an internal ID used by the kernel "
2955 "to identify the timer; it is not the same as the timer ID returned by "
2956 "B<timer_create>(2).  The I<si_overrun> field is the timer overrun count; "
2957 "this is the same information as is obtained by a call to "
2958 "B<timer_getoverrun>(2).  These fields are nonstandard Linux extensions."
2959 msgstr ""
2960
2961 #. type: Plain text
2962 #: build/C/man2/sigaction.2:340
2963 msgid ""
2964 "Signals sent for message queue notification (see the description of "
2965 "B<SIGEV_SIGNAL> in B<mq_notify>(3))  fill in I<si_int>/I<si_ptr>, with the "
2966 "I<sigev_value> supplied to B<mq_notify>(3); I<si_pid>, with the process ID "
2967 "of the message sender; and I<si_uid>, with the real user ID of the message "
2968 "sender."
2969 msgstr ""
2970
2971 #.  FIXME .
2972 #.  When si_utime and si_stime where originally implemented, the
2973 #.  measurement unit was HZ, which was the same as clock ticks
2974 #.  (sysconf(_SC_CLK_TCK)).  In 2.6, HZ became configurable, and
2975 #.  was *still* used as the unit to return the info these fields,
2976 #.  with the result that the field values depended on the the
2977 #.  configured HZ.  Of course, the should have been measured in
2978 #.  USER_HZ instead, so that sysconf(_SC_CLK_TCK) could be used to
2979 #.  convert to seconds.  I have a queued patch to fix this:
2980 #.  http://thread.gmane.org/gmane.linux.kernel/698061/ .
2981 #.  This patch made it into 2.6.27.
2982 #.  But note that these fields still don't return the times of
2983 #.  waited-for children (as is done by getrusage() and times()
2984 #.  and wait4()).  Solaris 8 does include child times.
2985 #. type: Plain text
2986 #: build/C/man2/sigaction.2:387
2987 msgid ""
2988 "B<SIGCHLD> fills in I<si_pid>, I<si_uid>, I<si_status>, I<si_utime> and "
2989 "I<si_stime>, providing information about the child.  The I<si_pid> field is "
2990 "the process ID of the child; I<si_uid> is the child's real user ID.  The "
2991 "I<si_status> field contains the exit status of the child (if I<si_code> is "
2992 "B<CLD_EXITED>), or the signal number that caused the process to change "
2993 "state.  The I<si_utime> and I<si_stime> contain the user and system CPU time "
2994 "used by the child process; these fields do not include the times used by "
2995 "waited-for children (unlike B<getrusage>(2)  and B<time>(2)).  In kernels up "
2996 "to 2.6, and since 2.6.27, these fields report CPU time in units of "
2997 "I<sysconf(_SC_CLK_TCK)>.  In 2.6 kernels before 2.6.27, a bug meant that "
2998 "these fields reported time in units of the (configurable) system jiffy (see "
2999 "B<time>(7))."
3000 msgstr ""
3001
3002 #.  FIXME SIGTRAP also sets the following for ptrace_notify() ?
3003 #.      info.si_code = exit_code;
3004 #.      info.si_pid = task_pid_vnr(current);
3005 #.      info.si_uid = current_uid();  /* Real UID */
3006 #. type: Plain text
3007 #: build/C/man2/sigaction.2:423
3008 msgid ""
3009 "B<SIGILL>, B<SIGFPE>, B<SIGSEGV>, B<SIGBUS>, and B<SIGTRAP> fill in "
3010 "I<si_addr> with the address of the fault.  On some architectures, these "
3011 "signals also fill in the I<si_trapno> filed.  Some suberrors of B<SIGBUS>, "
3012 "in particular B<BUS_MCEERR_AO> and B<BUS_MCEERR_AR>, also fill in "
3013 "I<si_addr_lsb>.  This field indicates the least significant bit of the "
3014 "reported address and therefore the extent of the corruption.  For example, "
3015 "if a full page was corrupted, I<si_addr_lsb> contains "
3016 "I<log2(sysconf(_SC_PAGESIZE))>.  B<BUS_MCERR_*> and I<si_addr_lsb> are "
3017 "Linux-specific extensions."
3018 msgstr ""
3019
3020 #. type: Plain text
3021 #: build/C/man2/sigaction.2:436
3022 msgid ""
3023 "B<SIGPOLL>/B<SIGIO> fills in I<si_band> and I<si_fd>.  The I<si_band> event "
3024 "is a bit mask containing the same values as are filled in the I<revents> "
3025 "field by B<poll>(2).  The I<si_fd> field indicates the file descriptor for "
3026 "which the I/O event occurred."
3027 msgstr ""
3028
3029 #. type: Plain text
3030 #: build/C/man2/sigaction.2:443
3031 msgid ""
3032 "I<si_code> is a value (not a bit mask)  indicating why this signal was "
3033 "sent.  The following list shows the values which can be placed in I<si_code> "
3034 "for any signal, along with reason that the signal was generated."
3035 msgstr ""
3036
3037 #. type: TP
3038 #: build/C/man2/sigaction.2:444
3039 #, no-wrap
3040 msgid "B<SI_USER>"
3041 msgstr ""
3042
3043 #. type: Plain text
3044 #: build/C/man2/sigaction.2:449
3045 msgid "B<kill>(2)  or B<raise>(3)"
3046 msgstr ""
3047
3048 #. type: TP
3049 #: build/C/man2/sigaction.2:449
3050 #, no-wrap
3051 msgid "B<SI_KERNEL>"
3052 msgstr ""
3053
3054 #. type: Plain text
3055 #: build/C/man2/sigaction.2:452
3056 msgid "Sent by the kernel."
3057 msgstr ""
3058
3059 #. type: TP
3060 #: build/C/man2/sigaction.2:452
3061 #, no-wrap
3062 msgid "B<SI_QUEUE>"
3063 msgstr ""
3064
3065 #. type: TP
3066 #: build/C/man2/sigaction.2:455 build/C/man7/signal.7:126
3067 #, no-wrap
3068 msgid "B<sigqueue>(3)"
3069 msgstr ""
3070
3071 #. type: TP
3072 #: build/C/man2/sigaction.2:455
3073 #, no-wrap
3074 msgid "B<SI_TIMER>"
3075 msgstr ""
3076
3077 #. type: Plain text
3078 #: build/C/man2/sigaction.2:458
3079 msgid "POSIX timer expired"
3080 msgstr ""
3081
3082 #. type: TP
3083 #: build/C/man2/sigaction.2:458
3084 #, no-wrap
3085 msgid "B<SI_MESGQ>"
3086 msgstr ""
3087
3088 #. type: Plain text
3089 #: build/C/man2/sigaction.2:462
3090 msgid "POSIX message queue state changed (since Linux 2.6.6); see B<mq_notify>(3)"
3091 msgstr ""
3092
3093 #. type: TP
3094 #: build/C/man2/sigaction.2:462
3095 #, no-wrap
3096 msgid "B<SI_ASYNCIO>"
3097 msgstr ""
3098
3099 #. type: Plain text
3100 #: build/C/man2/sigaction.2:465
3101 msgid "AIO completed"
3102 msgstr ""
3103
3104 #. type: TP
3105 #: build/C/man2/sigaction.2:465
3106 #, no-wrap
3107 msgid "B<SI_SIGIO>"
3108 msgstr ""
3109
3110 #. type: Plain text
3111 #: build/C/man2/sigaction.2:468
3112 msgid "queued SIGIO"
3113 msgstr ""
3114
3115 #. type: TP
3116 #: build/C/man2/sigaction.2:468
3117 #, no-wrap
3118 msgid "B<SI_TKILL>"
3119 msgstr ""
3120
3121 #.  SI_DETHREAD is defined in 2.6.9 sources, but isn't implemented
3122 #.  It appears to have been an idea that was tried during 2.5.6
3123 #.  through to 2.5.24 and then was backed out.
3124 #. type: Plain text
3125 #: build/C/man2/sigaction.2:477
3126 msgid "B<tkill>(2)  or B<tgkill>(2)  (since Linux 2.4.19)"
3127 msgstr ""
3128
3129 #. type: Plain text
3130 #: build/C/man2/sigaction.2:484
3131 msgid "The following values can be placed in I<si_code> for a B<SIGILL> signal:"
3132 msgstr ""
3133
3134 #. type: TP
3135 #: build/C/man2/sigaction.2:485
3136 #, no-wrap
3137 msgid "B<ILL_ILLOPC>"
3138 msgstr ""
3139
3140 #. type: Plain text
3141 #: build/C/man2/sigaction.2:488
3142 msgid "illegal opcode"
3143 msgstr ""
3144
3145 #. type: TP
3146 #: build/C/man2/sigaction.2:488
3147 #, no-wrap
3148 msgid "B<ILL_ILLOPN>"
3149 msgstr ""
3150
3151 #. type: Plain text
3152 #: build/C/man2/sigaction.2:491
3153 msgid "illegal operand"
3154 msgstr ""
3155
3156 #. type: TP
3157 #: build/C/man2/sigaction.2:491
3158 #, no-wrap
3159 msgid "B<ILL_ILLADR>"
3160 msgstr ""
3161
3162 #. type: Plain text
3163 #: build/C/man2/sigaction.2:494
3164 msgid "illegal addressing mode"
3165 msgstr ""
3166
3167 #. type: TP
3168 #: build/C/man2/sigaction.2:494
3169 #, no-wrap
3170 msgid "B<ILL_ILLTRP>"
3171 msgstr ""
3172
3173 #. type: Plain text
3174 #: build/C/man2/sigaction.2:497
3175 msgid "illegal trap"
3176 msgstr ""
3177
3178 #. type: TP
3179 #: build/C/man2/sigaction.2:497
3180 #, no-wrap
3181 msgid "B<ILL_PRVOPC>"
3182 msgstr ""
3183
3184 #. type: Plain text
3185 #: build/C/man2/sigaction.2:500
3186 msgid "privileged opcode"
3187 msgstr ""
3188
3189 #. type: TP
3190 #: build/C/man2/sigaction.2:500
3191 #, no-wrap
3192 msgid "B<ILL_PRVREG>"
3193 msgstr ""
3194
3195 #. type: Plain text
3196 #: build/C/man2/sigaction.2:503
3197 msgid "privileged register"
3198 msgstr ""
3199
3200 #. type: TP
3201 #: build/C/man2/sigaction.2:503
3202 #, no-wrap
3203 msgid "B<ILL_COPROC>"
3204 msgstr ""
3205
3206 #. type: Plain text
3207 #: build/C/man2/sigaction.2:506
3208 msgid "coprocessor error"
3209 msgstr ""
3210
3211 #. type: TP
3212 #: build/C/man2/sigaction.2:506
3213 #, no-wrap
3214 msgid "B<ILL_BADSTK>"
3215 msgstr ""
3216
3217 #. type: Plain text
3218 #: build/C/man2/sigaction.2:509
3219 msgid "internal stack error"
3220 msgstr ""
3221
3222 #. type: Plain text
3223 #: build/C/man2/sigaction.2:516
3224 msgid "The following values can be placed in I<si_code> for a B<SIGFPE> signal:"
3225 msgstr ""
3226
3227 #. type: TP
3228 #: build/C/man2/sigaction.2:517
3229 #, no-wrap
3230 msgid "B<FPE_INTDIV>"
3231 msgstr ""
3232
3233 #. type: Plain text
3234 #: build/C/man2/sigaction.2:520
3235 msgid "integer divide by zero"
3236 msgstr ""
3237
3238 #. type: TP
3239 #: build/C/man2/sigaction.2:520
3240 #, no-wrap
3241 msgid "B<FPE_INTOVF>"
3242 msgstr ""
3243
3244 #. type: Plain text
3245 #: build/C/man2/sigaction.2:523
3246 msgid "integer overflow"
3247 msgstr ""
3248
3249 #. type: TP
3250 #: build/C/man2/sigaction.2:523
3251 #, no-wrap
3252 msgid "B<FPE_FLTDIV>"
3253 msgstr ""
3254
3255 #. type: Plain text
3256 #: build/C/man2/sigaction.2:526
3257 msgid "floating-point divide by zero"
3258 msgstr ""
3259
3260 #. type: TP
3261 #: build/C/man2/sigaction.2:526
3262 #, no-wrap
3263 msgid "B<FPE_FLTOVF>"
3264 msgstr ""
3265
3266 #. type: Plain text
3267 #: build/C/man2/sigaction.2:529
3268 msgid "floating-point overflow"
3269 msgstr ""
3270
3271 #. type: TP
3272 #: build/C/man2/sigaction.2:529
3273 #, no-wrap
3274 msgid "B<FPE_FLTUND>"
3275 msgstr ""
3276
3277 #. type: Plain text
3278 #: build/C/man2/sigaction.2:532
3279 msgid "floating-point underflow"
3280 msgstr ""
3281
3282 #. type: TP
3283 #: build/C/man2/sigaction.2:532
3284 #, no-wrap
3285 msgid "B<FPE_FLTRES>"
3286 msgstr ""
3287
3288 #. type: Plain text
3289 #: build/C/man2/sigaction.2:535
3290 msgid "floating-point inexact result"
3291 msgstr ""
3292
3293 #. type: TP
3294 #: build/C/man2/sigaction.2:535
3295 #, no-wrap
3296 msgid "B<FPE_FLTINV>"
3297 msgstr ""
3298
3299 #. type: Plain text
3300 #: build/C/man2/sigaction.2:538
3301 msgid "floating-point invalid operation"
3302 msgstr ""
3303
3304 #. type: TP
3305 #: build/C/man2/sigaction.2:538
3306 #, no-wrap
3307 msgid "B<FPE_FLTSUB>"
3308 msgstr ""
3309
3310 #. type: Plain text
3311 #: build/C/man2/sigaction.2:541
3312 msgid "subscript out of range"
3313 msgstr ""
3314
3315 #. type: Plain text
3316 #: build/C/man2/sigaction.2:548
3317 msgid "The following values can be placed in I<si_code> for a B<SIGSEGV> signal:"
3318 msgstr ""
3319
3320 #. type: TP
3321 #: build/C/man2/sigaction.2:549
3322 #, no-wrap
3323 msgid "B<SEGV_MAPERR>"
3324 msgstr ""
3325
3326 #. type: Plain text
3327 #: build/C/man2/sigaction.2:552
3328 msgid "address not mapped to object"
3329 msgstr ""
3330
3331 #. type: TP
3332 #: build/C/man2/sigaction.2:552
3333 #, no-wrap
3334 msgid "B<SEGV_ACCERR>"
3335 msgstr ""
3336
3337 #. type: Plain text
3338 #: build/C/man2/sigaction.2:555
3339 msgid "invalid permissions for mapped object"
3340 msgstr ""
3341
3342 #. type: Plain text
3343 #: build/C/man2/sigaction.2:562
3344 msgid "The following values can be placed in I<si_code> for a B<SIGBUS> signal:"
3345 msgstr ""
3346
3347 #. type: TP
3348 #: build/C/man2/sigaction.2:563
3349 #, no-wrap
3350 msgid "B<BUS_ADRALN>"
3351 msgstr ""
3352
3353 #. type: Plain text
3354 #: build/C/man2/sigaction.2:566
3355 msgid "invalid address alignment"
3356 msgstr ""
3357
3358 #. type: TP
3359 #: build/C/man2/sigaction.2:566
3360 #, no-wrap
3361 msgid "B<BUS_ADRERR>"
3362 msgstr ""
3363
3364 #. type: Plain text
3365 #: build/C/man2/sigaction.2:569
3366 msgid "nonexistent physical address"
3367 msgstr ""
3368
3369 #. type: TP
3370 #: build/C/man2/sigaction.2:569
3371 #, no-wrap
3372 msgid "B<BUS_OBJERR>"
3373 msgstr ""
3374
3375 #. type: Plain text
3376 #: build/C/man2/sigaction.2:572
3377 msgid "object-specific hardware error"
3378 msgstr ""
3379
3380 #. type: TP
3381 #: build/C/man2/sigaction.2:572
3382 #, no-wrap
3383 msgid "B<BUS_MCEERR_AR> (since Linux 2.6.32)"
3384 msgstr ""
3385
3386 #. type: Plain text
3387 #: build/C/man2/sigaction.2:575
3388 msgid "Hardware memory error consumed on a machine check; action required."
3389 msgstr ""
3390
3391 #. type: TP
3392 #: build/C/man2/sigaction.2:575
3393 #, no-wrap
3394 msgid "B<BUS_MCEERR_AO> (since Linux 2.6.32)"
3395 msgstr ""
3396
3397 #. type: Plain text
3398 #: build/C/man2/sigaction.2:578
3399 msgid "Hardware memory error detected in process but not consumed; action optional."
3400 msgstr ""
3401
3402 #. type: Plain text
3403 #: build/C/man2/sigaction.2:585
3404 msgid "The following values can be placed in I<si_code> for a B<SIGTRAP> signal:"
3405 msgstr ""
3406
3407 #. type: TP
3408 #: build/C/man2/sigaction.2:586
3409 #, no-wrap
3410 msgid "B<TRAP_BRKPT>"
3411 msgstr ""
3412
3413 #. type: Plain text
3414 #: build/C/man2/sigaction.2:589
3415 msgid "process breakpoint"
3416 msgstr ""
3417
3418 #. type: TP
3419 #: build/C/man2/sigaction.2:589
3420 #, no-wrap
3421 msgid "B<TRAP_TRACE>"
3422 msgstr ""
3423
3424 #. type: Plain text
3425 #: build/C/man2/sigaction.2:592
3426 msgid "process trace trap"
3427 msgstr ""
3428
3429 #. type: TP
3430 #: build/C/man2/sigaction.2:592
3431 #, no-wrap
3432 msgid "B<TRAP_BRANCH> (since Linux 2.4)"
3433 msgstr ""
3434
3435 #. type: Plain text
3436 #: build/C/man2/sigaction.2:595
3437 msgid "process taken branch trap"
3438 msgstr ""
3439
3440 #. type: TP
3441 #: build/C/man2/sigaction.2:595
3442 #, no-wrap
3443 msgid "B<TRAP_HWBKPT> (since Linux 2.4)"
3444 msgstr ""
3445
3446 #. type: Plain text
3447 #: build/C/man2/sigaction.2:598
3448 msgid "hardware breakpoint/watchpoint"
3449 msgstr ""
3450
3451 #. type: Plain text
3452 #: build/C/man2/sigaction.2:605
3453 msgid "The following values can be placed in I<si_code> for a B<SIGCHLD> signal:"
3454 msgstr ""
3455
3456 #. type: TP
3457 #: build/C/man2/sigaction.2:606
3458 #, no-wrap
3459 msgid "B<CLD_EXITED>"
3460 msgstr ""
3461
3462 #. type: Plain text
3463 #: build/C/man2/sigaction.2:609
3464 msgid "child has exited"
3465 msgstr ""
3466
3467 #. type: TP
3468 #: build/C/man2/sigaction.2:609
3469 #, no-wrap
3470 msgid "B<CLD_KILLED>"
3471 msgstr ""
3472
3473 #. type: Plain text
3474 #: build/C/man2/sigaction.2:612
3475 msgid "child was killed"
3476 msgstr ""
3477
3478 #. type: TP
3479 #: build/C/man2/sigaction.2:612
3480 #, no-wrap
3481 msgid "B<CLD_DUMPED>"
3482 msgstr ""
3483
3484 #. type: Plain text
3485 #: build/C/man2/sigaction.2:615
3486 msgid "child terminated abnormally"
3487 msgstr ""
3488
3489 #. type: TP
3490 #: build/C/man2/sigaction.2:615
3491 #, no-wrap
3492 msgid "B<CLD_TRAPPED>"
3493 msgstr ""
3494
3495 #. type: Plain text
3496 #: build/C/man2/sigaction.2:618
3497 msgid "traced child has trapped"
3498 msgstr ""
3499
3500 #. type: TP
3501 #: build/C/man2/sigaction.2:618
3502 #, no-wrap
3503 msgid "B<CLD_STOPPED>"
3504 msgstr ""
3505
3506 #. type: Plain text
3507 #: build/C/man2/sigaction.2:621
3508 msgid "child has stopped"
3509 msgstr ""
3510
3511 #. type: TP
3512 #: build/C/man2/sigaction.2:621
3513 #, no-wrap
3514 msgid "B<CLD_CONTINUED>"
3515 msgstr ""
3516
3517 #. type: Plain text
3518 #: build/C/man2/sigaction.2:624
3519 msgid "stopped child has continued (since Linux 2.6.9)"
3520 msgstr ""
3521
3522 #. type: Plain text
3523 #: build/C/man2/sigaction.2:631
3524 msgid "The following values can be placed in I<si_code> for a B<SIGPOLL> signal:"
3525 msgstr ""
3526
3527 #. type: TP
3528 #: build/C/man2/sigaction.2:632
3529 #, no-wrap
3530 msgid "B<POLL_IN>"
3531 msgstr ""
3532
3533 #. type: Plain text
3534 #: build/C/man2/sigaction.2:635
3535 msgid "data input available"
3536 msgstr ""
3537
3538 #. type: TP
3539 #: build/C/man2/sigaction.2:635
3540 #, no-wrap
3541 msgid "B<POLL_OUT>"
3542 msgstr ""
3543
3544 #. type: Plain text
3545 #: build/C/man2/sigaction.2:638
3546 msgid "output buffers available"
3547 msgstr ""
3548
3549 #. type: TP
3550 #: build/C/man2/sigaction.2:638
3551 #, no-wrap
3552 msgid "B<POLL_MSG>"
3553 msgstr ""
3554
3555 #. type: Plain text
3556 #: build/C/man2/sigaction.2:641
3557 msgid "input message available"
3558 msgstr ""
3559
3560 #. type: TP
3561 #: build/C/man2/sigaction.2:641
3562 #, no-wrap
3563 msgid "B<POLL_ERR>"
3564 msgstr ""
3565
3566 #. type: Plain text
3567 #: build/C/man2/sigaction.2:644
3568 msgid "I/O error"
3569 msgstr ""
3570
3571 #. type: TP
3572 #: build/C/man2/sigaction.2:644
3573 #, no-wrap
3574 msgid "B<POLL_PRI>"
3575 msgstr ""
3576
3577 #. type: Plain text
3578 #: build/C/man2/sigaction.2:647
3579 msgid "high priority input available"
3580 msgstr ""
3581
3582 #. type: TP
3583 #: build/C/man2/sigaction.2:647
3584 #, no-wrap
3585 msgid "B<POLL_HUP>"
3586 msgstr ""
3587
3588 #. type: Plain text
3589 #: build/C/man2/sigaction.2:650
3590 msgid "device disconnected"
3591 msgstr ""
3592
3593 #. type: Plain text
3594 #: build/C/man2/sigaction.2:654
3595 msgid "B<sigaction>()  returns 0 on success and -1 on error."
3596 msgstr ""
3597
3598 #. type: Plain text
3599 #: build/C/man2/sigaction.2:659
3600 msgid ""
3601 "I<act> or I<oldact> points to memory which is not a valid part of the "
3602 "process address space."
3603 msgstr ""
3604
3605 #. type: Plain text
3606 #: build/C/man2/sigaction.2:666
3607 msgid ""
3608 "An invalid signal was specified.  This will also be generated if an attempt "
3609 "is made to change the action for B<SIGKILL> or B<SIGSTOP>, which cannot be "
3610 "caught or ignored."
3611 msgstr ""
3612
3613 #.  SVr4 does not document the EINTR condition.
3614 #. type: Plain text
3615 #: build/C/man2/sigaction.2:669
3616 msgid "POSIX.1-2001, SVr4."
3617 msgstr ""
3618
3619 #. type: Plain text
3620 #: build/C/man2/sigaction.2:677 build/C/man7/signal.7:103
3621 msgid ""
3622 "A child created via B<fork>(2)  inherits a copy of its parent's signal "
3623 "dispositions.  During an B<execve>(2), the dispositions of handled signals "
3624 "are reset to the default; the dispositions of ignored signals are left "
3625 "unchanged."
3626 msgstr ""
3627
3628 #. type: Plain text
3629 #: build/C/man2/sigaction.2:695 build/C/man2/signal.2:129
3630 msgid ""
3631 "According to POSIX, the behavior of a process is undefined after it ignores "
3632 "a B<SIGFPE>, B<SIGILL>, or B<SIGSEGV> signal that was not generated by "
3633 "B<kill>(2)  or B<raise>(3).  Integer division by zero has undefined result.  "
3634 "On some architectures it will generate a B<SIGFPE> signal.  (Also dividing "
3635 "the most negative integer by -1 may generate B<SIGFPE>.)  Ignoring this "
3636 "signal might lead to an endless loop."
3637 msgstr ""
3638
3639 #. type: Plain text
3640 #: build/C/man2/sigaction.2:712
3641 msgid ""
3642 "POSIX.1-1990 disallowed setting the action for B<SIGCHLD> to B<SIG_IGN>.  "
3643 "POSIX.1-2001 allows this possibility, so that ignoring B<SIGCHLD> can be "
3644 "used to prevent the creation of zombies (see B<wait>(2)).  Nevertheless, the "
3645 "historical BSD and System V behaviors for ignoring B<SIGCHLD> differ, so "
3646 "that the only completely portable method of ensuring that terminated "
3647 "children do not become zombies is to catch the B<SIGCHLD> signal and perform "
3648 "a B<wait>(2)  or similar."
3649 msgstr ""
3650
3651 #. type: Plain text
3652 #: build/C/man2/sigaction.2:725
3653 msgid ""
3654 "POSIX.1-1990 only specified B<SA_NOCLDSTOP>.  POSIX.1-2001 added "
3655 "B<SA_NOCLDWAIT>, B<SA_RESETHAND>, B<SA_NODEFER>, and B<SA_SIGINFO>.  Use of "
3656 "these latter values in I<sa_flags> may be less portable in applications "
3657 "intended for older UNIX implementations."
3658 msgstr ""
3659
3660 #. type: Plain text
3661 #: build/C/man2/sigaction.2:729
3662 msgid "The B<SA_RESETHAND> flag is compatible with the SVr4 flag of the same name."
3663 msgstr ""
3664
3665 #. type: Plain text
3666 #: build/C/man2/sigaction.2:739
3667 msgid ""
3668 "The B<SA_NODEFER> flag is compatible with the SVr4 flag of the same name "
3669 "under kernels 1.3.9 and newer.  On older kernels the Linux implementation "
3670 "allowed the receipt of any signal, not just the one we are installing "
3671 "(effectively overriding any I<sa_mask> settings)."
3672 msgstr ""
3673
3674 #. type: Plain text
3675 #: build/C/man2/sigaction.2:745
3676 msgid ""
3677 "B<sigaction>()  can be called with a NULL second argument to query the "
3678 "current signal handler.  It can also be used to check whether a given signal "
3679 "is valid for the current machine by calling it with NULL second and third "
3680 "arguments."
3681 msgstr ""
3682
3683 #. type: Plain text
3684 #: build/C/man2/sigaction.2:751
3685 msgid ""
3686 "It is not possible to block B<SIGKILL> or B<SIGSTOP> (by specifying them in "
3687 "I<sa_mask>).  Attempts to do so are silently ignored."
3688 msgstr ""
3689
3690 #. type: Plain text
3691 #: build/C/man2/sigaction.2:755 build/C/man2/sigpending.2:65 build/C/man2/sigprocmask.2:131 build/C/man2/sigsuspend.2:104
3692 msgid "See B<sigsetops>(3)  for details on manipulating signal sets."
3693 msgstr ""
3694
3695 #. type: Plain text
3696 #: build/C/man2/sigaction.2:760
3697 msgid ""
3698 "See B<signal>(7)  for a list of the async-signal-safe functions that can be "
3699 "safely called inside from inside a signal handler."
3700 msgstr ""
3701
3702 #. type: SS
3703 #: build/C/man2/sigaction.2:760
3704 #, no-wrap
3705 msgid "Undocumented"
3706 msgstr ""
3707
3708 #. type: Plain text
3709 #: build/C/man2/sigaction.2:770
3710 msgid ""
3711 "Before the introduction of B<SA_SIGINFO> it was also possible to get some "
3712 "additional information, namely by using a I<sa_handler> with second argument "
3713 "of type I<struct sigcontext>.  See the relevant kernel sources for details.  "
3714 "This use is obsolete now."
3715 msgstr ""
3716
3717 #. type: Plain text
3718 #: build/C/man2/sigaction.2:779
3719 msgid ""
3720 "In kernels up to and including 2.6.13, specifying B<SA_NODEFER> in "
3721 "I<sa_flags> prevents not only the delivered signal from being masked during "
3722 "execution of the handler, but also the signals specified in I<sa_mask>.  "
3723 "This bug was fixed in kernel 2.6.14."
3724 msgstr ""
3725
3726 #. type: Plain text
3727 #: build/C/man2/sigaction.2:782
3728 msgid "See B<mprotect>(2)."
3729 msgstr ""
3730
3731 #. type: Plain text
3732 #: build/C/man2/sigaction.2:801
3733 msgid ""
3734 "B<kill>(1), B<kill>(2), B<killpg>(2), B<pause>(2), B<sigaltstack>(2), "
3735 "B<signal>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), "
3736 "B<sigsuspend>(2), B<wait>(2), B<raise>(3), B<siginterrupt>(3), "
3737 "B<sigqueue>(3), B<sigsetops>(3), B<sigvec>(3), B<core>(5), B<signal>(7)"
3738 msgstr ""
3739
3740 #. type: TH
3741 #: build/C/man2/sigaltstack.2:25
3742 #, no-wrap
3743 msgid "SIGALTSTACK"
3744 msgstr ""
3745
3746 #. type: TH
3747 #: build/C/man2/sigaltstack.2:25 build/C/man2/wait.2:50
3748 #, no-wrap
3749 msgid "2010-09-26"
3750 msgstr ""
3751
3752 #. type: Plain text
3753 #: build/C/man2/sigaltstack.2:28
3754 msgid "sigaltstack - set and/or get signal stack context"
3755 msgstr ""
3756
3757 #. type: Plain text
3758 #: build/C/man2/sigaltstack.2:32
3759 msgid "B<int sigaltstack(const stack_t *>I<ss>B<, stack_t *>I<oss>B<);>"
3760 msgstr ""
3761
3762 #. type: Plain text
3763 #: build/C/man2/sigaltstack.2:39
3764 msgid "B<sigaltstack>():"
3765 msgstr ""
3766
3767 #. type: Plain text
3768 #: build/C/man2/sigaltstack.2:46 build/C/man3/siginterrupt.3:51 build/C/man2/wait.2:79
3769 msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
3770 msgstr ""
3771
3772 #. type: Plain text
3773 #: build/C/man2/sigaltstack.2:58
3774 msgid ""
3775 "B<sigaltstack>()  allows a process to define a new alternate signal stack "
3776 "and/or retrieve the state of an existing alternate signal stack.  An "
3777 "alternate signal stack is used during the execution of a signal handler if "
3778 "the establishment of that handler (see B<sigaction>(2))  requested it."
3779 msgstr ""
3780
3781 #. type: Plain text
3782 #: build/C/man2/sigaltstack.2:61
3783 msgid ""
3784 "The normal sequence of events for using an alternate signal stack is the "
3785 "following:"
3786 msgstr ""
3787
3788 #. type: IP
3789 #: build/C/man2/sigaltstack.2:61 build/C/man7/signal.7:383
3790 #, no-wrap
3791 msgid "1."
3792 msgstr ""
3793
3794 #. type: Plain text
3795 #: build/C/man2/sigaltstack.2:65
3796 msgid "Allocate an area of memory to be used for the alternate signal stack."
3797 msgstr ""
3798
3799 #. type: IP
3800 #: build/C/man2/sigaltstack.2:65 build/C/man7/signal.7:387
3801 #, no-wrap
3802 msgid "2."
3803 msgstr ""
3804
3805 #. type: Plain text
3806 #: build/C/man2/sigaltstack.2:71
3807 msgid ""
3808 "Use B<sigaltstack>()  to inform the system of the existence and location of "
3809 "the alternate signal stack."
3810 msgstr ""
3811
3812 #. type: IP
3813 #: build/C/man2/sigaltstack.2:71 build/C/man7/signal.7:407
3814 #, no-wrap
3815 msgid "3."
3816 msgstr ""
3817
3818 #. type: Plain text
3819 #: build/C/man2/sigaltstack.2:78
3820 msgid ""
3821 "When establishing a signal handler using B<sigaction>(2), inform the system "
3822 "that the signal handler should be executed on the alternate signal stack by "
3823 "specifying the B<SA_ONSTACK> flag."
3824 msgstr ""
3825
3826 #. type: Plain text
3827 #: build/C/man2/sigaltstack.2:86
3828 msgid ""
3829 "The I<ss> argument is used to specify a new alternate signal stack, while "
3830 "the I<oss> argument is used to retrieve information about the currently "
3831 "established signal stack.  If we are interested in performing just one of "
3832 "these tasks then the other argument can be specified as NULL.  Each of these "
3833 "arguments is a structure of the following type:"
3834 msgstr ""
3835
3836 #. type: Plain text
3837 #: build/C/man2/sigaltstack.2:94
3838 #, no-wrap
3839 msgid ""
3840 "typedef struct {\n"
3841 "    void  *ss_sp;     /* Base address of stack */\n"
3842 "    int    ss_flags;  /* Flags */\n"
3843 "    size_t ss_size;   /* Number of bytes in stack */\n"
3844 "} stack_t;\n"
3845 msgstr ""
3846
3847 #. type: Plain text
3848 #: build/C/man2/sigaltstack.2:105
3849 msgid ""
3850 "To establish a new alternate signal stack, I<ss.ss_flags> is set to zero, "
3851 "and I<ss.ss_sp> and I<ss.ss_size> specify the starting address and size of "
3852 "the stack.  The constant B<SIGSTKSZ> is defined to be large enough to cover "
3853 "the usual size requirements for an alternate signal stack, and the constant "
3854 "B<MINSIGSTKSZ> defines the minimum size required to execute a signal "
3855 "handler."
3856 msgstr ""
3857
3858 #. type: Plain text
3859 #: build/C/man2/sigaltstack.2:109
3860 msgid ""
3861 "When a signal handler is invoked on the alternate stack, the kernel "
3862 "automatically aligns the address given in I<ss.ss_sp> to a suitable address "
3863 "boundary for the underlying hardware architecture."
3864 msgstr ""
3865
3866 #. type: Plain text
3867 #: build/C/man2/sigaltstack.2:114
3868 msgid ""
3869 "To disable an existing stack, specify I<ss.ss_flags> as B<SS_DISABLE>.  In "
3870 "this case, the remaining fields in I<ss> are ignored."
3871 msgstr ""
3872
3873 #. type: Plain text
3874 #: build/C/man2/sigaltstack.2:122
3875 msgid ""
3876 "If I<oss> is not NULL, then it is used to return information about the "
3877 "alternate signal stack which was in effect prior to the call to "
3878 "B<sigaltstack>().  The I<oss.ss_sp> and I<oss.ss_size> fields return the "
3879 "starting address and size of that stack.  The I<oss.ss_flags> may return "
3880 "either of the following values:"
3881 msgstr ""
3882
3883 #. type: TP
3884 #: build/C/man2/sigaltstack.2:122
3885 #, no-wrap
3886 msgid "B<SS_ONSTACK>"
3887 msgstr ""
3888
3889 #. type: Plain text
3890 #: build/C/man2/sigaltstack.2:128
3891 msgid ""
3892 "The process is currently executing on the alternate signal stack.  (Note "
3893 "that it is not possible to change the alternate signal stack if the process "
3894 "is currently executing on it.)"
3895 msgstr ""
3896
3897 #. type: TP
3898 #: build/C/man2/sigaltstack.2:128
3899 #, no-wrap
3900 msgid "B<SS_DISABLE>"
3901 msgstr ""
3902
3903 #. type: Plain text
3904 #: build/C/man2/sigaltstack.2:131
3905 msgid "The alternate signal stack is currently disabled."
3906 msgstr ""
3907
3908 #. type: Plain text
3909 #: build/C/man2/sigaltstack.2:135
3910 msgid ""
3911 "B<sigaltstack>()  returns 0 on success, or -1 on failure with I<errno> set "
3912 "to indicate the error."
3913 msgstr ""
3914
3915 #. type: Plain text
3916 #: build/C/man2/sigaltstack.2:140
3917 msgid ""
3918 "Either I<ss> or I<oss> is not NULL and points to an area outside of the "
3919 "process's address space."
3920 msgstr ""
3921
3922 #. type: Plain text
3923 #: build/C/man2/sigaltstack.2:145
3924 msgid ""
3925 "I<ss> is not NULL and the I<ss_flags> field contains a nonzero value other "
3926 "than B<SS_DISABLE>."
3927 msgstr ""
3928
3929 #. type: Plain text
3930 #: build/C/man2/sigaltstack.2:149
3931 msgid ""
3932 "The specified size of the new alternate signal stack (I<ss.ss_size>) was "
3933 "less than B<MINSTKSZ>."
3934 msgstr ""
3935
3936 #. type: Plain text
3937 #: build/C/man2/sigaltstack.2:154
3938 msgid ""
3939 "An attempt was made to change the alternate signal stack while it was active "
3940 "(i.e., the process was already executing on the current alternate signal "
3941 "stack)."
3942 msgstr ""
3943
3944 #. type: Plain text
3945 #: build/C/man2/sigaltstack.2:156
3946 msgid "SUSv2, SVr4, POSIX.1-2001."
3947 msgstr ""
3948
3949 #. type: Plain text
3950 #: build/C/man2/sigaltstack.2:164
3951 msgid ""
3952 "The most common usage of an alternate signal stack is to handle the "
3953 "B<SIGSEGV> signal that is generated if the space available for the normal "
3954 "process stack is exhausted: in this case, a signal handler for B<SIGSEGV> "
3955 "cannot be invoked on the process stack; if we wish to handle it, we must use "
3956 "an alternate signal stack."
3957 msgstr ""
3958
3959 #. type: Plain text
3960 #: build/C/man2/sigaltstack.2:174
3961 msgid ""
3962 "Establishing an alternate signal stack is useful if a process expects that "
3963 "it may exhaust its standard stack.  This may occur, for example, because the "
3964 "stack grows so large that it encounters the upwardly growing heap, or it "
3965 "reaches a limit established by a call to B<setrlimit(RLIMIT_STACK, &rlim)>.  "
3966 "If the standard stack is exhausted, the kernel sends the process a "
3967 "B<SIGSEGV> signal.  In these circumstances the only way to catch this signal "
3968 "is on an alternate signal stack."
3969 msgstr ""
3970
3971 #. type: Plain text
3972 #: build/C/man2/sigaltstack.2:180
3973 msgid ""
3974 "On most hardware architectures supported by Linux, stacks grow downward.  "
3975 "B<sigaltstack>()  automatically takes account of the direction of stack "
3976 "growth."
3977 msgstr ""
3978
3979 #. type: Plain text
3980 #: build/C/man2/sigaltstack.2:189
3981 msgid ""
3982 "Functions called from a signal handler executing on an alternate signal "
3983 "stack will also use the alternate signal stack.  (This also applies to any "
3984 "handlers invoked for other signals while the process is executing on the "
3985 "alternate signal stack.)  Unlike the standard stack, the system does not "
3986 "automatically extend the alternate signal stack.  Exceeding the allocated "
3987 "size of the alternate signal stack will lead to unpredictable results."
3988 msgstr ""
3989
3990 #. type: Plain text
3991 #: build/C/man2/sigaltstack.2:197
3992 msgid ""
3993 "A successful call to B<execve>(2)  removes any existing alternate signal "
3994 "stack.  A child process created via B<fork>(2)  inherits a copy of its "
3995 "parent's alternate signal stack settings."
3996 msgstr ""
3997
3998 #. type: Plain text
3999 #: build/C/man2/sigaltstack.2:206
4000 msgid ""
4001 "B<sigaltstack>()  supersedes the older B<sigstack>()  call.  For backward "
4002 "compatibility, glibc also provides B<sigstack>().  All new applications "
4003 "should be written using B<sigaltstack>()."
4004 msgstr ""
4005
4006 #. type: SS
4007 #: build/C/man2/sigaltstack.2:206 build/C/man3/sigpause.3:59
4008 #, no-wrap
4009 msgid "History"
4010 msgstr ""
4011
4012 #. type: Plain text
4013 #: build/C/man2/sigaltstack.2:213
4014 msgid ""
4015 "4.2BSD had a B<sigstack>()  system call.  It used a slightly different "
4016 "struct, and had the major disadvantage that the caller had to know the "
4017 "direction of stack growth."
4018 msgstr ""
4019
4020 #. type: Plain text
4021 #: build/C/man2/sigaltstack.2:216
4022 msgid "The following code segment demonstrates the use of B<sigaltstack>():"
4023 msgstr ""
4024
4025 #. type: Plain text
4026 #: build/C/man2/sigaltstack.2:220
4027 #, no-wrap
4028 msgid "stack_t ss;\n"
4029 msgstr ""
4030
4031 #. type: Plain text
4032 #: build/C/man2/sigaltstack.2:228
4033 #, no-wrap
4034 msgid ""
4035 "ss.ss_sp = malloc(SIGSTKSZ);\n"
4036 "if (ss.ss_sp == NULL)\n"
4037 "    /* Handle error */;\n"
4038 "ss.ss_size = SIGSTKSZ;\n"
4039 "ss.ss_flags = 0;\n"
4040 "if (sigaltstack(&ss, NULL) == -1)\n"
4041 "    /* Handle error */;\n"
4042 msgstr ""
4043
4044 #. type: Plain text
4045 #: build/C/man2/sigaltstack.2:237
4046 msgid ""
4047 "B<execve>(2), B<setrlimit>(2), B<sigaction>(2), B<siglongjmp>(3), "
4048 "B<sigsetjmp>(3), B<signal>(7)"
4049 msgstr ""
4050
4051 #. type: TH
4052 #: build/C/man7/sigevent.7:24
4053 #, no-wrap
4054 msgid "SIGEVENT"
4055 msgstr ""
4056
4057 #. type: TH
4058 #: build/C/man7/sigevent.7:24 build/C/man3/siginterrupt.3:29
4059 #, no-wrap
4060 msgid "2011-09-09"
4061 msgstr ""
4062
4063 #. type: Plain text
4064 #: build/C/man7/sigevent.7:27
4065 msgid "sigevent - structure for notification from asynchronous routines"
4066 msgstr ""
4067
4068 #. type: Plain text
4069 #: build/C/man7/sigevent.7:34
4070 #, no-wrap
4071 msgid ""
4072 "union sigval {          /* Data passed with notification */\n"
4073 "    int     sival_int;         /* Integer value */\n"
4074 "    void   *sival_ptr;         /* Pointer value */\n"
4075 "};\n"
4076 msgstr ""
4077
4078 #. type: Plain text
4079 #: build/C/man7/sigevent.7:49
4080 #, no-wrap
4081 msgid ""
4082 "struct sigevent {\n"
4083 "    int          sigev_notify; /* Notification method */\n"
4084 "    int          sigev_signo;  /* Notification signal */\n"
4085 "    union sigval sigev_value;  /* Data passed with\n"
4086 "                                  notification */\n"
4087 "    void       (*sigev_notify_function) (union sigval);\n"
4088 "                     /* Function used for thread\n"
4089 "                        notification (SIGEV_THREAD) */\n"
4090 "    void        *sigev_notify_attributes;\n"
4091 "                     /* Attributes for notification thread\n"
4092 "                        (SIGEV_THREAD) */\n"
4093 "    pid_t        sigev_notify_thread_id;\n"
4094 "                     /* ID of thread to signal (SIGEV_THREAD_ID) */\n"
4095 "};\n"
4096 msgstr ""
4097
4098 #. type: Plain text
4099 #: build/C/man7/sigevent.7:58
4100 msgid ""
4101 "The I<sigevent> structure is used by various APIs to describe the way a "
4102 "process is to be notified about an event (e.g., completion of an "
4103 "asynchronous request, expiration of a timer, or the arrival of a message)."
4104 msgstr ""
4105
4106 #. type: Plain text
4107 #: build/C/man7/sigevent.7:66
4108 msgid ""
4109 "The definition shown in the SYNOPSIS is approximate: some of the fields in "
4110 "the I<sigevent> structure may be defined as part of a union.  Programs "
4111 "should only employ those fields relevant to the value specified in "
4112 "I<sigev_notify>."
4113 msgstr ""
4114
4115 #. type: Plain text
4116 #: build/C/man7/sigevent.7:71
4117 msgid ""
4118 "The I<sigev_notify> field specifies how notification is to be performed.  "
4119 "This field can have one of the following values:"
4120 msgstr ""
4121
4122 #. type: TP
4123 #: build/C/man7/sigevent.7:71 build/C/man2/timer_create.2:105
4124 #, no-wrap
4125 msgid "B<SIGEV_NONE>"
4126 msgstr ""
4127
4128 #. type: Plain text
4129 #: build/C/man7/sigevent.7:74
4130 msgid "A \"null\" notification: don't do anything when the event occurs."
4131 msgstr ""
4132
4133 #. type: TP
4134 #: build/C/man7/sigevent.7:74 build/C/man2/timer_create.2:110
4135 #, no-wrap
4136 msgid "B<SIGEV_SIGNAL>"
4137 msgstr ""
4138
4139 #. type: Plain text
4140 #: build/C/man7/sigevent.7:78
4141 msgid "Notify the process by sending the signal specified in I<sigev_signo>."
4142 msgstr ""
4143
4144 #. type: Plain text
4145 #: build/C/man7/sigevent.7:85
4146 msgid ""
4147 "If the signal is caught with a signal handler that was registered using the "
4148 "B<sigaction>(2)  B<SA_SIGINFO> flag, then the following fields are set in "
4149 "the I<siginfo_t> structure that is passed as the second argument of the "
4150 "handler:"
4151 msgstr ""
4152
4153 #. type: Plain text
4154 #: build/C/man7/sigevent.7:90
4155 msgid ""
4156 "This field is set to a value that depends on the API delivering the "
4157 "notification."
4158 msgstr ""
4159
4160 #. type: TP
4161 #: build/C/man7/sigevent.7:90 build/C/man2/wait.2:301
4162 #, no-wrap
4163 msgid "I<si_signo>"
4164 msgstr ""
4165
4166 #. type: Plain text
4167 #: build/C/man7/sigevent.7:94
4168 msgid ""
4169 "This field is set to the signal number (i.e., the same value as in "
4170 "I<sigev_signo>)."
4171 msgstr ""
4172
4173 #. type: Plain text
4174 #: build/C/man7/sigevent.7:98
4175 msgid "This field is set to the value specified in I<sigev_value>."
4176 msgstr ""
4177
4178 #. type: Plain text
4179 #: build/C/man7/sigevent.7:103
4180 msgid ""
4181 "Depending on the API, other fields may also be set in the I<siginfo_t> "
4182 "structure."
4183 msgstr ""
4184
4185 #. type: Plain text
4186 #: build/C/man7/sigevent.7:106
4187 msgid ""
4188 "The same information is also available if the signal is accepted using "
4189 "B<sigwaitinfo>(2)."
4190 msgstr ""
4191
4192 #. type: TP
4193 #: build/C/man7/sigevent.7:106 build/C/man2/timer_create.2:128
4194 #, no-wrap
4195 msgid "B<SIGEV_THREAD>"
4196 msgstr ""
4197
4198 #. type: Plain text
4199 #: build/C/man7/sigevent.7:123
4200 msgid ""
4201 "Notify the process by invoking I<sigev_notify_function> \"as if\" it were "
4202 "the start function of a new thread.  (Among the implementation possibilities "
4203 "here are that each timer notification could result in the creation of a new "
4204 "thread, or that a single thread is created to receive all notifications.)  "
4205 "The function is invoked with I<sigev_value> as its sole argument.  If "
4206 "I<sigev_notify_attributes> is not NULL, it should point to a "
4207 "I<pthread_attr_t> structure that defines attributes for the new thread (see "
4208 "B<pthread_attr_init>(3))."
4209 msgstr ""
4210
4211 #. type: TP
4212 #: build/C/man7/sigevent.7:123 build/C/man2/timer_create.2:136
4213 #, no-wrap
4214 msgid "B<SIGEV_THREAD_ID> (Linux-specific)"
4215 msgstr ""
4216
4217 #.  | SIGEV_SIGNAL vs not?
4218 #. type: Plain text
4219 #: build/C/man7/sigevent.7:128
4220 msgid "Currently used only by POSIX timers; see B<timer_create>(2)."
4221 msgstr ""
4222
4223 #. type: Plain text
4224 #: build/C/man7/sigevent.7:130 build/C/man2/sigpending.2:61 build/C/man2/sigprocmask.2:101 build/C/man3/sigqueue.3:114 build/C/man3/sigsetops.3:128 build/C/man2/sigsuspend.2:82 build/C/man3/sigwait.3:79 build/C/man2/sigwaitinfo.2:128 build/C/man2/timer_create.2:193 build/C/man2/timer_delete.2:66 build/C/man2/timer_getoverrun.2:96 build/C/man2/timer_settime.2:205
4225 msgid "POSIX.1-2001."
4226 msgstr ""
4227
4228 #. type: Plain text
4229 #: build/C/man7/sigevent.7:140
4230 msgid ""
4231 "B<timer_create>(2), B<aio_fsync>(3), B<aio_read>(3), B<aio_write>(3), "
4232 "B<getaddrinfo_a>(3), B<lio_listio>(3), B<mq_notify>(3), B<aio>(7), "
4233 "B<pthreads>(7)"
4234 msgstr ""
4235
4236 #. type: TH
4237 #: build/C/man3/siginterrupt.3:29
4238 #, no-wrap
4239 msgid "SIGINTERRUPT"
4240 msgstr ""
4241
4242 #. type: Plain text
4243 #: build/C/man3/siginterrupt.3:32
4244 msgid "siginterrupt - allow signals to interrupt system calls"
4245 msgstr ""
4246
4247 #. type: Plain text
4248 #: build/C/man3/siginterrupt.3:37
4249 #, no-wrap
4250 msgid "B<int siginterrupt(int >I<sig>B<, int >I<flag>B<);>\n"
4251 msgstr ""
4252
4253 #. type: Plain text
4254 #: build/C/man3/siginterrupt.3:45
4255 msgid "B<siginterrupt>():"
4256 msgstr ""
4257
4258 #. type: Plain text
4259 #: build/C/man3/siginterrupt.3:62
4260 msgid ""
4261 "The B<siginterrupt>()  function changes the restart behavior when a system "
4262 "call is interrupted by the signal I<sig>.  If the I<flag> argument is false "
4263 "(0), then system calls will be restarted if interrupted by the specified "
4264 "signal I<sig>.  This is the default behavior in Linux."
4265 msgstr ""
4266
4267 #. type: Plain text
4268 #: build/C/man3/siginterrupt.3:67
4269 msgid ""
4270 "If the I<flag> argument is true (1) and no data has been transferred, then a "
4271 "system call interrupted by the signal I<sig> will return -1 and I<errno> "
4272 "will be set to B<EINTR>."
4273 msgstr ""
4274
4275 #. type: Plain text
4276 #: build/C/man3/siginterrupt.3:71
4277 msgid ""
4278 "If the I<flag> argument is true (1) and data transfer has started, then the "
4279 "system call will be interrupted and will return the actual amount of data "
4280 "transferred."
4281 msgstr ""
4282
4283 #. type: Plain text
4284 #: build/C/man3/siginterrupt.3:76
4285 msgid ""
4286 "The B<siginterrupt>()  function returns 0 on success, or -1 if the signal "
4287 "number I<sig> is invalid."
4288 msgstr ""
4289
4290 #. type: Plain text
4291 #: build/C/man3/siginterrupt.3:80
4292 msgid "The specified signal number is invalid."
4293 msgstr ""
4294
4295 #. type: Plain text
4296 #: build/C/man3/siginterrupt.3:89
4297 msgid ""
4298 "4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<siginterrupt>()  as obsolete, "
4299 "recommending the use of B<sigaction>(2)  with the B<SA_RESTART> flag "
4300 "instead."
4301 msgstr ""
4302
4303 #. type: Plain text
4304 #: build/C/man3/siginterrupt.3:91
4305 msgid "B<signal>(2)"
4306 msgstr ""
4307
4308 #. type: TH
4309 #: build/C/man2/signal.2:34 build/C/man7/signal.7:44
4310 #, no-wrap
4311 msgid "SIGNAL"
4312 msgstr ""
4313
4314 #. type: TH
4315 #: build/C/man2/signal.2:34
4316 #, no-wrap
4317 msgid "2008-07-11"
4318 msgstr ""
4319
4320 #. type: Plain text
4321 #: build/C/man2/signal.2:37
4322 msgid "signal - ANSI C signal handling"
4323 msgstr ""
4324
4325 #. type: Plain text
4326 #: build/C/man2/signal.2:43
4327 msgid "B<sighandler_t signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
4328 msgstr ""
4329
4330 #. type: Plain text
4331 #: build/C/man2/signal.2:52
4332 msgid ""
4333 "The behavior of B<signal>()  varies across UNIX versions, and has also "
4334 "varied historically across different versions of Linux.  B<Avoid its use>: "
4335 "use B<sigaction>(2)  instead.  See I<Portability> below."
4336 msgstr ""
4337
4338 #. type: Plain text
4339 #: build/C/man2/signal.2:62
4340 msgid ""
4341 "B<signal>()  sets the disposition of the signal I<signum> to I<handler>, "
4342 "which is either B<SIG_IGN>, B<SIG_DFL>, or the address of a "
4343 "programmer-defined function (a \"signal handler\")."
4344 msgstr ""
4345
4346 #. type: Plain text
4347 #: build/C/man2/signal.2:66
4348 msgid ""
4349 "If the signal I<signum> is delivered to the process, then one of the "
4350 "following happens:"
4351 msgstr ""
4352
4353 #. type: Plain text
4354 #: build/C/man2/signal.2:71
4355 msgid "If the disposition is set to B<SIG_IGN>, then the signal is ignored."
4356 msgstr ""
4357
4358 #. type: Plain text
4359 #: build/C/man2/signal.2:78
4360 msgid ""
4361 "If the disposition is set to B<SIG_DFL>, then the default action associated "
4362 "with the signal (see B<signal>(7))  occurs."
4363 msgstr ""
4364
4365 #. type: Plain text
4366 #: build/C/man2/signal.2:89
4367 msgid ""
4368 "If the disposition is set to a function, then first either the disposition "
4369 "is reset to B<SIG_DFL>, or the signal is blocked (see I<Portability> below), "
4370 "and then I<handler> is called with argument I<signum>.  If invocation of the "
4371 "handler caused the signal to be blocked, then the signal is unblocked upon "
4372 "return from the handler."
4373 msgstr ""
4374
4375 #. type: Plain text
4376 #: build/C/man2/signal.2:95
4377 msgid "The signals B<SIGKILL> and B<SIGSTOP> cannot be caught or ignored."
4378 msgstr ""
4379
4380 #. type: Plain text
4381 #: build/C/man2/signal.2:100
4382 msgid ""
4383 "B<signal>()  returns the previous value of the signal handler, or B<SIG_ERR> "
4384 "on error."
4385 msgstr ""
4386
4387 #. type: Plain text
4388 #: build/C/man2/signal.2:105
4389 msgid "I<signum> is invalid."
4390 msgstr ""
4391
4392 #. type: Plain text
4393 #: build/C/man2/signal.2:111
4394 msgid "The effects of B<signal>()  in a multithreaded process are unspecified."
4395 msgstr ""
4396
4397 #. type: Plain text
4398 #: build/C/man2/signal.2:136
4399 msgid ""
4400 "See B<sigaction>(2)  for details on what happens when B<SIGCHLD> is set to "
4401 "B<SIG_IGN>."
4402 msgstr ""
4403
4404 #. type: Plain text
4405 #: build/C/man2/signal.2:141
4406 msgid ""
4407 "See B<signal>(7)  for a list of the async-signal-safe functions that can be "
4408 "safely called from inside a signal handler."
4409 msgstr ""
4410
4411 #. type: Plain text
4412 #: build/C/man2/signal.2:156
4413 msgid ""
4414 "The use of I<sighandler_t> is a GNU extension.  Various versions of libc "
4415 "predefine this type; libc4 and libc5 define I<SignalHandler>; glibc defines "
4416 "I<sig_t> and, when B<_GNU_SOURCE> is defined, also I<sighandler_t>.  Without "
4417 "use of such a type, the declaration of B<signal>()  is the somewhat harder "
4418 "to read:"
4419 msgstr ""
4420
4421 #. type: Plain text
4422 #: build/C/man2/signal.2:160
4423 #, no-wrap
4424 msgid ""
4425 "B<void ( *>I<signal>B<(int >I<signum>B<, void (*>I<handler>B<)(int)) ) "
4426 "(int);>\n"
4427 msgstr ""
4428
4429 #. type: SS
4430 #: build/C/man2/signal.2:162
4431 #, no-wrap
4432 msgid "Portability"
4433 msgstr ""
4434
4435 #. type: Plain text
4436 #: build/C/man2/signal.2:174
4437 msgid ""
4438 "The only portable use of B<signal>()  is to set a signal's disposition to "
4439 "B<SIG_DFL> or B<SIG_IGN>.  The semantics when using B<signal>()  to "
4440 "establish a signal handler vary across systems (and POSIX.1 explicitly "
4441 "permits this variation); B<do not use it for this purpose.>"
4442 msgstr ""
4443
4444 #. type: Plain text
4445 #: build/C/man2/signal.2:180
4446 msgid ""
4447 "POSIX.1 solved the portability mess by specifying B<sigaction>(2), which "
4448 "provides explicit control of the semantics when a signal handler is invoked; "
4449 "use that interface instead of B<signal>()."
4450 msgstr ""
4451
4452 #. type: Plain text
4453 #: build/C/man2/signal.2:193
4454 msgid ""
4455 "In the original UNIX systems, when a handler that was established using "
4456 "B<signal>()  was invoked by the delivery of a signal, the disposition of the "
4457 "signal would be reset to B<SIG_DFL>, and the system did not block delivery "
4458 "of further instances of the signal.  System V also provides these semantics "
4459 "for B<signal>().  This was bad because the signal might be delivered again "
4460 "before the handler had a chance to reestablish itself.  Furthermore, rapid "
4461 "deliveries of the same signal could result in recursive invocations of the "
4462 "handler."
4463 msgstr ""
4464
4465 #. type: Plain text
4466 #: build/C/man2/signal.2:203
4467 msgid ""
4468 "BSD improved on this situation by changing the semantics of signal handling "
4469 "(but, unfortunately, silently changed the semantics when establishing a "
4470 "handler with B<signal>()).  On BSD, when a signal handler is invoked, the "
4471 "signal disposition is not reset, and further instances of the signal are "
4472 "blocked from being delivered while the handler is executing."
4473 msgstr ""
4474
4475 #. type: Plain text
4476 #: build/C/man2/signal.2:205
4477 msgid "The situation on Linux is as follows:"
4478 msgstr ""
4479
4480 #. type: Plain text
4481 #: build/C/man2/signal.2:209
4482 msgid "The kernel's B<signal>()  system call provides System V semantics."
4483 msgstr ""
4484
4485 #. type: Plain text
4486 #: build/C/man2/signal.2:225
4487 msgid ""
4488 "By default, in glibc 2 and later, the B<signal>()  wrapper function does not "
4489 "invoke the kernel system call.  Instead, it calls B<sigaction>(2)  using "
4490 "flags that supply BSD semantics.  This default behavior is provided as long "
4491 "as the B<_BSD_SOURCE> feature test macro is defined.  By default, "
4492 "B<_BSD_SOURCE> is defined; it is also implicitly defined if one defines "
4493 "B<_GNU_SOURCE>, and can of course be explicitly defined."
4494 msgstr ""
4495
4496 #
4497 #.  System V semantics are also provided if one uses the separate
4498 #.  .BR sysv_signal (3)
4499 #.  function.
4500 #. type: Plain text
4501 #: build/C/man2/signal.2:248
4502 msgid ""
4503 "On glibc 2 and later, if the B<_BSD_SOURCE> feature test macro is not "
4504 "defined, then B<signal>()  provides System V semantics.  (The default "
4505 "implicit definition of B<_BSD_SOURCE> is not provided if one invokes "
4506 "B<gcc>(1)  in one of its standard modes (I<-std=xxx> or I<-ansi>)  or "
4507 "defines various other feature test macros such as B<_POSIX_SOURCE>, "
4508 "B<_XOPEN_SOURCE>, or B<_SVID_SOURCE>; see B<feature_test_macros>(7).)"
4509 msgstr ""
4510
4511 #. type: Plain text
4512 #: build/C/man2/signal.2:259
4513 msgid ""
4514 "The B<signal>()  function in Linux libc4 and libc5 provide System V "
4515 "semantics.  If one on a libc5 system includes I<E<lt>bsd/signal.hE<gt>> "
4516 "instead of I<E<lt>signal.hE<gt>>, then B<signal>()  provides BSD semantics."
4517 msgstr ""
4518
4519 #. type: Plain text
4520 #: build/C/man2/signal.2:278
4521 msgid ""
4522 "B<kill>(1), B<alarm>(2), B<kill>(2), B<killpg>(2), B<pause>(2), "
4523 "B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigprocmask>(2), "
4524 "B<sigsuspend>(2), B<bsd_signal>(3), B<raise>(3), B<siginterrupt>(3), "
4525 "B<sigqueue>(3), B<sigsetops>(3), B<sigvec>(3), B<sysv_signal>(3), "
4526 "B<signal>(7)"
4527 msgstr ""
4528
4529 #. type: Plain text
4530 #: build/C/man7/signal.7:47
4531 msgid "signal - overview of signals"
4532 msgstr ""
4533
4534 #. type: Plain text
4535 #: build/C/man7/signal.7:50
4536 msgid ""
4537 "Linux supports both POSIX reliable signals (hereinafter \"standard "
4538 "signals\") and POSIX real-time signals."
4539 msgstr ""
4540
4541 #. type: SS
4542 #: build/C/man7/signal.7:50
4543 #, no-wrap
4544 msgid "Signal Dispositions"
4545 msgstr ""
4546
4547 #. type: Plain text
4548 #: build/C/man7/signal.7:55
4549 msgid ""
4550 "Each signal has a current I<disposition>, which determines how the process "
4551 "behaves when it is delivered the signal."
4552 msgstr ""
4553
4554 #. type: Plain text
4555 #: build/C/man7/signal.7:58
4556 msgid ""
4557 "The entries in the \"Action\" column of the tables below specify the default "
4558 "disposition for each signal, as follows:"
4559 msgstr ""
4560
4561 #. type: IP
4562 #: build/C/man7/signal.7:58
4563 #, no-wrap
4564 msgid "Term"
4565 msgstr ""
4566
4567 #. type: Plain text
4568 #: build/C/man7/signal.7:60
4569 msgid "Default action is to terminate the process."
4570 msgstr ""
4571
4572 #. type: IP
4573 #: build/C/man7/signal.7:60
4574 #, no-wrap
4575 msgid "Ign"
4576 msgstr ""
4577
4578 #. type: Plain text
4579 #: build/C/man7/signal.7:62
4580 msgid "Default action is to ignore the signal."
4581 msgstr ""
4582
4583 #. type: IP
4584 #: build/C/man7/signal.7:62
4585 #, no-wrap
4586 msgid "Core"
4587 msgstr ""
4588
4589 #. type: Plain text
4590 #: build/C/man7/signal.7:65
4591 msgid "Default action is to terminate the process and dump core (see B<core>(5))."
4592 msgstr ""
4593
4594 #. type: IP
4595 #: build/C/man7/signal.7:65
4596 #, no-wrap
4597 msgid "Stop"
4598 msgstr ""
4599
4600 #. type: Plain text
4601 #: build/C/man7/signal.7:67
4602 msgid "Default action is to stop the process."
4603 msgstr ""
4604
4605 #. type: IP
4606 #: build/C/man7/signal.7:67
4607 #, no-wrap
4608 msgid "Cont"
4609 msgstr ""
4610
4611 #. type: Plain text
4612 #: build/C/man7/signal.7:69
4613 msgid "Default action is to continue the process if it is currently stopped."
4614 msgstr ""
4615
4616 #. type: Plain text
4617 #: build/C/man7/signal.7:91
4618 msgid ""
4619 "A process can change the disposition of a signal using B<sigaction>(2)  or "
4620 "B<signal>(2).  (The latter is less portable when establishing a signal "
4621 "handler; see B<signal>(2)  for details.)  Using these system calls, a "
4622 "process can elect one of the following behaviors to occur on delivery of the "
4623 "signal: perform the default action; ignore the signal; or catch the signal "
4624 "with a I<signal handler>, a programmer-defined function that is "
4625 "automatically invoked when the signal is delivered.  (By default, the signal "
4626 "handler is invoked on the normal process stack.  It is possible to arrange "
4627 "that the signal handler uses an alternate stack; see B<sigaltstack>(2)  for "
4628 "a discussion of how to do this and when it might be useful.)"
4629 msgstr ""
4630
4631 #. type: Plain text
4632 #: build/C/man7/signal.7:95
4633 msgid ""
4634 "The signal disposition is a per-process attribute: in a multithreaded "
4635 "application, the disposition of a particular signal is the same for all "
4636 "threads."
4637 msgstr ""
4638
4639 #. type: SS
4640 #: build/C/man7/signal.7:103
4641 #, no-wrap
4642 msgid "Sending a Signal"
4643 msgstr ""
4644
4645 #. type: Plain text
4646 #: build/C/man7/signal.7:106
4647 msgid ""
4648 "The following system calls and library functions allow the caller to send a "
4649 "signal:"
4650 msgstr ""
4651
4652 #. type: TP
4653 #: build/C/man7/signal.7:106
4654 #, no-wrap
4655 msgid "B<raise>(3)"
4656 msgstr ""
4657
4658 #. type: Plain text
4659 #: build/C/man7/signal.7:109
4660 msgid "Sends a signal to the calling thread."
4661 msgstr ""
4662
4663 #. type: TP
4664 #: build/C/man7/signal.7:109
4665 #, no-wrap
4666 msgid "B<kill>(2)"
4667 msgstr ""
4668
4669 #. type: Plain text
4670 #: build/C/man7/signal.7:114
4671 msgid ""
4672 "Sends a signal to a specified process, to all members of a specified process "
4673 "group, or to all processes on the system."
4674 msgstr ""
4675
4676 #. type: TP
4677 #: build/C/man7/signal.7:114
4678 #, no-wrap
4679 msgid "B<killpg>(2)"
4680 msgstr ""
4681
4682 #. type: Plain text
4683 #: build/C/man7/signal.7:117
4684 msgid "Sends a signal to all of the members of a specified process group."
4685 msgstr ""
4686
4687 #. type: TP
4688 #: build/C/man7/signal.7:117
4689 #, no-wrap
4690 msgid "B<pthread_kill>(3)"
4691 msgstr ""
4692
4693 #. type: Plain text
4694 #: build/C/man7/signal.7:121
4695 msgid ""
4696 "Sends a signal to a specified POSIX thread in the same process as the "
4697 "caller."
4698 msgstr ""
4699
4700 #. type: TP
4701 #: build/C/man7/signal.7:121
4702 #, no-wrap
4703 msgid "B<tgkill>(2)"
4704 msgstr ""
4705
4706 #. type: Plain text
4707 #: build/C/man7/signal.7:126
4708 msgid ""
4709 "Sends a signal to a specified thread within a specific process.  (This is "
4710 "the system call used to implement B<pthread_kill>(3).)"
4711 msgstr ""
4712
4713 #. type: Plain text
4714 #: build/C/man7/signal.7:129
4715 msgid "Sends a real-time signal with accompanying data to a specified process."
4716 msgstr ""
4717
4718 #. type: SS
4719 #: build/C/man7/signal.7:129
4720 #, no-wrap
4721 msgid "Waiting for a Signal to be Caught"
4722 msgstr ""
4723
4724 #. type: Plain text
4725 #: build/C/man7/signal.7:133
4726 msgid ""
4727 "The following system calls suspend execution of the calling process or "
4728 "thread until a signal is caught (or an unhandled signal terminates the "
4729 "process):"
4730 msgstr ""
4731
4732 #. type: TP
4733 #: build/C/man7/signal.7:133
4734 #, no-wrap
4735 msgid "B<pause>(2)"
4736 msgstr ""
4737
4738 #. type: Plain text
4739 #: build/C/man7/signal.7:136
4740 msgid "Suspends execution until any signal is caught."
4741 msgstr ""
4742
4743 #. type: TP
4744 #: build/C/man7/signal.7:136
4745 #, no-wrap
4746 msgid "B<sigsuspend>(2)"
4747 msgstr ""
4748
4749 #. type: Plain text
4750 #: build/C/man7/signal.7:140
4751 msgid ""
4752 "Temporarily changes the signal mask (see below) and suspends execution until "
4753 "one of the unmasked signals is caught."
4754 msgstr ""
4755
4756 #. type: SS
4757 #: build/C/man7/signal.7:140
4758 #, no-wrap
4759 msgid "Synchronously Accepting a Signal"
4760 msgstr ""
4761
4762 #. type: Plain text
4763 #: build/C/man7/signal.7:147
4764 msgid ""
4765 "Rather than asynchronously catching a signal via a signal handler, it is "
4766 "possible to synchronously accept the signal, that is, to block execution "
4767 "until the signal is delivered, at which point the kernel returns information "
4768 "about the signal to the caller.  There are two general ways to do this:"
4769 msgstr ""
4770
4771 #. type: Plain text
4772 #: build/C/man7/signal.7:155
4773 msgid ""
4774 "B<sigwaitinfo>(2), B<sigtimedwait>(2), and B<sigwait>(3)  suspend execution "
4775 "until one of the signals in a specified set is delivered.  Each of these "
4776 "calls returns information about the delivered signal."
4777 msgstr ""
4778
4779 #. type: Plain text
4780 #: build/C/man7/signal.7:168
4781 msgid ""
4782 "B<signalfd>(2)  returns a file descriptor that can be used to read "
4783 "information about signals that are delivered to the caller.  Each B<read>(2)  "
4784 "from this file descriptor blocks until one of the signals in the set "
4785 "specified in the B<signalfd>(2)  call is delivered to the caller.  The "
4786 "buffer returned by B<read>(2)  contains a structure describing the signal."
4787 msgstr ""
4788
4789 #. type: SS
4790 #: build/C/man7/signal.7:168
4791 #, no-wrap
4792 msgid "Signal Mask and Pending Signals"
4793 msgstr ""
4794
4795 #. type: Plain text
4796 #: build/C/man7/signal.7:175
4797 msgid ""
4798 "A signal may be I<blocked>, which means that it will not be delivered until "
4799 "it is later unblocked.  Between the time when it is generated and when it is "
4800 "delivered a signal is said to be I<pending>."
4801 msgstr ""
4802
4803 #. type: Plain text
4804 #: build/C/man7/signal.7:184
4805 msgid ""
4806 "Each thread in a process has an independent I<signal mask>, which indicates "
4807 "the set of signals that the thread is currently blocking.  A thread can "
4808 "manipulate its signal mask using B<pthread_sigmask>(3).  In a traditional "
4809 "single-threaded application, B<sigprocmask>(2)  can be used to manipulate "
4810 "the signal mask."
4811 msgstr ""
4812
4813 #. type: Plain text
4814 #: build/C/man7/signal.7:190 build/C/man2/sigprocmask.2:113
4815 msgid ""
4816 "A child created via B<fork>(2)  inherits a copy of its parent's signal mask; "
4817 "the signal mask is preserved across B<execve>(2)."
4818 msgstr ""
4819
4820 #. type: Plain text
4821 #: build/C/man7/signal.7:207
4822 msgid ""
4823 "A signal may be generated (and thus pending)  for a process as a whole "
4824 "(e.g., when sent using B<kill>(2))  or for a specific thread (e.g., certain "
4825 "signals, such as B<SIGSEGV> and B<SIGFPE>, generated as a consequence of "
4826 "executing a specific machine-language instruction are thread directed, as "
4827 "are signals targeted at a specific thread using B<pthread_kill>(3)).  A "
4828 "process-directed signal may be delivered to any one of the threads that does "
4829 "not currently have the signal blocked.  If more than one of the threads has "
4830 "the signal unblocked, then the kernel chooses an arbitrary thread to which "
4831 "to deliver the signal."
4832 msgstr ""
4833
4834 #. type: Plain text
4835 #: build/C/man7/signal.7:214
4836 msgid ""
4837 "A thread can obtain the set of signals that it currently has pending using "
4838 "B<sigpending>(2).  This set will consist of the union of the set of pending "
4839 "process-directed signals and the set of signals pending for the calling "
4840 "thread."
4841 msgstr ""
4842
4843 #. type: Plain text
4844 #: build/C/man7/signal.7:220 build/C/man2/sigpending.2:76
4845 msgid ""
4846 "A child created via B<fork>(2)  initially has an empty pending signal set; "
4847 "the pending signal set is preserved across an B<execve>(2)."
4848 msgstr ""
4849
4850 #. type: SS
4851 #: build/C/man7/signal.7:220
4852 #, no-wrap
4853 msgid "Standard Signals"
4854 msgstr ""
4855
4856 #.  parisc is a law unto itself
4857 #. type: Plain text
4858 #: build/C/man7/signal.7:230
4859 msgid ""
4860 "Linux supports the standard signals listed below.  Several signal numbers "
4861 "are architecture-dependent, as indicated in the \"Value\" column.  (Where "
4862 "three values are given, the first one is usually valid for alpha and sparc, "
4863 "the middle one for ix86, ia64, ppc, s390, arm and sh, and the last one for "
4864 "mips.  A - denotes that a signal is absent on the corresponding "
4865 "architecture.)"
4866 msgstr ""
4867
4868 #. type: Plain text
4869 #: build/C/man7/signal.7:232
4870 msgid "First the signals described in the original POSIX.1-1990 standard."
4871 msgstr ""
4872
4873 #. type: tbl table
4874 #: build/C/man7/signal.7:236 build/C/man7/signal.7:272 build/C/man7/signal.7:301
4875 #, no-wrap
4876 msgid "Signal\tValue\tAction\tComment\n"
4877 msgstr ""
4878
4879 #. type: tbl table
4880 #: build/C/man7/signal.7:237
4881 #, no-wrap
4882 msgid "SIGHUP\t\\01\tTerm\tHangup detected on controlling terminal\n"
4883 msgstr ""
4884
4885 #. type: tbl table
4886 #: build/C/man7/signal.7:238
4887 #, no-wrap
4888 msgid "\t\t\tor death of controlling process\n"
4889 msgstr ""
4890
4891 #. type: tbl table
4892 #: build/C/man7/signal.7:239
4893 #, no-wrap
4894 msgid "SIGINT\t\\02\tTerm\tInterrupt from keyboard\n"
4895 msgstr ""
4896
4897 #. type: tbl table
4898 #: build/C/man7/signal.7:240
4899 #, no-wrap
4900 msgid "SIGQUIT\t\\03\tCore\tQuit from keyboard\n"
4901 msgstr ""
4902
4903 #. type: tbl table
4904 #: build/C/man7/signal.7:241
4905 #, no-wrap
4906 msgid "SIGILL\t\\04\tCore\tIllegal Instruction\n"
4907 msgstr ""
4908
4909 #. type: tbl table
4910 #: build/C/man7/signal.7:242
4911 #, no-wrap
4912 msgid "SIGABRT\t\\06\tCore\tAbort signal from B<abort>(3)\n"
4913 msgstr ""
4914
4915 #. type: tbl table
4916 #: build/C/man7/signal.7:243
4917 #, no-wrap
4918 msgid "SIGFPE\t\\08\tCore\tFloating point exception\n"
4919 msgstr ""
4920
4921 #. type: tbl table
4922 #: build/C/man7/signal.7:244
4923 #, no-wrap
4924 msgid "SIGKILL\t\\09\tTerm\tKill signal\n"
4925 msgstr ""
4926
4927 #. type: tbl table
4928 #: build/C/man7/signal.7:245
4929 #, no-wrap
4930 msgid "SIGSEGV\t11\tCore\tInvalid memory reference\n"
4931 msgstr ""
4932
4933 #. type: tbl table
4934 #: build/C/man7/signal.7:246
4935 #, no-wrap
4936 msgid "SIGPIPE\t13\tTerm\tBroken pipe: write to pipe with no\n"
4937 msgstr ""
4938
4939 #. type: tbl table
4940 #: build/C/man7/signal.7:247
4941 #, no-wrap
4942 msgid "\t\t\treaders\n"
4943 msgstr ""
4944
4945 #. type: tbl table
4946 #: build/C/man7/signal.7:248
4947 #, no-wrap
4948 msgid "SIGALRM\t14\tTerm\tTimer signal from B<alarm>(2)\n"
4949 msgstr ""
4950
4951 #. type: tbl table
4952 #: build/C/man7/signal.7:249
4953 #, no-wrap
4954 msgid "SIGTERM\t15\tTerm\tTermination signal\n"
4955 msgstr ""
4956
4957 #. type: tbl table
4958 #: build/C/man7/signal.7:250
4959 #, no-wrap
4960 msgid "SIGUSR1\t30,10,16\tTerm\tUser-defined signal 1\n"
4961 msgstr ""
4962
4963 #. type: tbl table
4964 #: build/C/man7/signal.7:251
4965 #, no-wrap
4966 msgid "SIGUSR2\t31,12,17\tTerm\tUser-defined signal 2\n"
4967 msgstr ""
4968
4969 #. type: tbl table
4970 #: build/C/man7/signal.7:252
4971 #, no-wrap
4972 msgid "SIGCHLD\t20,17,18\tIgn\tChild stopped or terminated\n"
4973 msgstr ""
4974
4975 #. type: tbl table
4976 #: build/C/man7/signal.7:253
4977 #, no-wrap
4978 msgid "SIGCONT\t19,18,25\tCont\tContinue if stopped\n"
4979 msgstr ""
4980
4981 #. type: tbl table
4982 #: build/C/man7/signal.7:254
4983 #, no-wrap
4984 msgid "SIGSTOP\t17,19,23\tStop\tStop process\n"
4985 msgstr ""
4986
4987 #. type: tbl table
4988 #: build/C/man7/signal.7:255
4989 #, no-wrap
4990 msgid "SIGTSTP\t18,20,24\tStop\tStop typed at tty\n"
4991 msgstr ""
4992
4993 #. type: tbl table
4994 #: build/C/man7/signal.7:256
4995 #, no-wrap
4996 msgid "SIGTTIN\t21,21,26\tStop\ttty input for background process\n"
4997 msgstr ""
4998
4999 #. type: tbl table
5000 #: build/C/man7/signal.7:257
5001 #, no-wrap
5002 msgid "SIGTTOU\t22,22,27\tStop\ttty output for background process\n"
5003 msgstr ""
5004
5005 #. type: Plain text
5006 #: build/C/man7/signal.7:265
5007 msgid "The signals B<SIGKILL> and B<SIGSTOP> cannot be caught, blocked, or ignored."
5008 msgstr ""
5009
5010 #. type: Plain text
5011 #: build/C/man7/signal.7:268
5012 msgid ""
5013 "Next the signals not in the POSIX.1-1990 standard but described in SUSv2 and "
5014 "POSIX.1-2001."
5015 msgstr ""
5016
5017 #. type: tbl table
5018 #: build/C/man7/signal.7:273
5019 #, no-wrap
5020 msgid "SIGBUS\t10,7,10\tCore\tBus error (bad memory access)\n"
5021 msgstr ""
5022
5023 #. type: tbl table
5024 #: build/C/man7/signal.7:274
5025 #, no-wrap
5026 msgid "SIGPOLL\t\tTerm\tPollable event (Sys V).\n"
5027 msgstr ""
5028
5029 #. type: tbl table
5030 #: build/C/man7/signal.7:275
5031 #, no-wrap
5032 msgid "\t\t\tSynonym for B<SIGIO>\n"
5033 msgstr ""
5034
5035 #. type: tbl table
5036 #: build/C/man7/signal.7:276
5037 #, no-wrap
5038 msgid "SIGPROF\t27,27,29\tTerm\tProfiling timer expired\n"
5039 msgstr ""
5040
5041 #. type: tbl table
5042 #: build/C/man7/signal.7:277
5043 #, no-wrap
5044 msgid "SIGSYS\t12,31,12\tCore\tBad argument to routine (SVr4)\n"
5045 msgstr ""
5046
5047 #. type: tbl table
5048 #: build/C/man7/signal.7:278
5049 #, no-wrap
5050 msgid "SIGTRAP\t5\tCore\tTrace/breakpoint trap\n"
5051 msgstr ""
5052
5053 #. type: tbl table
5054 #: build/C/man7/signal.7:279
5055 #, no-wrap
5056 msgid "SIGURG\t16,23,21\tIgn\tUrgent condition on socket (4.2BSD)\n"
5057 msgstr ""
5058
5059 #. type: tbl table
5060 #: build/C/man7/signal.7:280
5061 #, no-wrap
5062 msgid "SIGVTALRM\t26,26,28\tTerm\tVirtual alarm clock (4.2BSD)\n"
5063 msgstr ""
5064
5065 #. type: tbl table
5066 #: build/C/man7/signal.7:281
5067 #, no-wrap
5068 msgid "SIGXCPU\t24,24,30\tCore\tCPU time limit exceeded (4.2BSD)\n"
5069 msgstr ""
5070
5071 #. type: tbl table
5072 #: build/C/man7/signal.7:282
5073 #, no-wrap
5074 msgid "SIGXFSZ\t25,25,31\tCore\tFile size limit exceeded (4.2BSD)\n"
5075 msgstr ""
5076
5077 #. type: Plain text
5078 #: build/C/man7/signal.7:295
5079 msgid ""
5080 "Up to and including Linux 2.2, the default behavior for B<SIGSYS>, "
5081 "B<SIGXCPU>, B<SIGXFSZ>, and (on architectures other than SPARC and MIPS)  "
5082 "B<SIGBUS> was to terminate the process (without a core dump).  (On some "
5083 "other UNIX systems the default action for B<SIGXCPU> and B<SIGXFSZ> is to "
5084 "terminate the process without a core dump.)  Linux 2.4 conforms to the "
5085 "POSIX.1-2001 requirements for these signals, terminating the process with a "
5086 "core dump."
5087 msgstr ""
5088
5089 #. type: Plain text
5090 #: build/C/man7/signal.7:297
5091 msgid "Next various other signals."
5092 msgstr ""
5093
5094 #. type: tbl table
5095 #: build/C/man7/signal.7:302
5096 #, no-wrap
5097 msgid "SIGIOT\t6\tCore\tIOT trap. A synonym for B<SIGABRT>\n"
5098 msgstr ""
5099
5100 #. type: tbl table
5101 #: build/C/man7/signal.7:303
5102 #, no-wrap
5103 msgid "SIGEMT\t7,-,7\tTerm\n"
5104 msgstr ""
5105
5106 #. type: tbl table
5107 #: build/C/man7/signal.7:304
5108 #, no-wrap
5109 msgid "SIGSTKFLT\t-,16,-\tTerm\tStack fault on coprocessor (unused)\n"
5110 msgstr ""
5111
5112 #. type: tbl table
5113 #: build/C/man7/signal.7:305
5114 #, no-wrap
5115 msgid "SIGIO\t23,29,22\tTerm\tI/O now possible (4.2BSD)\n"
5116 msgstr ""
5117
5118 #. type: tbl table
5119 #: build/C/man7/signal.7:306
5120 #, no-wrap
5121 msgid "SIGCLD\t-,-,18\tIgn\tA synonym for B<SIGCHLD>\n"
5122 msgstr ""
5123
5124 #. type: tbl table
5125 #: build/C/man7/signal.7:307
5126 #, no-wrap
5127 msgid "SIGPWR\t29,30,19\tTerm\tPower failure (System V)\n"
5128 msgstr ""
5129
5130 #. type: tbl table
5131 #: build/C/man7/signal.7:308
5132 #, no-wrap
5133 msgid "SIGINFO\t29,-,-\t\tA synonym for B<SIGPWR>\n"
5134 msgstr ""
5135
5136 #. type: tbl table
5137 #: build/C/man7/signal.7:309
5138 #, no-wrap
5139 msgid "SIGLOST\t-,-,-\tTerm\tFile lock lost\n"
5140 msgstr ""
5141
5142 #. type: tbl table
5143 #: build/C/man7/signal.7:310
5144 #, no-wrap
5145 msgid "SIGWINCH\t28,28,20\tIgn\tWindow resize signal (4.3BSD, Sun)\n"
5146 msgstr ""
5147
5148 #. type: tbl table
5149 #: build/C/man7/signal.7:311
5150 #, no-wrap
5151 msgid "SIGUNUSED\t-,31,-\tCore\tSynonymous with B<SIGSYS>\n"
5152 msgstr ""
5153
5154 #. type: Plain text
5155 #: build/C/man7/signal.7:321
5156 msgid "(Signal 29 is B<SIGINFO> / B<SIGPWR> on an alpha but B<SIGLOST> on a sparc.)"
5157 msgstr ""
5158
5159 #. type: Plain text
5160 #: build/C/man7/signal.7:327
5161 msgid ""
5162 "B<SIGEMT> is not specified in POSIX.1-2001, but nevertheless appears on most "
5163 "other UNIX systems, where its default action is typically to terminate the "
5164 "process with a core dump."
5165 msgstr ""
5166
5167 #. type: Plain text
5168 #: build/C/man7/signal.7:331
5169 msgid ""
5170 "B<SIGPWR> (which is not specified in POSIX.1-2001) is typically ignored by "
5171 "default on those other UNIX systems where it appears."
5172 msgstr ""
5173
5174 #. type: Plain text
5175 #: build/C/man7/signal.7:335
5176 msgid ""
5177 "B<SIGIO> (which is not specified in POSIX.1-2001) is ignored by default on "
5178 "several other UNIX systems."
5179 msgstr ""
5180
5181 #.  parisc is the only exception: SIGSYS is 12, SIGUNUSED is 31
5182 #. type: Plain text
5183 #: build/C/man7/signal.7:342
5184 msgid ""
5185 "Where defined, B<SIGUNUSED> is synonymous with B<SIGSYS> on most "
5186 "architectures."
5187 msgstr ""
5188
5189 #. type: SS
5190 #: build/C/man7/signal.7:342
5191 #, no-wrap
5192 msgid "Real-time Signals"
5193 msgstr ""
5194
5195 #. type: Plain text
5196 #: build/C/man7/signal.7:352
5197 msgid ""
5198 "Linux supports real-time signals as originally defined in the POSIX.1b "
5199 "real-time extensions (and now included in POSIX.1-2001).  The range of "
5200 "supported real-time signals is defined by the macros B<SIGRTMIN> and "
5201 "B<SIGRTMAX>.  POSIX.1-2001 requires that an implementation support at least "
5202 "B<_POSIX_RTSIG_MAX> (8) real-time signals."
5203 msgstr ""
5204
5205 #. type: Plain text
5206 #: build/C/man7/signal.7:374
5207 msgid ""
5208 "The Linux kernel supports a range of 32 different real-time signals, "
5209 "numbered 33 to 64.  However, the glibc POSIX threads implementation "
5210 "internally uses two (for NPTL) or three (for LinuxThreads) real-time signals "
5211 "(see B<pthreads>(7)), and adjusts the value of B<SIGRTMIN> suitably (to 34 "
5212 "or 35).  Because the range of available real-time signals varies according "
5213 "to the glibc threading implementation (and this variation can occur at run "
5214 "time according to the available kernel and glibc), and indeed the range of "
5215 "real-time signals varies across UNIX systems, programs should I<never refer "
5216 "to real-time signals using hard-coded numbers>, but instead should always "
5217 "refer to real-time signals using the notation B<SIGRTMIN>+n, and include "
5218 "suitable (run-time) checks that B<SIGRTMIN>+n does not exceed B<SIGRTMAX>."
5219 msgstr ""
5220
5221 #. type: Plain text
5222 #: build/C/man7/signal.7:378
5223 msgid ""
5224 "Unlike standard signals, real-time signals have no predefined meanings: the "
5225 "entire set of real-time signals can be used for application-defined "
5226 "purposes."
5227 msgstr ""
5228
5229 #. type: Plain text
5230 #: build/C/man7/signal.7:381
5231 msgid ""
5232 "The default action for an unhandled real-time signal is to terminate the "
5233 "receiving process."
5234 msgstr ""
5235
5236 #. type: Plain text
5237 #: build/C/man7/signal.7:383
5238 msgid "Real-time signals are distinguished by the following:"
5239 msgstr ""
5240
5241 #. type: Plain text
5242 #: build/C/man7/signal.7:387
5243 msgid ""
5244 "Multiple instances of real-time signals can be queued.  By contrast, if "
5245 "multiple instances of a standard signal are delivered while that signal is "
5246 "currently blocked, then only one instance is queued."
5247 msgstr ""
5248
5249 #. type: Plain text
5250 #: build/C/man7/signal.7:407
5251 msgid ""
5252 "If the signal is sent using B<sigqueue>(3), an accompanying value (either an "
5253 "integer or a pointer) can be sent with the signal.  If the receiving process "
5254 "establishes a handler for this signal using the B<SA_SIGINFO> flag to "
5255 "B<sigaction>(2)  then it can obtain this data via the I<si_value> field of "
5256 "the I<siginfo_t> structure passed as the second argument to the handler.  "
5257 "Furthermore, the I<si_pid> and I<si_uid> fields of this structure can be "
5258 "used to obtain the PID and real user ID of the process sending the signal."
5259 msgstr ""
5260
5261 #. type: Plain text
5262 #: build/C/man7/signal.7:416
5263 msgid ""
5264 "Real-time signals are delivered in a guaranteed order.  Multiple real-time "
5265 "signals of the same type are delivered in the order they were sent.  If "
5266 "different real-time signals are sent to a process, they are delivered "
5267 "starting with the lowest-numbered signal.  (I.e., low-numbered signals have "
5268 "highest priority.)  By contrast, if multiple standard signals are pending "
5269 "for a process, the order in which they are delivered is unspecified."
5270 msgstr ""
5271
5272 #. type: Plain text
5273 #: build/C/man7/signal.7:421
5274 msgid ""
5275 "If both standard and real-time signals are pending for a process, POSIX "
5276 "leaves it unspecified which is delivered first.  Linux, like many other "
5277 "implementations, gives priority to standard signals in this case."
5278 msgstr ""
5279
5280 #. type: Plain text
5281 #: build/C/man7/signal.7:444
5282 msgid ""
5283 "According to POSIX, an implementation should permit at least "
5284 "B<_POSIX_SIGQUEUE_MAX> (32) real-time signals to be queued to a process.  "
5285 "However, Linux does things differently.  In kernels up to and including "
5286 "2.6.7, Linux imposes a system-wide limit on the number of queued real-time "
5287 "signals for all processes.  This limit can be viewed and (with privilege) "
5288 "changed via the I</proc/sys/kernel/rtsig-max> file.  A related file, "
5289 "I</proc/sys/kernel/rtsig-nr>, can be used to find out how many real-time "
5290 "signals are currently queued.  In Linux 2.6.8, these I</proc> interfaces "
5291 "were replaced by the B<RLIMIT_SIGPENDING> resource limit, which specifies a "
5292 "per-user limit for queued signals; see B<setrlimit>(2)  for further details."
5293 msgstr ""
5294
5295 #. type: SS
5296 #: build/C/man7/signal.7:444
5297 #, no-wrap
5298 msgid "Async-signal-safe functions"
5299 msgstr ""
5300
5301 #. type: Plain text
5302 #: build/C/man7/signal.7:453
5303 msgid ""
5304 "A signal handler function must be very careful, since processing elsewhere "
5305 "may be interrupted at some arbitrary point in the execution of the program.  "
5306 "POSIX has the concept of \"safe function\".  If a signal interrupts the "
5307 "execution of an unsafe function, and I<handler> calls an unsafe function, "
5308 "then the behavior of the program is undefined."
5309 msgstr ""
5310
5311 #. type: Plain text
5312 #: build/C/man7/signal.7:457
5313 msgid ""
5314 "POSIX.1-2004 (also known as POSIX.1-2001 Technical Corrigendum 2)  requires "
5315 "an implementation to guarantee that the following functions can be safely "
5316 "called inside a signal handler:"
5317 msgstr ""
5318
5319 #. type: Plain text
5320 #: build/C/man7/signal.7:578
5321 #, no-wrap
5322 msgid ""
5323 "_Exit()\n"
5324 "_exit()\n"
5325 "abort()\n"
5326 "accept()\n"
5327 "access()\n"
5328 "aio_error()\n"
5329 "aio_return()\n"
5330 "aio_suspend()\n"
5331 "alarm()\n"
5332 "bind()\n"
5333 "cfgetispeed()\n"
5334 "cfgetospeed()\n"
5335 "cfsetispeed()\n"
5336 "cfsetospeed()\n"
5337 "chdir()\n"
5338 "chmod()\n"
5339 "chown()\n"
5340 "clock_gettime()\n"
5341 "close()\n"
5342 "connect()\n"
5343 "creat()\n"
5344 "dup()\n"
5345 "dup2()\n"
5346 "execle()\n"
5347 "execve()\n"
5348 "fchmod()\n"
5349 "fchown()\n"
5350 "fcntl()\n"
5351 "fdatasync()\n"
5352 "fork()\n"
5353 "fpathconf()\n"
5354 "fstat()\n"
5355 "fsync()\n"
5356 "ftruncate()\n"
5357 "getegid()\n"
5358 "geteuid()\n"
5359 "getgid()\n"
5360 "getgroups()\n"
5361 "getpeername()\n"
5362 "getpgrp()\n"
5363 "getpid()\n"
5364 "getppid()\n"
5365 "getsockname()\n"
5366 "getsockopt()\n"
5367 "getuid()\n"
5368 "kill()\n"
5369 "link()\n"
5370 "listen()\n"
5371 "lseek()\n"
5372 "lstat()\n"
5373 "mkdir()\n"
5374 "mkfifo()\n"
5375 "open()\n"
5376 "pathconf()\n"
5377 "pause()\n"
5378 "pipe()\n"
5379 "poll()\n"
5380 "posix_trace_event()\n"
5381 "pselect()\n"
5382 "raise()\n"
5383 "read()\n"
5384 "readlink()\n"
5385 "recv()\n"
5386 "recvfrom()\n"
5387 "recvmsg()\n"
5388 "rename()\n"
5389 "rmdir()\n"
5390 "select()\n"
5391 "sem_post()\n"
5392 "send()\n"
5393 "sendmsg()\n"
5394 "sendto()\n"
5395 "setgid()\n"
5396 "setpgid()\n"
5397 "setsid()\n"
5398 "setsockopt()\n"
5399 "setuid()\n"
5400 "shutdown()\n"
5401 "sigaction()\n"
5402 "sigaddset()\n"
5403 "sigdelset()\n"
5404 "sigemptyset()\n"
5405 "sigfillset()\n"
5406 "sigismember()\n"
5407 "signal()\n"
5408 "sigpause()\n"
5409 "sigpending()\n"
5410 "sigprocmask()\n"
5411 "sigqueue()\n"
5412 "sigset()\n"
5413 "sigsuspend()\n"
5414 "sleep()\n"
5415 "sockatmark()\n"
5416 "socket()\n"
5417 "socketpair()\n"
5418 "stat()\n"
5419 "symlink()\n"
5420 "sysconf()\n"
5421 "tcdrain()\n"
5422 "tcflow()\n"
5423 "tcflush()\n"
5424 "tcgetattr()\n"
5425 "tcgetpgrp()\n"
5426 "tcsendbreak()\n"
5427 "tcsetattr()\n"
5428 "tcsetpgrp()\n"
5429 "time()\n"
5430 "timer_getoverrun()\n"
5431 "timer_gettime()\n"
5432 "timer_settime()\n"
5433 "times()\n"
5434 "umask()\n"
5435 "uname()\n"
5436 "unlink()\n"
5437 "utime()\n"
5438 "wait()\n"
5439 "waitpid()\n"
5440 "write()\n"
5441 msgstr ""
5442
5443 #. type: Plain text
5444 #: build/C/man7/signal.7:583
5445 msgid ""
5446 "POSIX.1-2008 removes fpathconf(), pathconf(), and sysconf()  from the above "
5447 "list, and adds the following functions:"
5448 msgstr ""
5449
5450 #. type: Plain text
5451 #: build/C/man7/signal.7:606
5452 #, no-wrap
5453 msgid ""
5454 "execl()\n"
5455 "execv()\n"
5456 "faccessat()\n"
5457 "fchmodat()\n"
5458 "fchownat()\n"
5459 "fexecve()\n"
5460 "fstatat()\n"
5461 "futimens()\n"
5462 "linkat()\n"
5463 "mkdirat()\n"
5464 "mkfifoat()\n"
5465 "mknod()\n"
5466 "mknodat()\n"
5467 "openat()\n"
5468 "readlinkat()\n"
5469 "renameat()\n"
5470 "symlinkat()\n"
5471 "unlinkat()\n"
5472 "utimensat()\n"
5473 "utimes()\n"
5474 msgstr ""
5475
5476 #. type: SS
5477 #: build/C/man7/signal.7:608
5478 #, no-wrap
5479 msgid "Interruption of System Calls and Library Functions by Signal Handlers"
5480 msgstr ""
5481
5482 #. type: Plain text
5483 #: build/C/man7/signal.7:611
5484 msgid ""
5485 "If a signal handler is invoked while a system call or library function call "
5486 "is blocked, then either:"
5487 msgstr ""
5488
5489 #. type: Plain text
5490 #: build/C/man7/signal.7:613
5491 msgid "the call is automatically restarted after the signal handler returns; or"
5492 msgstr ""
5493
5494 #. type: Plain text
5495 #: build/C/man7/signal.7:616
5496 msgid "the call fails with the error B<EINTR>."
5497 msgstr ""
5498
5499 #. type: Plain text
5500 #: build/C/man7/signal.7:624
5501 msgid ""
5502 "Which of these two behaviors occurs depends on the interface and whether or "
5503 "not the signal handler was established using the B<SA_RESTART> flag (see "
5504 "B<sigaction>(2)).  The details vary across UNIX systems; below, the details "
5505 "for Linux."
5506 msgstr ""
5507
5508 #.  The following system calls use ERESTARTSYS,
5509 #.  so that they are restartable
5510 #. type: Plain text
5511 #: build/C/man7/signal.7:633
5512 msgid ""
5513 "If a blocked call to one of the following interfaces is interrupted by a "
5514 "signal handler, then the call will be automatically restarted after the "
5515 "signal handler returns if the B<SA_RESTART> flag was used; otherwise the "
5516 "call will fail with the error B<EINTR>:"
5517 msgstr ""
5518
5519 #. type: Plain text
5520 #: build/C/man7/signal.7:649
5521 msgid ""
5522 "B<read>(2), B<readv>(2), B<write>(2), B<writev>(2), and B<ioctl>(2)  calls "
5523 "on \"slow\" devices.  A \"slow\" device is one where the I/O call may block "
5524 "for an indefinite time, for example, a terminal, pipe, or socket.  (A disk "
5525 "is not a slow device according to this definition.)  If an I/O call on a "
5526 "slow device has already transferred some data by the time it is interrupted "
5527 "by a signal handler, then the call will return a success status (normally, "
5528 "the number of bytes transferred)."
5529 msgstr ""
5530
5531 #. type: Plain text
5532 #: build/C/man7/signal.7:653
5533 msgid "B<open>(2), if it can block (e.g., when opening a FIFO; see B<fifo>(7))."
5534 msgstr ""
5535
5536 #. type: Plain text
5537 #: build/C/man7/signal.7:660
5538 msgid "B<wait>(2), B<wait3>(2), B<wait4>(2), B<waitid>(2), and B<waitpid>(2)."
5539 msgstr ""
5540
5541 #.  If a timeout (setsockopt()) is in effect on the socket, then these
5542 #.  system calls switch to using EINTR.  Consequently, they and are not
5543 #.  automatically restarted, and they show the stop/cont behavior
5544 #.  described below.  (Verified from 2.6.26 source, and by experiment; mtk)
5545 #. type: Plain text
5546 #: build/C/man7/signal.7:676
5547 msgid ""
5548 "Socket interfaces: B<accept>(2), B<connect>(2), B<recv>(2), B<recvfrom>(2), "
5549 "B<recvmsg>(2), B<send>(2), B<sendto>(2), and B<sendmsg>(2), unless a timeout "
5550 "has been set on the socket (see below)."
5551 msgstr ""
5552
5553 #. type: Plain text
5554 #: build/C/man7/signal.7:682
5555 msgid "File locking interfaces: B<flock>(2)  and B<fcntl>(2)  B<F_SETLKW>."
5556 msgstr ""
5557
5558 #. type: Plain text
5559 #: build/C/man7/signal.7:689
5560 msgid ""
5561 "POSIX message queue interfaces: B<mq_receive>(3), B<mq_timedreceive>(3), "
5562 "B<mq_send>(3), and B<mq_timedsend>(3)."
5563 msgstr ""
5564
5565 #. type: Plain text
5566 #: build/C/man7/signal.7:694
5567 msgid ""
5568 "B<futex>(2)  B<FUTEX_WAIT> (since Linux 2.6.22; beforehand, always failed "
5569 "with B<EINTR>)."
5570 msgstr ""
5571
5572 #. type: Plain text
5573 #: build/C/man7/signal.7:701
5574 msgid ""
5575 "POSIX semaphore interfaces: B<sem_wait>(3)  and B<sem_timedwait>(3)  (since "
5576 "Linux 2.6.22; beforehand, always failed with B<EINTR>)."
5577 msgstr ""
5578
5579 #.  These are the system calls that give EINTR or ERESTARTNOHAND
5580 #.  on interruption by a signal handler.
5581 #. type: Plain text
5582 #: build/C/man7/signal.7:712
5583 msgid ""
5584 "The following interfaces are never restarted after being interrupted by a "
5585 "signal handler, regardless of the use of B<SA_RESTART>; they always fail "
5586 "with the error B<EINTR> when interrupted by a signal handler:"
5587 msgstr ""
5588
5589 #. type: Plain text
5590 #: build/C/man7/signal.7:732 build/C/man7/signal.7:806
5591 msgid ""
5592 "Socket interfaces, when a timeout has been set on the socket using "
5593 "B<setsockopt>(2): B<accept>(2), B<recv>(2), B<recvfrom>(2), and "
5594 "B<recvmsg>(2), if a receive timeout (B<SO_RCVTIMEO>)  has been set; "
5595 "B<connect>(2), B<send>(2), B<sendto>(2), and B<sendmsg>(2), if a send "
5596 "timeout (B<SO_SNDTIMEO>)  has been set."
5597 msgstr ""
5598
5599 #. type: Plain text
5600 #: build/C/man7/signal.7:739
5601 msgid ""
5602 "Interfaces used to wait for signals: B<pause>(2), B<sigsuspend>(2), "
5603 "B<sigtimedwait>(2), and B<sigwaitinfo>(2)."
5604 msgstr ""
5605
5606 #. type: Plain text
5607 #: build/C/man7/signal.7:748
5608 msgid ""
5609 "File descriptor multiplexing interfaces: B<epoll_wait>(2), "
5610 "B<epoll_pwait>(2), B<poll>(2), B<ppoll>(2), B<select>(2), and B<pselect>(2)."
5611 msgstr ""
5612
5613 #.  On some other systems, SA_RESTART does restart these system calls
5614 #. type: Plain text
5615 #: build/C/man7/signal.7:756
5616 msgid ""
5617 "System V IPC interfaces: B<msgrcv>(2), B<msgsnd>(2), B<semop>(2), and "
5618 "B<semtimedop>(2)."
5619 msgstr ""
5620
5621 #. type: Plain text
5622 #: build/C/man7/signal.7:762
5623 msgid "Sleep interfaces: B<clock_nanosleep>(2), B<nanosleep>(2), and B<usleep>(3)."
5624 msgstr ""
5625
5626 #. type: Plain text
5627 #: build/C/man7/signal.7:767 build/C/man7/signal.7:820
5628 msgid "B<read>(2)  from an B<inotify>(7)  file descriptor."
5629 msgstr ""
5630
5631 #. type: Plain text
5632 #: build/C/man7/signal.7:769
5633 msgid "B<io_getevents>(2)."
5634 msgstr ""
5635
5636 #. type: Plain text
5637 #: build/C/man7/signal.7:775
5638 msgid ""
5639 "The B<sleep>(3)  function is also never restarted if interrupted by a "
5640 "handler, but gives a success return: the number of seconds remaining to "
5641 "sleep."
5642 msgstr ""
5643
5644 #. type: SS
5645 #: build/C/man7/signal.7:775
5646 #, no-wrap
5647 msgid "Interruption of System Calls and Library Functions by Stop Signals"
5648 msgstr ""
5649
5650 #. type: Plain text
5651 #: build/C/man7/signal.7:784
5652 msgid ""
5653 "On Linux, even in the absence of signal handlers, certain blocking "
5654 "interfaces can fail with the error B<EINTR> after the process is stopped by "
5655 "one of the stop signals and then resumed via B<SIGCONT>.  This behavior is "
5656 "not sanctioned by POSIX.1, and doesn't occur on other systems."
5657 msgstr ""
5658
5659 #. type: Plain text
5660 #: build/C/man7/signal.7:786
5661 msgid "The Linux interfaces that display this behavior are:"
5662 msgstr ""
5663
5664 #. type: Plain text
5665 #: build/C/man7/signal.7:809
5666 msgid "B<epoll_wait>(2), B<epoll_pwait>(2)."
5667 msgstr ""
5668
5669 #. type: Plain text
5670 #: build/C/man7/signal.7:812
5671 msgid "B<semop>(2), B<semtimedop>(2)."
5672 msgstr ""
5673
5674 #. type: Plain text
5675 #: build/C/man7/signal.7:815
5676 msgid "B<sigtimedwait>(2), B<sigwaitinfo>(2)."
5677 msgstr ""
5678
5679 #. type: Plain text
5680 #: build/C/man7/signal.7:826
5681 msgid ""
5682 "Linux 2.6.21 and earlier: B<futex>(2)  B<FUTEX_WAIT>, B<sem_timedwait>(3), "
5683 "B<sem_wait>(3)."
5684 msgstr ""
5685
5686 #. type: Plain text
5687 #: build/C/man7/signal.7:830
5688 msgid "Linux 2.6.8 and earlier: B<msgrcv>(2), B<msgsnd>(2)."
5689 msgstr ""
5690
5691 #. type: Plain text
5692 #: build/C/man7/signal.7:833
5693 msgid "Linux 2.4 and earlier: B<nanosleep>(2)."
5694 msgstr ""
5695
5696 #. type: Plain text
5697 #: build/C/man7/signal.7:836
5698 msgid "POSIX.1, except as noted."
5699 msgstr ""
5700
5701 #. type: Plain text
5702 #: build/C/man7/signal.7:845
5703 msgid ""
5704 "B<SIGIO> and B<SIGLOST> have the same value.  The latter is commented out in "
5705 "the kernel source, but the build process of some software still thinks that "
5706 "signal 29 is B<SIGLOST>."
5707 msgstr ""
5708
5709 #. type: Plain text
5710 #: build/C/man7/signal.7:878
5711 msgid ""
5712 "B<kill>(1), B<getrlimit>(2), B<kill>(2), B<killpg>(2), "
5713 "B<rt_sigqueueinfo>(2), B<setitimer>(2), B<setrlimit>(2), B<sgetmask>(2), "
5714 "B<sigaction>(2), B<sigaltstack>(2), B<signal>(2), B<signalfd>(2), "
5715 "B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2), B<sigwaitinfo>(2), "
5716 "B<abort>(3), B<bsd_signal>(3), B<longjmp>(3), B<raise>(3), "
5717 "B<pthread_sigqueue>(3), B<sigqueue>(3), B<sigset>(3), B<sigsetops>(3), "
5718 "B<sigvec>(3), B<sigwait>(3), B<strsignal>(3), B<sysv_signal>(3), B<core>(5), "
5719 "B<proc>(5), B<pthreads>(7), B<sigevent>(7)"
5720 msgstr ""
5721
5722 #. type: TH
5723 #: build/C/man2/signalfd.2:19
5724 #, no-wrap
5725 msgid "SIGNALFD"
5726 msgstr ""
5727
5728 #. type: TH
5729 #: build/C/man2/signalfd.2:19
5730 #, no-wrap
5731 msgid "2009-01-13"
5732 msgstr ""
5733
5734 #. type: Plain text
5735 #: build/C/man2/signalfd.2:22
5736 msgid "signalfd - create a file descriptor for accepting signals"
5737 msgstr ""
5738
5739 #. type: Plain text
5740 #: build/C/man2/signalfd.2:24
5741 msgid "B<#include E<lt>sys/signalfd.hE<gt>>"
5742 msgstr ""
5743
5744 #. type: Plain text
5745 #: build/C/man2/signalfd.2:26
5746 msgid "B<int signalfd(int >I<fd>B<, const sigset_t *>I<mask>B<, int >I<flags>B<);>"
5747 msgstr ""
5748
5749 #. type: Plain text
5750 #: build/C/man2/signalfd.2:37
5751 msgid ""
5752 "B<signalfd>()  creates a file descriptor that can be used to accept signals "
5753 "targeted at the caller.  This provides an alternative to the use of a signal "
5754 "handler or B<sigwaitinfo>(2), and has the advantage that the file descriptor "
5755 "may be monitored by B<select>(2), B<poll>(2), and B<epoll>(7)."
5756 msgstr ""
5757
5758 #. type: Plain text
5759 #: build/C/man2/signalfd.2:57
5760 msgid ""
5761 "The I<mask> argument specifies the set of signals that the caller wishes to "
5762 "accept via the file descriptor.  This argument is a signal set whose "
5763 "contents can be initialized using the macros described in B<sigsetops>(3).  "
5764 "Normally, the set of signals to be received via the file descriptor should "
5765 "be blocked using B<sigprocmask>(2), to prevent the signals being handled "
5766 "according to their default dispositions.  It is not possible to receive "
5767 "B<SIGKILL> or B<SIGSTOP> signals via a signalfd file descriptor; these "
5768 "signals are silently ignored if specified in I<mask>."
5769 msgstr ""
5770
5771 #. type: Plain text
5772 #: build/C/man2/signalfd.2:71
5773 msgid ""
5774 "If the I<fd> argument is -1, then the call creates a new file descriptor and "
5775 "associates the signal set specified in I<mask> with that descriptor.  If "
5776 "I<fd> is not -1, then it must specify a valid existing signalfd file "
5777 "descriptor, and I<mask> is used to replace the signal set associated with "
5778 "that descriptor."
5779 msgstr ""
5780
5781 #. type: Plain text
5782 #: build/C/man2/signalfd.2:76
5783 msgid ""
5784 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
5785 "I<flags> to change the behaviour of B<signalfd>():"
5786 msgstr ""
5787
5788 #. type: TP
5789 #: build/C/man2/signalfd.2:76
5790 #, no-wrap
5791 msgid "B<SFD_NONBLOCK>"
5792 msgstr ""
5793
5794 #. type: TP
5795 #: build/C/man2/signalfd.2:84
5796 #, no-wrap
5797 msgid "B<SFD_CLOEXEC>"
5798 msgstr ""
5799
5800 #. type: Plain text
5801 #: build/C/man2/signalfd.2:101
5802 msgid ""
5803 "B<signalfd>()  returns a file descriptor that supports the following "
5804 "operations:"
5805 msgstr ""
5806
5807 #. type: Plain text
5808 #: build/C/man2/signalfd.2:120
5809 msgid ""
5810 "If one or more of the signals specified in I<mask> is pending for the "
5811 "process, then the buffer supplied to B<read>(2)  is used to return one or "
5812 "more I<signalfd_siginfo> structures (see below) that describe the signals.  "
5813 "The B<read>(2)  returns information for as many signals as are pending and "
5814 "will fit in the supplied buffer.  The buffer must be at least "
5815 "I<sizeof(struct signalfd_siginfo)> bytes.  The return value of the "
5816 "B<read>(2)  is the total number of bytes read."
5817 msgstr ""
5818
5819 #. type: Plain text
5820 #: build/C/man2/signalfd.2:128
5821 msgid ""
5822 "As a consequence of the B<read>(2), the signals are consumed, so that they "
5823 "are no longer pending for the process (i.e., will not be caught by signal "
5824 "handlers, and cannot be accepted using B<sigwaitinfo>(2))."
5825 msgstr ""
5826
5827 #. type: Plain text
5828 #: build/C/man2/signalfd.2:139
5829 msgid ""
5830 "If none of the signals in I<mask> is pending for the process, then the "
5831 "B<read>(2)  either blocks until one of the signals in I<mask> is generated "
5832 "for the process, or fails with the error B<EAGAIN> if the file descriptor "
5833 "has been made nonblocking."
5834 msgstr ""
5835
5836 #. type: Plain text
5837 #: build/C/man2/signalfd.2:152
5838 msgid ""
5839 "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the "
5840 "B<poll>(2)  B<POLLIN> flag)  if one or more of the signals in I<mask> is "
5841 "pending for the process."
5842 msgstr ""
5843
5844 #. type: Plain text
5845 #: build/C/man2/signalfd.2:159
5846 msgid ""
5847 "The signalfd file descriptor also supports the other file-descriptor "
5848 "multiplexing APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
5849 msgstr ""
5850
5851 #. type: Plain text
5852 #: build/C/man2/signalfd.2:164
5853 msgid ""
5854 "When the file descriptor is no longer required it should be closed.  When "
5855 "all file descriptors associated with the same signalfd object have been "
5856 "closed, the resources for object are freed by the kernel."
5857 msgstr ""
5858
5859 #. type: SS
5860 #: build/C/man2/signalfd.2:164
5861 #, no-wrap
5862 msgid "The signalfd_siginfo structure"
5863 msgstr ""
5864
5865 #. type: Plain text
5866 #: build/C/man2/signalfd.2:170
5867 msgid ""
5868 "The format of the I<signalfd_siginfo> structure(s) returned by B<read>(2)s "
5869 "from a signalfd file descriptor is as follows:"
5870 msgstr ""
5871
5872 #.  ssi_trapno is unused on most arches
5873 #. type: Plain text
5874 #: build/C/man2/signalfd.2:195
5875 #, no-wrap
5876 msgid ""
5877 "struct signalfd_siginfo {\n"
5878 "    uint32_t ssi_signo;   /* Signal number */\n"
5879 "    int32_t  ssi_errno;   /* Error number (unused) */\n"
5880 "    int32_t  ssi_code;    /* Signal code */\n"
5881 "    uint32_t ssi_pid;     /* PID of sender */\n"
5882 "    uint32_t ssi_uid;     /* Real UID of sender */\n"
5883 "    int32_t  ssi_fd;      /* File descriptor (SIGIO) */\n"
5884 "    uint32_t ssi_tid;     /* Kernel timer ID (POSIX timers)\n"
5885 "    uint32_t ssi_band;    /* Band event (SIGIO) */\n"
5886 "    uint32_t ssi_overrun; /* POSIX timer overrun count */\n"
5887 "    uint32_t ssi_trapno;  /* Trap number that caused signal */\n"
5888 "    int32_t  ssi_status;  /* Exit status or signal (SIGCHLD) */\n"
5889 "    int32_t  ssi_int;     /* Integer sent by sigqueue(3) */\n"
5890 "    uint64_t ssi_ptr;     /* Pointer sent by sigqueue(3) */\n"
5891 "    uint64_t ssi_utime;   /* User CPU time consumed (SIGCHLD) */\n"
5892 "    uint64_t ssi_stime;   /* System CPU time consumed (SIGCHLD) */\n"
5893 "    uint64_t ssi_addr;    /* Address that generated signal\n"
5894 "                             (for hardware-generated signals) */\n"
5895 "    uint8_t  pad[I<X>];      /* Pad size to 128 bytes (allow for\n"
5896 "                              additional fields in the future) */\n"
5897 "};\n"
5898 msgstr ""
5899
5900 #. type: Plain text
5901 #: build/C/man2/signalfd.2:218
5902 msgid ""
5903 "Each of the fields in this structure is analogous to the similarly named "
5904 "field in the I<siginfo_t> structure.  The I<siginfo_t> structure is "
5905 "described in B<sigaction>(2).  Not all fields in the returned "
5906 "I<signalfd_siginfo> structure will be valid for a specific signal; the set "
5907 "of valid fields can be determined from the value returned in the I<ssi_code> "
5908 "field.  This field is the analog of the I<siginfo_t> I<si_code> field; see "
5909 "B<sigaction>(2)  for details."
5910 msgstr ""
5911
5912 #. type: SS
5913 #: build/C/man2/signalfd.2:218 build/C/man2/timerfd_create.2:268
5914 #, no-wrap
5915 msgid "fork(2) semantics"
5916 msgstr ""
5917
5918 #. type: Plain text
5919 #: build/C/man2/signalfd.2:226
5920 msgid ""
5921 "After a B<fork>(2), the child inherits a copy of the signalfd file "
5922 "descriptor.  A B<read>(2)  from the file descriptor in the child will return "
5923 "information about signals queued to the child."
5924 msgstr ""
5925
5926 #. type: SS
5927 #: build/C/man2/signalfd.2:226 build/C/man2/timerfd_create.2:280
5928 #, no-wrap
5929 msgid "execve(2) semantics"
5930 msgstr ""
5931
5932 #. type: Plain text
5933 #: build/C/man2/signalfd.2:238
5934 msgid ""
5935 "Just like any other file descriptor, a signalfd file descriptor remains open "
5936 "across an B<execve>(2), unless it has been marked for close-on-exec (see "
5937 "B<fcntl>(2)).  Any signals that were available for reading before the "
5938 "B<execve>(2)  remain available to the newly loaded program.  (This is "
5939 "analogous to traditional signal semantics, where a blocked signal that is "
5940 "pending remains pending across an B<execve>(2).)"
5941 msgstr ""
5942
5943 #. type: SS
5944 #: build/C/man2/signalfd.2:238
5945 #, no-wrap
5946 msgid "Thread semantics"
5947 msgstr ""
5948
5949 #. type: Plain text
5950 #: build/C/man2/signalfd.2:248
5951 msgid ""
5952 "The semantics of signalfd file descriptors in a multithreaded program mirror "
5953 "the standard semantics for signals.  In other words, when a thread reads "
5954 "from a signalfd file descriptor, it will read the signals that are directed "
5955 "to the thread itself and the signals that are directed to the process (i.e., "
5956 "the entire thread group).  (A thread will not be able to read signals that "
5957 "are directed to other threads in the process.)"
5958 msgstr ""
5959
5960 #. type: Plain text
5961 #: build/C/man2/signalfd.2:262
5962 msgid ""
5963 "On success, B<signalfd>()  returns a signalfd file descriptor; this is "
5964 "either a new file descriptor (if I<fd> was -1), or I<fd> if I<fd> was a "
5965 "valid signalfd file descriptor.  On error, -1 is returned and I<errno> is "
5966 "set to indicate the error."
5967 msgstr ""
5968
5969 #. type: TP
5970 #: build/C/man2/signalfd.2:263 build/C/man2/timerfd_create.2:337
5971 #, no-wrap
5972 msgid "B<EBADF>"
5973 msgstr ""
5974
5975 #. type: Plain text
5976 #: build/C/man2/signalfd.2:268
5977 msgid "The I<fd> file descriptor is not a valid file descriptor."
5978 msgstr ""
5979
5980 #.  or, the
5981 #.  .I sizemask
5982 #.  argument is not equal to
5983 #.  .IR sizeof(sigset_t) ;
5984 #. type: Plain text
5985 #: build/C/man2/signalfd.2:276
5986 msgid "I<fd> is not a valid signalfd file descriptor."
5987 msgstr ""
5988
5989 #. type: Plain text
5990 #: build/C/man2/signalfd.2:283 build/C/man2/timerfd_create.2:319
5991 msgid "I<flags> is invalid; or, in Linux 2.6.26 or earlier, I<flags> is nonzero."
5992 msgstr ""
5993
5994 #. type: Plain text
5995 #: build/C/man2/signalfd.2:286 build/C/man2/timerfd_create.2:322
5996 msgid "The per-process limit of open file descriptors has been reached."
5997 msgstr ""
5998
5999 #. type: Plain text
6000 #: build/C/man2/signalfd.2:296
6001 msgid "There was insufficient memory to create a new signalfd file descriptor."
6002 msgstr ""
6003
6004 #.  signalfd() is in glibc 2.7, but reportedly does not build
6005 #. type: Plain text
6006 #: build/C/man2/signalfd.2:304
6007 msgid ""
6008 "B<signalfd>()  is available on Linux since kernel 2.6.22.  Working support "
6009 "is provided in glibc since version 2.8.  The B<signalfd4>()  system call "
6010 "(see NOTES) is available on Linux since kernel 2.6.27."
6011 msgstr ""
6012
6013 #. type: Plain text
6014 #: build/C/man2/signalfd.2:309
6015 msgid "B<signalfd>()  and B<signalfd4>()  are Linux-specific."
6016 msgstr ""
6017
6018 #. type: Plain text
6019 #: build/C/man2/signalfd.2:319
6020 msgid ""
6021 "The underlying Linux system call requires an additional argument, I<size_t "
6022 "sizemask>, which specifies the size of the I<mask> argument.  The glibc "
6023 "B<signalfd>()  wrapper function does not include this argument, since it "
6024 "provides the required value for the underlying system call."
6025 msgstr ""
6026
6027 #. type: Plain text
6028 #: build/C/man2/signalfd.2:333
6029 msgid ""
6030 "A process can create multiple signalfd file descriptors.  This makes it "
6031 "possible to accept different signals on different file descriptors.  (This "
6032 "may be useful if monitoring the file descriptors using B<select>(2), "
6033 "B<poll>(2), or B<epoll>(7): the arrival of different signals will make "
6034 "different descriptors ready.)  If a signal appears in the I<mask> of more "
6035 "than one of the file descriptors, then occurrences of that signal can be "
6036 "read (once) from any one of the descriptors."
6037 msgstr ""
6038
6039 #. type: Plain text
6040 #: build/C/man2/signalfd.2:349
6041 msgid ""
6042 "There are two underlying Linux system calls: B<signalfd>()  and the more "
6043 "recent B<signalfd4>().  The former system call does not implement a I<flags> "
6044 "argument.  The latter system call implements the I<flags> values described "
6045 "above.  Starting with glibc 2.9, the B<signalfd>()  wrapper function will "
6046 "use B<signalfd4>()  where it is available."
6047 msgstr ""
6048
6049 #.  The fix also was put into 2.6.24.5
6050 #. type: Plain text
6051 #: build/C/man2/signalfd.2:357
6052 msgid ""
6053 "In kernels before 2.6.25, the I<ssi_ptr> and I<ssi_int> fields are not "
6054 "filled in with the data accompanying a signal sent by B<sigqueue>(3)."
6055 msgstr ""
6056
6057 #. type: Plain text
6058 #: build/C/man2/signalfd.2:367
6059 msgid ""
6060 "The program below accepts the signals B<SIGINT> and B<SIGQUIT> via a "
6061 "signalfd file descriptor.  The program terminates after accepting a "
6062 "B<SIGQUIT> signal.  The following shell session demonstrates the use of the "
6063 "program:"
6064 msgstr ""
6065
6066 #. type: Plain text
6067 #: build/C/man2/signalfd.2:378
6068 #, no-wrap
6069 msgid ""
6070 "$B< ./signalfd_demo>\n"
6071 "B<^C>                   # Control-C generates SIGINT\n"
6072 "Got SIGINT\n"
6073 "B<^C>\n"
6074 "Got SIGINT\n"
6075 "B<^\\e>                    # Control-\\e generates SIGQUIT\n"
6076 "Got SIGQUIT\n"
6077 "$\n"
6078 msgstr ""
6079
6080 #. type: Plain text
6081 #: build/C/man2/signalfd.2:388
6082 #, no-wrap
6083 msgid ""
6084 "#include E<lt>sys/signalfd.hE<gt>\n"
6085 "#include E<lt>signal.hE<gt>\n"
6086 "#include E<lt>unistd.hE<gt>\n"
6087 "#include E<lt>stdlib.hE<gt>\n"
6088 "#include E<lt>stdio.hE<gt>\n"
6089 msgstr ""
6090
6091 #. type: Plain text
6092 #: build/C/man2/signalfd.2:399
6093 #, no-wrap
6094 msgid ""
6095 "int\n"
6096 "main(int argc, char *argv[])\n"
6097 "{\n"
6098 "    sigset_t mask;\n"
6099 "    int sfd;\n"
6100 "    struct signalfd_siginfo fdsi;\n"
6101 "    ssize_t s;\n"
6102 msgstr ""
6103
6104 #. type: Plain text
6105 #: build/C/man2/signalfd.2:403
6106 #, no-wrap
6107 msgid ""
6108 "    sigemptyset(&mask);\n"
6109 "    sigaddset(&mask, SIGINT);\n"
6110 "    sigaddset(&mask, SIGQUIT);\n"
6111 msgstr ""
6112
6113 #. type: Plain text
6114 #: build/C/man2/signalfd.2:406
6115 #, no-wrap
6116 msgid ""
6117 "    /* Block signals so that they aren\\(aqt handled\n"
6118 "       according to their default dispositions */\n"
6119 msgstr ""
6120
6121 #. type: Plain text
6122 #: build/C/man2/signalfd.2:409
6123 #, no-wrap
6124 msgid ""
6125 "    if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n"
6126 "        handle_error(\"sigprocmask\");\n"
6127 msgstr ""
6128
6129 #. type: Plain text
6130 #: build/C/man2/signalfd.2:413
6131 #, no-wrap
6132 msgid ""
6133 "    sfd = signalfd(-1, &mask, 0);\n"
6134 "    if (sfd == -1)\n"
6135 "        handle_error(\"signalfd\");\n"
6136 msgstr ""
6137
6138 #. type: Plain text
6139 #: build/C/man2/signalfd.2:418
6140 #, no-wrap
6141 msgid ""
6142 "    for (;;) {\n"
6143 "        s = read(sfd, &fdsi, sizeof(struct signalfd_siginfo));\n"
6144 "        if (s != sizeof(struct signalfd_siginfo))\n"
6145 "            handle_error(\"read\");\n"
6146 msgstr ""
6147
6148 #. type: Plain text
6149 #: build/C/man2/signalfd.2:429
6150 #, no-wrap
6151 msgid ""
6152 "        if (fdsi.ssi_signo == SIGINT) {\n"
6153 "            printf(\"Got SIGINT\\en\");\n"
6154 "        } else if (fdsi.ssi_signo == SIGQUIT) {\n"
6155 "            printf(\"Got SIGQUIT\\en\");\n"
6156 "            exit(EXIT_SUCCESS);\n"
6157 "        } else {\n"
6158 "            printf(\"Read unexpected signal\\en\");\n"
6159 "        }\n"
6160 "    }\n"
6161 "}\n"
6162 msgstr ""
6163
6164 #. type: Plain text
6165 #: build/C/man2/signalfd.2:443
6166 msgid ""
6167 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<sigaction>(2), "
6168 "B<sigprocmask>(2), B<sigwaitinfo>(2), B<timerfd_create>(2), B<sigsetops>(3), "
6169 "B<sigwait>(3), B<epoll>(7), B<signal>(7)"
6170 msgstr ""
6171
6172 #. type: TH
6173 #: build/C/man3/sigpause.3:23
6174 #, no-wrap
6175 msgid "SIGPAUSE"
6176 msgstr ""
6177
6178 #. type: TH
6179 #: build/C/man3/sigpause.3:23
6180 #, no-wrap
6181 msgid "2010-09-12"
6182 msgstr ""
6183
6184 #. type: Plain text
6185 #: build/C/man3/sigpause.3:26
6186 msgid "sigpause - atomically release blocked signals and wait for interrupt"
6187 msgstr ""
6188
6189 #. type: Plain text
6190 #: build/C/man3/sigpause.3:31
6191 #, no-wrap
6192 msgid "B<int sigpause(int >I<sigmask>B<);  /* BSD */>\n"
6193 msgstr ""
6194
6195 #. type: Plain text
6196 #: build/C/man3/sigpause.3:33
6197 #, no-wrap
6198 msgid "B<int sigpause(int >I<sig>B<);      /* System V / UNIX 95 */>\n"
6199 msgstr ""
6200
6201 #. type: Plain text
6202 #: build/C/man3/sigpause.3:39
6203 msgid "Don't use this function.  Use B<sigsuspend>(2)  instead."
6204 msgstr ""
6205
6206 #. type: Plain text
6207 #: build/C/man3/sigpause.3:46
6208 msgid ""
6209 "The function B<sigpause>()  is designed to wait for some signal.  It changes "
6210 "the process's signal mask (set of blocked signals), and then waits for a "
6211 "signal to arrive.  Upon arrival of a signal, the original signal mask is "
6212 "restored."
6213 msgstr ""
6214
6215 #. type: Plain text
6216 #: build/C/man3/sigpause.3:54
6217 msgid ""
6218 "If B<sigpause>()  returns, it was interrupted by a signal and the return "
6219 "value is -1 with I<errno> set to B<EINTR>."
6220 msgstr ""
6221
6222 #. type: Plain text
6223 #: build/C/man3/sigpause.3:58
6224 msgid "The System V version of B<sigpause>()  is standardized in POSIX.1-2001."
6225 msgstr ""
6226
6227 #.  __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG
6228 #. type: Plain text
6229 #: build/C/man3/sigpause.3:75
6230 msgid ""
6231 "The classical BSD version of this function appeared in 4.2BSD.  It sets the "
6232 "process's signal mask to I<sigmask>.  UNIX 95 standardized the incompatible "
6233 "System V version of this function, which removes only the specified signal "
6234 "I<sig> from the process's signal mask.  The unfortunate situation with two "
6235 "incompatible functions with the same name was solved by the "
6236 "B<\\%sigsuspend>(2)  function, that takes a I<sigset_t *> argument (instead "
6237 "of an I<int>)."
6238 msgstr ""
6239
6240 #. type: Plain text
6241 #: build/C/man3/sigpause.3:78
6242 msgid ""
6243 "On Linux, this routine is a system call only on the Sparc (sparc64)  "
6244 "architecture."
6245 msgstr ""
6246
6247 #. type: Plain text
6248 #: build/C/man3/sigpause.3:80
6249 msgid "Libc4 and libc5 only know about the BSD version."
6250 msgstr ""
6251
6252 #
6253 #.  For the BSD version, one usually uses a zero
6254 #.  .I sigmask
6255 #.  to indicate that no signals are to be blocked.
6256 #. type: Plain text
6257 #: build/C/man3/sigpause.3:96
6258 msgid ""
6259 "Glibc uses the BSD version if the B<_BSD_SOURCE> feature test macro is "
6260 "defined and none of B<_POSIX_SOURCE>, B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, "
6261 "B<_GNU_SOURCE>, or B<_SVID_SOURCE> is defined.  Otherwise, the System V "
6262 "version is used."
6263 msgstr ""
6264
6265 #. type: Plain text
6266 #: build/C/man3/sigpause.3:104
6267 msgid ""
6268 "B<kill>(2), B<sigaction>(2), B<sigprocmask>(2), B<sigsuspend>(2), "
6269 "B<sigblock>(3), B<sigvec>(3), B<feature_test_macros>(7)"
6270 msgstr ""
6271
6272 #. type: TH
6273 #: build/C/man2/sigpending.2:27
6274 #, no-wrap
6275 msgid "SIGPENDING"
6276 msgstr ""
6277
6278 #. type: TH
6279 #: build/C/man2/sigpending.2:27
6280 #, no-wrap
6281 msgid "2008-10-04"
6282 msgstr ""
6283
6284 #. type: Plain text
6285 #: build/C/man2/sigpending.2:30
6286 msgid "sigpending - examine pending signals"
6287 msgstr ""
6288
6289 #. type: Plain text
6290 #: build/C/man2/sigpending.2:34
6291 msgid "B<int sigpending(sigset_t *>I<set>B<);>"
6292 msgstr ""
6293
6294 #. type: Plain text
6295 #: build/C/man2/sigpending.2:43
6296 msgid ""
6297 "B<sigpending>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
6298 "_POSIX_SOURCE"
6299 msgstr ""
6300
6301 #. type: Plain text
6302 #: build/C/man2/sigpending.2:51
6303 msgid ""
6304 "B<sigpending>()  returns the set of signals that are pending for delivery to "
6305 "the calling thread (i.e., the signals which have been raised while "
6306 "blocked).  The mask of pending signals is returned in I<set>."
6307 msgstr ""
6308
6309 #. type: Plain text
6310 #: build/C/man2/sigpending.2:54
6311 msgid "B<sigpending>()  returns 0 on success and -1 on error."
6312 msgstr ""
6313
6314 #. type: Plain text
6315 #: build/C/man2/sigpending.2:59
6316 msgid ""
6317 "I<set> points to memory which is not a valid part of the process address "
6318 "space."
6319 msgstr ""
6320
6321 #. type: Plain text
6322 #: build/C/man2/sigpending.2:70
6323 msgid ""
6324 "The set of signals that is pending for a thread is the union of the set of "
6325 "signals that is pending for that thread and the set of signals that is "
6326 "pending for the process as a whole; see B<signal>(7)."
6327 msgstr ""
6328
6329 #. type: Plain text
6330 #: build/C/man2/sigpending.2:82
6331 msgid ""
6332 "In versions of glibc up to and including 2.2.1, there is a bug in the "
6333 "wrapper function for B<sigpending>()  which means that information about "
6334 "pending real-time signals is not correctly returned."
6335 msgstr ""
6336
6337 #. type: Plain text
6338 #: build/C/man2/sigpending.2:90
6339 msgid ""
6340 "B<kill>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
6341 "B<sigsuspend>(2), B<sigsetops>(3), B<signal>(7)"
6342 msgstr ""
6343
6344 #. type: TH
6345 #: build/C/man2/sigprocmask.2:27
6346 #, no-wrap
6347 msgid "SIGPROCMASK"
6348 msgstr ""
6349
6350 #. type: Plain text
6351 #: build/C/man2/sigprocmask.2:30
6352 msgid "sigprocmask - examine and change blocked signals"
6353 msgstr ""
6354
6355 #. type: Plain text
6356 #: build/C/man2/sigprocmask.2:35
6357 msgid ""
6358 "B<int sigprocmask(int >I<how>B<, const sigset_t *>I<set>B<,> B<sigset_t "
6359 "*>I<oldset>B<);>"
6360 msgstr ""
6361
6362 #. type: Plain text
6363 #: build/C/man2/sigprocmask.2:44
6364 msgid ""
6365 "B<sigprocmask>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
6366 "_POSIX_SOURCE"
6367 msgstr ""
6368
6369 #. type: Plain text
6370 #: build/C/man2/sigprocmask.2:53
6371 msgid ""
6372 "B<sigprocmask>()  is used to fetch and/or change the signal mask of the "
6373 "calling thread.  The signal mask is the set of signals whose delivery is "
6374 "currently blocked for the caller (see also B<signal>(7)  for more details)."
6375 msgstr ""
6376
6377 #. type: Plain text
6378 #: build/C/man2/sigprocmask.2:57
6379 msgid "The behavior of the call is dependent on the value of I<how>, as follows."
6380 msgstr ""
6381
6382 #. type: TP
6383 #: build/C/man2/sigprocmask.2:57
6384 #, no-wrap
6385 msgid "B<SIG_BLOCK>"
6386 msgstr ""
6387
6388 #. type: Plain text
6389 #: build/C/man2/sigprocmask.2:62
6390 msgid ""
6391 "The set of blocked signals is the union of the current set and the I<set> "
6392 "argument."
6393 msgstr ""
6394
6395 #. type: TP
6396 #: build/C/man2/sigprocmask.2:62
6397 #, no-wrap
6398 msgid "B<SIG_UNBLOCK>"
6399 msgstr ""
6400
6401 #. type: Plain text
6402 #: build/C/man2/sigprocmask.2:68
6403 msgid ""
6404 "The signals in I<set> are removed from the current set of blocked signals.  "
6405 "It is permissible to attempt to unblock a signal which is not blocked."
6406 msgstr ""
6407
6408 #. type: TP
6409 #: build/C/man2/sigprocmask.2:68
6410 #, no-wrap
6411 msgid "B<SIG_SETMASK>"
6412 msgstr ""
6413
6414 #. type: Plain text
6415 #: build/C/man2/sigprocmask.2:72
6416 msgid "The set of blocked signals is set to the argument I<set>."
6417 msgstr ""
6418
6419 #. type: Plain text
6420 #: build/C/man2/sigprocmask.2:77
6421 msgid ""
6422 "If I<oldset> is non-NULL, the previous value of the signal mask is stored in "
6423 "I<oldset>."
6424 msgstr ""
6425
6426 #. type: Plain text
6427 #: build/C/man2/sigprocmask.2:86
6428 msgid ""
6429 "If I<set> is NULL, then the signal mask is unchanged (i.e., I<how> is "
6430 "ignored), but the current value of the signal mask is nevertheless returned "
6431 "in I<oldset> (if it is not NULL)."
6432 msgstr ""
6433
6434 #. type: Plain text
6435 #: build/C/man2/sigprocmask.2:91
6436 msgid ""
6437 "The use of B<sigprocmask>()  is unspecified in a multithreaded process; see "
6438 "B<pthread_sigmask>(3)."
6439 msgstr ""
6440
6441 #. type: Plain text
6442 #: build/C/man2/sigprocmask.2:94
6443 msgid "B<sigprocmask>()  returns 0 on success and -1 on error."
6444 msgstr ""
6445
6446 #. type: Plain text
6447 #: build/C/man2/sigprocmask.2:99
6448 msgid "B<EINVAL> The value specified in I<how> was invalid."
6449 msgstr ""
6450
6451 #. type: Plain text
6452 #: build/C/man2/sigprocmask.2:105
6453 msgid ""
6454 "It is not possible to block B<SIGKILL> or B<SIGSTOP>.  Attempts to do so are "
6455 "silently ignored."
6456 msgstr ""
6457
6458 #. type: Plain text
6459 #: build/C/man2/sigprocmask.2:107
6460 msgid "Each of the threads in a process has its own signal mask."
6461 msgstr ""
6462
6463 #. type: Plain text
6464 #: build/C/man2/sigprocmask.2:127
6465 msgid ""
6466 "If B<SIGBUS>, B<SIGFPE>, B<SIGILL>, or B<SIGSEGV> are generated while they "
6467 "are blocked, the result is undefined, unless the signal was generated by "
6468 "B<kill>(2), B<sigqueue>(3), or B<raise>(3)."
6469 msgstr ""
6470
6471 #. type: Plain text
6472 #: build/C/man2/sigprocmask.2:142
6473 msgid ""
6474 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigpending>(2), "
6475 "B<sigsuspend>(2), B<pthread_sigmask>(3), B<sigqueue>(3), B<sigsetops>(3), "
6476 "B<signal>(7)"
6477 msgstr ""
6478
6479 #. type: TH
6480 #: build/C/man3/sigqueue.3:26
6481 #, no-wrap
6482 msgid "SIGQUEUE"
6483 msgstr ""
6484
6485 #. type: Plain text
6486 #: build/C/man3/sigqueue.3:29
6487 msgid "sigqueue, rt_sigqueueinfo - queue a signal and data to a process"
6488 msgstr ""
6489
6490 #. type: Plain text
6491 #: build/C/man3/sigqueue.3:33
6492 msgid ""
6493 "B<int sigqueue(pid_t >I<pid>B<, int >I<sig>B<, const union sigval "
6494 ">I<value>B<);>"
6495 msgstr ""
6496
6497 #. type: Plain text
6498 #: build/C/man3/sigqueue.3:41
6499 msgid "B<sigqueue>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
6500 msgstr ""
6501
6502 #. type: Plain text
6503 #: build/C/man3/sigqueue.3:53
6504 msgid ""
6505 "B<sigqueue>()  sends the signal specified in I<sig> to the process whose PID "
6506 "is given in I<pid>.  The permissions required to send a signal are the same "
6507 "as for B<kill>(2).  As with B<kill>(2), the null signal (0) can be used to "
6508 "check if a process with a given PID exists."
6509 msgstr ""
6510
6511 #. type: Plain text
6512 #: build/C/man3/sigqueue.3:58
6513 msgid ""
6514 "The I<value> argument is used to specify an accompanying item of data "
6515 "(either an integer or a pointer value) to be sent with the signal, and has "
6516 "the following type:"
6517 msgstr ""
6518
6519 #. type: Plain text
6520 #: build/C/man3/sigqueue.3:65
6521 #, no-wrap
6522 msgid ""
6523 "union sigval {\n"
6524 "    int   sival_int;\n"
6525 "    void *sival_ptr;\n"
6526 "};\n"
6527 msgstr ""
6528
6529 #. type: Plain text
6530 #: build/C/man3/sigqueue.3:81
6531 msgid ""
6532 "If the receiving process has installed a handler for this signal using the "
6533 "B<SA_SIGINFO> flag to B<sigaction>(2), then it can obtain this data via the "
6534 "I<si_value> field of the I<siginfo_t> structure passed as the second "
6535 "argument to the handler.  Furthermore, the I<si_code> field of that "
6536 "structure will be set to B<SI_QUEUE>."
6537 msgstr ""
6538
6539 #. type: Plain text
6540 #: build/C/man3/sigqueue.3:89
6541 msgid ""
6542 "On success, B<sigqueue>()  returns 0, indicating that the signal was "
6543 "successfully queued to the receiving process.  Otherwise -1 is returned and "
6544 "I<errno> is set to indicate the error."
6545 msgstr ""
6546
6547 #. type: Plain text
6548 #: build/C/man3/sigqueue.3:100
6549 msgid "I<sig> was invalid."
6550 msgstr ""
6551
6552 #. type: Plain text
6553 #: build/C/man3/sigqueue.3:106
6554 msgid ""
6555 "The process does not have permission to send the signal to the receiving "
6556 "process.  For the required permissions, see B<kill>(2)."
6557 msgstr ""
6558
6559 #. type: Plain text
6560 #: build/C/man3/sigqueue.3:110
6561 msgid "No process has a PID matching I<pid>."
6562 msgstr ""
6563
6564 #. type: Plain text
6565 #: build/C/man3/sigqueue.3:112
6566 msgid "This system call first appeared in Linux 2.2."
6567 msgstr ""
6568
6569 #. type: Plain text
6570 #: build/C/man3/sigqueue.3:122
6571 msgid ""
6572 "If this function results in the sending of a signal to the process that "
6573 "invoked it, and that signal was not blocked by the calling thread, and no "
6574 "other threads were willing to handle this signal (either by having it "
6575 "unblocked, or by waiting for it using B<sigwait>(3)), then at least some "
6576 "signal must be delivered to this thread before this function returns."
6577 msgstr ""
6578
6579 #. type: Plain text
6580 #: build/C/man3/sigqueue.3:137
6581 msgid ""
6582 "On Linux, this function is implemented using the B<rt_sigqueueinfo>(2)  "
6583 "system call.  The system call differs in its third argument, which is the "
6584 "I<siginfo_t> structure that will be supplied to the receiving process's "
6585 "signal handler or returned by the receiving process's B<sigtimedwait>(2)  "
6586 "call.  Inside the glibc B<sigqueue>()  wrapper, this argument, I<uinfo>, is "
6587 "initialized as follows:"
6588 msgstr ""
6589
6590 #. type: Plain text
6591 #: build/C/man3/sigqueue.3:145
6592 #, no-wrap
6593 msgid ""
6594 "uinfo.si_signo = sig;      /* argument supplied to sigqueue() */\n"
6595 "uinfo.si_code = SI_QUEUE;\n"
6596 "uinfo.si_pid = getpid();   /* Process ID of sender */\n"
6597 "uinfo.si_uid = getuid();   /* Real UID of sender */\n"
6598 "uinfo.si_value = val;      /* argument supplied to sigqueue() */\n"
6599 msgstr ""
6600
6601 #. type: Plain text
6602 #: build/C/man3/sigqueue.3:155
6603 msgid ""
6604 "B<kill>(2), B<rt_sigqueueinfo>(2), B<sigaction>(2), B<signal>(2), "
6605 "B<pthread_sigqueue>(3), B<sigwait>(3), B<signal>(7)"
6606 msgstr ""
6607
6608 #. type: TH
6609 #: build/C/man2/sigreturn.2:27
6610 #, no-wrap
6611 msgid "SIGRETURN"
6612 msgstr ""
6613
6614 #. type: TH
6615 #: build/C/man2/sigreturn.2:27
6616 #, no-wrap
6617 msgid "2008-06-26"
6618 msgstr ""
6619
6620 #. type: Plain text
6621 #: build/C/man2/sigreturn.2:30
6622 msgid "sigreturn - return from signal handler and cleanup stack frame"
6623 msgstr ""
6624
6625 #. type: Plain text
6626 #: build/C/man2/sigreturn.2:32
6627 msgid "B<int sigreturn(unsigned long >I<__unused>B<);>"
6628 msgstr ""
6629
6630 #. type: Plain text
6631 #: build/C/man2/sigreturn.2:40
6632 msgid ""
6633 "When the Linux kernel creates the stack frame for a signal handler, a call "
6634 "to B<sigreturn>()  is inserted into the stack frame so that upon return from "
6635 "the signal handler, B<sigreturn>()  will be called."
6636 msgstr ""
6637
6638 #. type: Plain text
6639 #: build/C/man2/sigreturn.2:51
6640 msgid ""
6641 "This B<sigreturn>()  call undoes everything that was done\\(emchanging the "
6642 "process's signal mask, switching stacks (see B<sigaltstack>(2))\\(emin order "
6643 "to invoke the signal handler: it restores the process's signal mask, "
6644 "switches stacks, and restores the process's context (registers, processor "
6645 "flags), so that the process directly resumes execution at the point where it "
6646 "was interrupted by the signal."
6647 msgstr ""
6648
6649 #. type: Plain text
6650 #: build/C/man2/sigreturn.2:54
6651 msgid "B<sigreturn>()  never returns."
6652 msgstr ""
6653
6654 #. type: SH
6655 #: build/C/man2/sigreturn.2:54
6656 #, no-wrap
6657 msgid "FILES"
6658 msgstr ""
6659
6660 #. type: Plain text
6661 #: build/C/man2/sigreturn.2:56
6662 msgid "/usr/src/linux/arch/i386/kernel/signal.c"
6663 msgstr ""
6664
6665 #. type: Plain text
6666 #: build/C/man2/sigreturn.2:58
6667 msgid "/usr/src/linux/arch/alpha/kernel/entry.S"
6668 msgstr ""
6669
6670 #. type: Plain text
6671 #: build/C/man2/sigreturn.2:62
6672 msgid ""
6673 "B<sigreturn>()  is specific to Linux and should not be used in programs "
6674 "intended to be portable."
6675 msgstr ""
6676
6677 #. type: Plain text
6678 #: build/C/man2/sigreturn.2:72
6679 msgid ""
6680 "The B<sigreturn>()  call is used by the kernel to implement signal "
6681 "handlers.  It should B<never> be called directly.  Better yet, the specific "
6682 "use of the I<__unused> argument varies depending on the architecture."
6683 msgstr ""
6684
6685 #. type: Plain text
6686 #: build/C/man2/sigreturn.2:77
6687 msgid "B<kill>(2), B<sigaltstack>(2), B<signal>(2), B<signal>(7)"
6688 msgstr ""
6689
6690 #. type: TH
6691 #: build/C/man3/sigset.3:24
6692 #, no-wrap
6693 msgid "SIGSET"
6694 msgstr ""
6695
6696 #. type: Plain text
6697 #: build/C/man3/sigset.3:27
6698 msgid "sigset, sighold, sigrelse, sigignore - System V signal API"
6699 msgstr ""
6700
6701 #. type: Plain text
6702 #: build/C/man3/sigset.3:33
6703 msgid "B<sighandler_t sigset(int >I<sig>B<, sighandler_t >I<disp>B<);>"
6704 msgstr ""
6705
6706 #. type: Plain text
6707 #: build/C/man3/sigset.3:35
6708 msgid "B<int sighold(int >I<sig>B<);>"
6709 msgstr ""
6710
6711 #. type: Plain text
6712 #: build/C/man3/sigset.3:37
6713 msgid "B<int sigrelse(int >I<sig>B<);>"
6714 msgstr ""
6715
6716 #. type: Plain text
6717 #: build/C/man3/sigset.3:39
6718 msgid "B<int sigignore(int >I<sig>B<);>"
6719 msgstr ""
6720
6721 #. type: Plain text
6722 #: build/C/man3/sigset.3:50
6723 msgid "B<sigset>(), B<sighold>(), B<sigrelse>(), B<sigignore>():"
6724 msgstr ""
6725
6726 #. type: Plain text
6727 #: build/C/man3/sigset.3:54
6728 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
6729 msgstr ""
6730
6731 #. type: Plain text
6732 #: build/C/man3/sigset.3:63
6733 msgid ""
6734 "These functions are provided in glibc as a compatibility interface for "
6735 "programs that make use of the historical System V signal API.  This API is "
6736 "obsolete: new applications should use the POSIX signal API (B<sigaction>(2), "
6737 "B<sigprocmask>(2), etc.)"
6738 msgstr ""
6739
6740 #. type: Plain text
6741 #: build/C/man3/sigset.3:72
6742 msgid ""
6743 "The B<sigset>()  function modifies the disposition of the signal I<sig>.  "
6744 "The I<disp> argument can be the address of a signal handler function, or one "
6745 "of the following constants:"
6746 msgstr ""
6747
6748 #. type: TP
6749 #: build/C/man3/sigset.3:72
6750 #, no-wrap
6751 msgid "B<SIG_DFL>"
6752 msgstr ""
6753
6754 #. type: Plain text
6755 #: build/C/man3/sigset.3:77
6756 msgid "Reset the disposition of I<sig> to the default."
6757 msgstr ""
6758
6759 #. type: TP
6760 #: build/C/man3/sigset.3:77
6761 #, no-wrap
6762 msgid "B<SIG_IGN>"
6763 msgstr ""
6764
6765 #. type: Plain text
6766 #: build/C/man3/sigset.3:81
6767 msgid "Ignore I<sig>."
6768 msgstr ""
6769
6770 #. type: TP
6771 #: build/C/man3/sigset.3:81
6772 #, no-wrap
6773 msgid "B<SIG_HOLD>"
6774 msgstr ""
6775
6776 #. type: Plain text
6777 #: build/C/man3/sigset.3:88
6778 msgid ""
6779 "Add I<sig> to the process's signal mask, but leave the disposition of I<sig> "
6780 "unchanged."
6781 msgstr ""
6782
6783 #. type: Plain text
6784 #: build/C/man3/sigset.3:94
6785 msgid ""
6786 "If I<disp> specifies the address of a signal handler, then I<sig> is added "
6787 "to the process's signal mask during execution of the handler."
6788 msgstr ""
6789
6790 #. type: Plain text
6791 #: build/C/man3/sigset.3:102
6792 msgid ""
6793 "If I<disp> was specified as a value other than B<SIG_HOLD>, then I<sig> is "
6794 "removed from the process's signal mask."
6795 msgstr ""
6796
6797 #. type: Plain text
6798 #: build/C/man3/sigset.3:108 build/C/man3/sigvec.3:85
6799 msgid "The dispositions for B<SIGKILL> and B<SIGSTOP> cannot be changed."
6800 msgstr ""
6801
6802 #. type: Plain text
6803 #: build/C/man3/sigset.3:114
6804 msgid "The B<sighold>()  function adds I<sig> to the calling process's signal mask."
6805 msgstr ""
6806
6807 #. type: Plain text
6808 #: build/C/man3/sigset.3:120
6809 msgid ""
6810 "The B<sigrelse>()  function removes I<sig> from the calling process's signal "
6811 "mask."
6812 msgstr ""
6813
6814 #. type: Plain text
6815 #: build/C/man3/sigset.3:127
6816 msgid "The B<sigignore>()  function sets the disposition of I<sig> to B<SIG_IGN>."
6817 msgstr ""
6818
6819 #. type: Plain text
6820 #: build/C/man3/sigset.3:143
6821 msgid ""
6822 "On success, B<sigset>()  returns B<SIG_HOLD> if I<sig> was blocked before "
6823 "the call, or the signal's previous disposition if it was not blocked before "
6824 "the call.  On error, B<sigset>()  returns -1, with I<errno> set to indicate "
6825 "the error.  (But see BUGS below.)"
6826 msgstr ""
6827
6828 #. type: Plain text
6829 #: build/C/man3/sigset.3:152
6830 msgid ""
6831 "The B<sighold>(), B<sigrelse>(), and B<sigignore>()  functions return 0 on "
6832 "success; on error, these functions return -1 and set I<errno> to indicate "
6833 "the error."
6834 msgstr ""
6835
6836 #. type: Plain text
6837 #: build/C/man3/sigset.3:159
6838 msgid ""
6839 "For B<sigset>()  see the ERRORS under B<sigaction>(2)  and "
6840 "B<sigprocmask>(2)."
6841 msgstr ""
6842
6843 #. type: Plain text
6844 #: build/C/man3/sigset.3:166
6845 msgid "For B<sighold>()  and B<sigrelse>()  see the ERRORS under B<sigprocmask>(2)."
6846 msgstr ""
6847
6848 #. type: Plain text
6849 #: build/C/man3/sigset.3:171
6850 msgid "For B<sigignore>(), see the errors under B<sigaction>(2)."
6851 msgstr ""
6852
6853 #. type: Plain text
6854 #: build/C/man3/sigset.3:188
6855 msgid ""
6856 "SVr4, POSIX.1-2001.  These functions are obsolete: do not use them in new "
6857 "programs.  POSIX.1-2008 marks B<sighold>(), B<sigignore>(), B<sigpause>(), "
6858 "B<sigrelse>(), and B<sigset>()  as obsolete, recommending the use of "
6859 "B<sigaction>(2), B<sigprocmask>(2), B<pthread_sigmask>(3), and "
6860 "B<sigsuspend>(2)  instead."
6861 msgstr ""
6862
6863 #. type: Plain text
6864 #: build/C/man3/sigset.3:190
6865 msgid "These functions appeared in glibc version 2.1."
6866 msgstr ""
6867
6868 #. type: Plain text
6869 #: build/C/man3/sigset.3:196
6870 msgid ""
6871 "The I<sighandler_t> type is a GNU extension; it is only used on this page to "
6872 "make the B<sigset>()  prototype more easily readable."
6873 msgstr ""
6874
6875 #. type: Plain text
6876 #: build/C/man3/sigset.3:204
6877 msgid ""
6878 "The B<sigset>()  function provides reliable signal handling semantics (as "
6879 "when calling B<sigaction>(2)  with I<sa_mask> equal to 0)."
6880 msgstr ""
6881
6882 #. type: Plain text
6883 #: build/C/man3/sigset.3:222
6884 msgid ""
6885 "On System V, the B<signal>()  function provides unreliable semantics (as "
6886 "when calling B<sigaction>(2)  with I<sa_mask> equal to I<SA_RESETHAND | "
6887 "SA_NODEFER>).  On BSD, B<signal>()  provides reliable semantics.  "
6888 "POSIX.1-2001 leaves these aspects of B<signal>()  unspecified.  See "
6889 "B<signal>(2)  for further details."
6890 msgstr ""
6891
6892 #. type: Plain text
6893 #: build/C/man3/sigset.3:230 build/C/man3/sigvec.3:250
6894 msgid ""
6895 "In order to wait for a signal, BSD and System V both provided a function "
6896 "named B<sigpause>(3), but this function has a different argument on the two "
6897 "systems.  See B<sigpause>(3)  for details."
6898 msgstr ""
6899
6900 #. type: Plain text
6901 #: build/C/man3/sigset.3:239
6902 msgid ""
6903 "In versions of glibc before 2.2, B<sigset>()  did not unblock I<sig> if "
6904 "I<disp> was specified as a value other than B<SIG_HOLD>."
6905 msgstr ""
6906
6907 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1951
6908 #. type: Plain text
6909 #: build/C/man3/sigset.3:264
6910 msgid ""
6911 "In versions of glibc before 2.5, B<sigset>()  does not correctly return the "
6912 "previous disposition of the signal in two cases.  First, if I<disp> is "
6913 "specified as B<SIG_HOLD>, then a successful B<sigset>()  always returns "
6914 "B<SIG_HOLD>.  Instead, it should return the previous disposition of the "
6915 "signal (unless the signal was blocked, in which case B<SIG_HOLD> should be "
6916 "returned).  Second, if the signal is currently blocked, then the return "
6917 "value of a successful B<sigset>()  should be B<SIG_HOLD>.  Instead, the "
6918 "previous disposition of the signal is returned.  These problems have been "
6919 "fixed since glibc 2.5."
6920 msgstr ""
6921
6922 #. type: Plain text
6923 #: build/C/man3/sigset.3:274
6924 msgid ""
6925 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
6926 "B<raise>(3), B<sigpause>(3), B<sigvec>(3), B<signal>(7)"
6927 msgstr ""
6928
6929 #. type: TH
6930 #: build/C/man3/sigsetops.3:29
6931 #, no-wrap
6932 msgid "SIGSETOPS"
6933 msgstr ""
6934
6935 #. type: TH
6936 #: build/C/man3/sigsetops.3:29
6937 #, no-wrap
6938 msgid "2008-09-01"
6939 msgstr ""
6940
6941 #. type: Plain text
6942 #: build/C/man3/sigsetops.3:33
6943 msgid ""
6944 "sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - POSIX signal "
6945 "set operations."
6946 msgstr ""
6947
6948 #. type: Plain text
6949 #: build/C/man3/sigsetops.3:37
6950 msgid "B<int sigemptyset(sigset_t *>I<set>B<);>"
6951 msgstr ""
6952
6953 #. type: Plain text
6954 #: build/C/man3/sigsetops.3:39
6955 msgid "B<int sigfillset(sigset_t *>I<set>B<);>"
6956 msgstr ""
6957
6958 #. type: Plain text
6959 #: build/C/man3/sigsetops.3:41
6960 msgid "B<int sigaddset(sigset_t *>I<set>B<, int >I<signum>B<);>"
6961 msgstr ""
6962
6963 #. type: Plain text
6964 #: build/C/man3/sigsetops.3:43
6965 msgid "B<int sigdelset(sigset_t *>I<set>B<, int >I<signum>B<);>"
6966 msgstr ""
6967
6968 #. type: Plain text
6969 #: build/C/man3/sigsetops.3:45
6970 msgid "B<int sigismember(const sigset_t *>I<set>B<, int >I<signum>B<);>"
6971 msgstr ""
6972
6973 #. type: Plain text
6974 #: build/C/man3/sigsetops.3:57
6975 msgid ""
6976 "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), B<sigdelset>(), "
6977 "B<sigismember>():"
6978 msgstr ""
6979
6980 #. type: Plain text
6981 #: build/C/man3/sigsetops.3:59
6982 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
6983 msgstr ""
6984
6985 #. type: Plain text
6986 #: build/C/man3/sigsetops.3:63
6987 msgid "These functions allow the manipulation of POSIX signal sets."
6988 msgstr ""
6989
6990 #. type: Plain text
6991 #: build/C/man3/sigsetops.3:68
6992 msgid ""
6993 "B<sigemptyset>()  initializes the signal set given by I<set> to empty, with "
6994 "all signals excluded from the set."
6995 msgstr ""
6996
6997 #. type: Plain text
6998 #: build/C/man3/sigsetops.3:73
6999 msgid "B<sigfillset>()  initializes I<set> to full, including all signals."
7000 msgstr ""
7001
7002 #. type: Plain text
7003 #: build/C/man3/sigsetops.3:81
7004 msgid ""
7005 "B<sigaddset>()  and B<sigdelset>()  add and delete respectively signal "
7006 "I<signum> from I<set>."
7007 msgstr ""
7008
7009 #. type: Plain text
7010 #: build/C/man3/sigsetops.3:87
7011 msgid "B<sigismember>()  tests whether I<signum> is a member of I<set>."
7012 msgstr ""
7013
7014 #. type: Plain text
7015 #: build/C/man3/sigsetops.3:105
7016 msgid ""
7017 "Objects of type I<sigset_t> must be initialized by a call to either "
7018 "B<sigemptyset>()  or B<sigfillset>()  before being passed to the functions "
7019 "B<sigaddset>(), B<sigdelset>()  and B<sigismember>()  or the additional "
7020 "glibc functions described below (B<sigisemptyset>(), B<sigandset>(), and "
7021 "B<sigorset>()).  The results are undefined if this is not done."
7022 msgstr ""
7023
7024 #. type: Plain text
7025 #: build/C/man3/sigsetops.3:112
7026 msgid ""
7027 "B<sigemptyset>(), B<sigfillset>(), B<sigaddset>(), and B<sigdelset>()  "
7028 "return 0 on success and -1 on error."
7029 msgstr ""
7030
7031 #. type: Plain text
7032 #: build/C/man3/sigsetops.3:121
7033 msgid ""
7034 "B<sigismember>()  returns 1 if I<signum> is a member of I<set>, 0 if "
7035 "I<signum> is not a member, and -1 on error."
7036 msgstr ""
7037
7038 #. type: Plain text
7039 #: build/C/man3/sigsetops.3:126
7040 msgid "I<sig> is not a valid signal."
7041 msgstr ""
7042
7043 #. type: SS
7044 #: build/C/man3/sigsetops.3:129
7045 #, no-wrap
7046 msgid "Glibc Notes"
7047 msgstr ""
7048
7049 #. type: Plain text
7050 #: build/C/man3/sigsetops.3:135
7051 msgid ""
7052 "If the B<_GNU_SOURCE> feature test macro is defined, then "
7053 "I<E<lt>signal.hE<gt>> exposes three other functions for manipulating signal "
7054 "sets."
7055 msgstr ""
7056
7057 #. type: TP
7058 #: build/C/man3/sigsetops.3:135
7059 #, no-wrap
7060 msgid "B<int sigisemptyset(sigset_t *>I<set>B<);>"
7061 msgstr ""
7062
7063 #. type: Plain text
7064 #: build/C/man3/sigsetops.3:140
7065 msgid "returns 1 if I<set> contains no signals, and 0 otherwise."
7066 msgstr ""
7067
7068 #. type: TP
7069 #: build/C/man3/sigsetops.3:140
7070 #, no-wrap
7071 msgid ""
7072 "B<int sigorset(sigset_t *>I<dest>B<, sigset_t *>I<left>B<, sigset_t "
7073 "*>I<right>B<);>"
7074 msgstr ""
7075
7076 #. type: Plain text
7077 #: build/C/man3/sigsetops.3:149
7078 msgid "places the union of the sets I<left> and I<right> in I<dest>."
7079 msgstr ""
7080
7081 #. type: TP
7082 #: build/C/man3/sigsetops.3:149
7083 #, no-wrap
7084 msgid ""
7085 "B<int sigandset(sigset_t *>I<dest>B<, sigset_t *>I<left>B<, sigset_t "
7086 "*>I<right>B<);>"
7087 msgstr ""
7088
7089 #. type: Plain text
7090 #: build/C/man3/sigsetops.3:158
7091 msgid "places the intersection of the sets I<left> and I<right> in I<dest>."
7092 msgstr ""
7093
7094 #. type: Plain text
7095 #: build/C/man3/sigsetops.3:163
7096 msgid "B<sigorset>()  and B<sigandset>()  return 0 on success, and -1 on failure."
7097 msgstr ""
7098
7099 #. type: Plain text
7100 #: build/C/man3/sigsetops.3:166
7101 msgid ""
7102 "These functions are nonstandard (a few other systems provide similar "
7103 "functions) and their use should be avoided in portable applications."
7104 msgstr ""
7105
7106 #. type: Plain text
7107 #: build/C/man3/sigsetops.3:171
7108 msgid "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<sigsuspend>(2)"
7109 msgstr ""
7110
7111 #. type: TH
7112 #: build/C/man2/sigsuspend.2:27
7113 #, no-wrap
7114 msgid "SIGSUSPEND"
7115 msgstr ""
7116
7117 #. type: TH
7118 #: build/C/man2/sigsuspend.2:27
7119 #, no-wrap
7120 msgid "2008-08-29"
7121 msgstr ""
7122
7123 #. type: Plain text
7124 #: build/C/man2/sigsuspend.2:30
7125 msgid "sigsuspend - wait for a signal"
7126 msgstr ""
7127
7128 #. type: Plain text
7129 #: build/C/man2/sigsuspend.2:34
7130 msgid "B<int sigsuspend(const sigset_t *>I<mask>B<);>"
7131 msgstr ""
7132
7133 #. type: Plain text
7134 #: build/C/man2/sigsuspend.2:43
7135 msgid ""
7136 "B<sigsuspend>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || "
7137 "_POSIX_SOURCE"
7138 msgstr ""
7139
7140 #. type: Plain text
7141 #: build/C/man2/sigsuspend.2:51
7142 msgid ""
7143 "B<sigsuspend>()  temporarily replaces the signal mask of the calling process "
7144 "with the mask given by I<mask> and then suspends the process until delivery "
7145 "of a signal whose action is to invoke a signal handler or to terminate a "
7146 "process."
7147 msgstr ""
7148
7149 #. type: Plain text
7150 #: build/C/man2/sigsuspend.2:60
7151 msgid ""
7152 "If the signal terminates the process, then B<sigsuspend>()  does not "
7153 "return.  If the signal is caught, then B<sigsuspend>()  returns after the "
7154 "signal handler returns, and the signal mask is restored to the state before "
7155 "the call to B<sigsuspend>()."
7156 msgstr ""
7157
7158 #. type: Plain text
7159 #: build/C/man2/sigsuspend.2:68
7160 msgid ""
7161 "It is not possible to block B<SIGKILL> or B<SIGSTOP>; specifying these "
7162 "signals in I<mask>, has no effect on the process's signal mask."
7163 msgstr ""
7164
7165 #. type: Plain text
7166 #: build/C/man2/sigsuspend.2:72
7167 msgid "B<sigsuspend>()  always returns -1, normally with the error B<EINTR>."
7168 msgstr ""
7169
7170 #. type: Plain text
7171 #: build/C/man2/sigsuspend.2:77
7172 msgid ""
7173 "I<mask> points to memory which is not a valid part of the process address "
7174 "space."
7175 msgstr ""
7176
7177 #. type: Plain text
7178 #: build/C/man2/sigsuspend.2:80
7179 msgid "The call was interrupted by a signal."
7180 msgstr ""
7181
7182 #. type: Plain text
7183 #: build/C/man2/sigsuspend.2:100
7184 msgid ""
7185 "Normally, B<sigsuspend>()  is used in conjunction with B<sigprocmask>(2)  in "
7186 "order to prevent delivery of a signal during the execution of a critical "
7187 "code section.  The caller first blocks the signals with B<sigprocmask>(2).  "
7188 "When the critical code has completed, the caller then waits for the signals "
7189 "by calling B<sigsuspend>()  with the signal mask that was returned by "
7190 "B<sigprocmask>(2)  (in the I<oldset> argument)."
7191 msgstr ""
7192
7193 #. type: Plain text
7194 #: build/C/man2/sigsuspend.2:114
7195 msgid ""
7196 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
7197 "B<sigwaitinfo>(2), B<sigsetops>(3), B<sigwait>(3), B<signal>(7)"
7198 msgstr ""
7199
7200 #. type: TH
7201 #: build/C/man3/sigvec.3:24
7202 #, no-wrap
7203 msgid "SIGVEC"
7204 msgstr ""
7205
7206 #. type: Plain text
7207 #: build/C/man3/sigvec.3:27
7208 msgid "sigvec, sigblock, sigsetmask, siggetmask, sigmask - BSD signal API"
7209 msgstr ""
7210
7211 #. type: Plain text
7212 #: build/C/man3/sigvec.3:31
7213 msgid ""
7214 "B<int sigvec(int >I<sig>B<, struct sigvec *>I<vec>B<, struct sigvec "
7215 "*>I<ovec>B<);>"
7216 msgstr ""
7217
7218 #. type: Plain text
7219 #: build/C/man3/sigvec.3:33
7220 msgid "B<int sigmask(int >I<signum>B<);>"
7221 msgstr ""
7222
7223 #. type: Plain text
7224 #: build/C/man3/sigvec.3:35
7225 msgid "B<int sigblock(int >I<mask>B<);>"
7226 msgstr ""
7227
7228 #. type: Plain text
7229 #: build/C/man3/sigvec.3:37
7230 msgid "B<int sigsetmask(int >I<mask>B<);>"
7231 msgstr ""
7232
7233 #. type: Plain text
7234 #: build/C/man3/sigvec.3:39
7235 msgid "B<int siggetmask(void);>"
7236 msgstr ""
7237
7238 #. type: Plain text
7239 #: build/C/man3/sigvec.3:47
7240 msgid "All functions shown above: _BSD_SOURCE"
7241 msgstr ""
7242
7243 #. type: Plain text
7244 #: build/C/man3/sigvec.3:54
7245 msgid ""
7246 "These functions are provided in glibc as a compatibility interface for "
7247 "programs that make use of the historical BSD signal API.  This API is "
7248 "obsolete: new applications should use the POSIX signal API (B<sigaction>(2), "
7249 "B<sigprocmask>(2), etc.)"
7250 msgstr ""
7251
7252 #. type: Plain text
7253 #: build/C/man3/sigvec.3:79
7254 msgid ""
7255 "The B<sigvec>()  function sets and/or gets the disposition of the signal "
7256 "I<sig> (like the POSIX B<sigaction>(2)).  If I<vec> is not NULL, it points "
7257 "to a I<sigvec> structure that defines the new disposition for I<sig>.  If "
7258 "I<ovec> is not NULL, it points to a I<sigvec> structure that is used to "
7259 "return the previous disposition of I<sig>.  To obtain the current "
7260 "disposition of I<sig> without changing it, specify NULL for I<vec>, and a "
7261 "non-NULL pointer for I<ovec>."
7262 msgstr ""
7263
7264 #. type: Plain text
7265 #: build/C/man3/sigvec.3:89
7266 msgid "The I<sigvec> structure has the following form:"
7267 msgstr ""
7268
7269 #. type: Plain text
7270 #: build/C/man3/sigvec.3:97
7271 #, no-wrap
7272 msgid ""
7273 "struct sigvec {\n"
7274 "    void (*sv_handler)();  /* Signal disposition */\n"
7275 "    int    sv_mask;        /* Signals to be blocked in handler */\n"
7276 "    int    sv_flags;       /* Flags */\n"
7277 "};\n"
7278 msgstr ""
7279
7280 #. type: Plain text
7281 #: build/C/man3/sigvec.3:108
7282 msgid ""
7283 "The I<sv_handler> field specifies the disposition of the signal, and is "
7284 "either: the address of a signal handler function; or B<SIG_DFL> meaning the "
7285 "default disposition applies for the signal; or B<SIG_IGN> meaning that the "
7286 "signal is ignored."
7287 msgstr ""
7288
7289 #. type: Plain text
7290 #: build/C/man3/sigvec.3:122
7291 msgid ""
7292 "If I<sv_handler> specifies the address of a signal handler, then I<sv_mask> "
7293 "specifies a mask of signals that are to be blocked while the handler is "
7294 "executing.  In addition, the signal for which the handler is invoked is also "
7295 "blocked by default.  Attempts to block B<SIGKILL> or B<SIGSTOP> are silently "
7296 "ignored."
7297 msgstr ""
7298
7299 #. type: Plain text
7300 #: build/C/man3/sigvec.3:129
7301 msgid ""
7302 "If I<sv_handler> specifies the address of a signal handler, then the "
7303 "I<sv_flags> field specifies flags controlling what happens when the handler "
7304 "is called.  This field may contain zero or more of the following flags:"
7305 msgstr ""
7306
7307 #. type: TP
7308 #: build/C/man3/sigvec.3:129
7309 #, no-wrap
7310 msgid "B<SV_INTERRUPT>"
7311 msgstr ""
7312
7313 #. type: Plain text
7314 #: build/C/man3/sigvec.3:137
7315 msgid ""
7316 "If the signal handler interrupts a blocking system call, then upon return "
7317 "from the handler the system call will not be restarted: instead it will fail "
7318 "with the error B<EINTR>.  If this flag is not specified, then system calls "
7319 "are restarted by default."
7320 msgstr ""
7321
7322 #. type: TP
7323 #: build/C/man3/sigvec.3:137
7324 #, no-wrap
7325 msgid "B<SV_RESETHAND>"
7326 msgstr ""
7327
7328 #. type: Plain text
7329 #: build/C/man3/sigvec.3:146
7330 msgid ""
7331 "Reset the disposition of the signal to the default before calling the signal "
7332 "handler.  If this flag is not specified, then the handler remains "
7333 "established until explicitly removed by a later call to B<sigvec>()  or "
7334 "until the process performs an B<execve>(2)."
7335 msgstr ""
7336
7337 #. type: TP
7338 #: build/C/man3/sigvec.3:146
7339 #, no-wrap
7340 msgid "B<SV_ONSTACK>"
7341 msgstr ""
7342
7343 #. type: Plain text
7344 #: build/C/man3/sigvec.3:153
7345 msgid ""
7346 "Handle the signal on the alternate signal stack (historically established "
7347 "under BSD using the obsolete B<sigstack>()  function; the POSIX replacement "
7348 "is B<sigaltstack>(2))."
7349 msgstr ""
7350
7351 #. type: Plain text
7352 #: build/C/man3/sigvec.3:163
7353 msgid ""
7354 "The B<sigmask>()  function constructs and returns a \"signal mask\" for "
7355 "I<signum>.  For example, we can initialize the I<vec.sv_mask> field given to "
7356 "B<sigvec>()  using code such as the following:"
7357 msgstr ""
7358
7359 #. type: Plain text
7360 #: build/C/man3/sigvec.3:168
7361 #, no-wrap
7362 msgid ""
7363 "    vec.sv_mask = sigmask(SIGQUIT) | sigpause(SIGABRT);\n"
7364 "                /* Block SIGQUIT and SIGABRT during\n"
7365 "                   handler execution */\n"
7366 msgstr ""
7367
7368 #. type: Plain text
7369 #: build/C/man3/sigvec.3:183
7370 msgid ""
7371 "The B<sigblock>()  function adds the signals in I<mask> to the process's "
7372 "signal mask (like POSIX I<sigprocmask(SIG_BLOCK)>), and returns the "
7373 "process's previous signal mask.  Attempts to block B<SIGKILL> or B<SIGSTOP> "
7374 "are silently ignored."
7375 msgstr ""
7376
7377 #. type: Plain text
7378 #: build/C/man3/sigvec.3:191
7379 msgid ""
7380 "The B<sigsetmask>()  function sets the process's signal mask to the value "
7381 "given in I<mask> (like POSIX I<sigprocmask(SIG_SETMASK)>), and returns the "
7382 "process's previous signal mask."
7383 msgstr ""
7384
7385 #. type: Plain text
7386 #: build/C/man3/sigvec.3:197
7387 msgid ""
7388 "The B<siggetmask>()  function returns the process's current signal mask.  "
7389 "This call is equivalent to I<sigblock(0)>."
7390 msgstr ""
7391
7392 #. type: Plain text
7393 #: build/C/man3/sigvec.3:203
7394 msgid ""
7395 "The B<sigvec>()  function returns 0 on success; on error, it returns -1 and "
7396 "sets I<errno> to indicate the error."
7397 msgstr ""
7398
7399 #. type: Plain text
7400 #: build/C/man3/sigvec.3:209
7401 msgid ""
7402 "The B<sigblock>()  and B<sigsetmask>()  functions return the previous signal "
7403 "mask."
7404 msgstr ""
7405
7406 #. type: Plain text
7407 #: build/C/man3/sigvec.3:214
7408 msgid "The B<sigmask>()  function returns the signal mask for I<signum>."
7409 msgstr ""
7410
7411 #. type: Plain text
7412 #: build/C/man3/sigvec.3:219
7413 msgid "See the ERRORS under B<sigaction>(2)  and B<sigprocmask>(2)."
7414 msgstr ""
7415
7416 #. type: Plain text
7417 #: build/C/man3/sigvec.3:225
7418 msgid ""
7419 "All of these functions were in 4.3BSD, except B<siggetmask>(), whose origin "
7420 "is unclear.  These functions are obsolete: do not use them in new programs."
7421 msgstr ""
7422
7423 #. type: Plain text
7424 #: build/C/man3/sigvec.3:242
7425 msgid ""
7426 "On 4.3BSD, the B<signal>()  function provided reliable semantics (as when "
7427 "calling B<sigvec>()  with I<vec.sv_mask> equal to 0).  On System V, "
7428 "B<signal>()  provides unreliable semantics.  POSIX.1-2001 leaves these "
7429 "aspects of B<signal>()  unspecified.  See B<signal>(2)  for further details."
7430 msgstr ""
7431
7432 #. type: Plain text
7433 #: build/C/man3/sigvec.3:260
7434 msgid ""
7435 "B<kill>(2), B<pause>(2), B<sigaction>(2), B<signal>(2), B<sigprocmask>(2), "
7436 "B<raise>(3), B<sigpause>(3), B<sigset>(3), B<signal>(7)"
7437 msgstr ""
7438
7439 #. type: TH
7440 #: build/C/man3/sigwait.3:24
7441 #, no-wrap
7442 msgid "SIGWAIT"
7443 msgstr ""
7444
7445 #. type: TH
7446 #: build/C/man3/sigwait.3:24
7447 #, no-wrap
7448 msgid "2010-09-10"
7449 msgstr ""
7450
7451 #. type: Plain text
7452 #: build/C/man3/sigwait.3:27
7453 msgid "sigwait - wait for a signal"
7454 msgstr ""
7455
7456 #. type: Plain text
7457 #: build/C/man3/sigwait.3:32
7458 #, no-wrap
7459 msgid "B< int sigwait(const sigset_t *>I<set>B<, int *>I<sig>B<);>\n"
7460 msgstr ""
7461
7462 #. type: Plain text
7463 #: build/C/man3/sigwait.3:42
7464 msgid "B<sigwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
7465 msgstr ""
7466
7467 #. type: Plain text
7468 #: build/C/man3/sigwait.3:53
7469 msgid ""
7470 "The B<sigwait>()  function suspends execution of the calling thread until "
7471 "the delivery of one of the signals specified in the signal set I<set>.  The "
7472 "function accepts the signal (removes it from the pending list of signals), "
7473 "and returns the signal number in I<sig>."
7474 msgstr ""
7475
7476 #. type: Plain text
7477 #: build/C/man3/sigwait.3:59
7478 msgid ""
7479 "The operation of B<sigwait>()  is the same as B<sigwaitinfo>(2), except "
7480 "that:"
7481 msgstr ""
7482
7483 #. type: Plain text
7484 #: build/C/man3/sigwait.3:64
7485 msgid ""
7486 "B<sigwait>()  only returns the signal number, rather than a I<siginfo_t> "
7487 "structure describing the signal."
7488 msgstr ""
7489
7490 #. type: Plain text
7491 #: build/C/man3/sigwait.3:66
7492 msgid "The return values of the two functions are different."
7493 msgstr ""
7494
7495 #. type: Plain text
7496 #: build/C/man3/sigwait.3:71
7497 msgid ""
7498 "On success, B<sigwait>()  returns 0.  On error, it returns a positive error "
7499 "number (listed in ERRORS)."
7500 msgstr ""
7501
7502 #.  Does not occur for glibc.
7503 #. type: Plain text
7504 #: build/C/man3/sigwait.3:77
7505 msgid "I<set> contains an invalid signal number."
7506 msgstr ""
7507
7508 #. type: Plain text
7509 #: build/C/man3/sigwait.3:83
7510 msgid "B<sigwait>()  is implemented using B<sigtimedwait>(2)."
7511 msgstr ""
7512
7513 #. type: SH
7514 #: build/C/man3/sigwait.3:83
7515 #, no-wrap
7516 msgid "EXAMPLES"
7517 msgstr ""
7518
7519 #. type: Plain text
7520 #: build/C/man3/sigwait.3:86
7521 msgid "See B<pthread_sigmask>(3)."
7522 msgstr ""
7523
7524 #. type: Plain text
7525 #: build/C/man3/sigwait.3:94
7526 msgid ""
7527 "B<sigaction>(2), B<signalfd>(2), B<sigpending>(2), B<sigsuspend>(2), "
7528 "B<sigwaitinfo>(2), B<sigsetops>(3), B<signal>(7)"
7529 msgstr ""
7530
7531 #. type: TH
7532 #: build/C/man2/sigwaitinfo.2:23
7533 #, no-wrap
7534 msgid "SIGWAITINFO"
7535 msgstr ""
7536
7537 #. type: TH
7538 #: build/C/man2/sigwaitinfo.2:23
7539 #, no-wrap
7540 msgid "2011-10-03"
7541 msgstr ""
7542
7543 #. type: Plain text
7544 #: build/C/man2/sigwaitinfo.2:26
7545 msgid "sigwaitinfo, sigtimedwait - synchronously wait for queued signals"
7546 msgstr ""
7547
7548 #. type: Plain text
7549 #: build/C/man2/sigwaitinfo.2:31
7550 #, no-wrap
7551 msgid "B<int sigwaitinfo(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<);>\n"
7552 msgstr ""
7553
7554 #. type: Plain text
7555 #: build/C/man2/sigwaitinfo.2:34
7556 #, no-wrap
7557 msgid ""
7558 "B<int sigtimedwait(const sigset_t *>I<set>B<, siginfo_t *>I<info>B<, >\n"
7559 "B<                 const struct timespec *>I<timeout>B<);>\n"
7560 msgstr ""
7561
7562 #. type: Plain text
7563 #: build/C/man2/sigwaitinfo.2:44
7564 msgid "B<sigwaitinfo>(), B<sigtimedwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
7565 msgstr ""
7566
7567 #. type: Plain text
7568 #: build/C/man2/sigwaitinfo.2:54
7569 msgid ""
7570 "B<sigwaitinfo>()  suspends execution of the calling thread until one of the "
7571 "signals in I<set> is delivered.  (If one of the signals in I<set> is already "
7572 "pending for the calling thread, B<sigwaitinfo>()  will return immediately "
7573 "with information about that signal.)"
7574 msgstr ""
7575
7576 #. type: Plain text
7577 #: build/C/man2/sigwaitinfo.2:66
7578 msgid ""
7579 "B<sigwaitinfo>()  removes the delivered signal from the set of pending "
7580 "signals and returns the signal number as its function result.  If the "
7581 "I<info> argument is not NULL, then it returns a structure of type "
7582 "I<siginfo_t> (see B<sigaction>(2))  containing information about the signal."
7583 msgstr ""
7584
7585 #. type: Plain text
7586 #: build/C/man2/sigwaitinfo.2:72
7587 msgid ""
7588 "Signals returned via B<sigwaitinfo>()  are delivered in the usual order; see "
7589 "B<signal>(7)  for further details."
7590 msgstr ""
7591
7592 #. type: Plain text
7593 #: build/C/man2/sigwaitinfo.2:81
7594 msgid ""
7595 "B<sigtimedwait>()  operates in exactly the same way as B<sigwaitinfo>()  "
7596 "except that it has an additional argument, I<timeout>, which enables an "
7597 "upper bound to be placed on the time for which the thread is suspended.  "
7598 "This argument is of the following type:"
7599 msgstr ""
7600
7601 #. type: Plain text
7602 #: build/C/man2/sigwaitinfo.2:88
7603 #, no-wrap
7604 msgid ""
7605 "struct timespec {\n"
7606 "    long    tv_sec;         /* seconds */\n"
7607 "    long    tv_nsec;        /* nanoseconds */\n"
7608 "}\n"
7609 msgstr ""
7610
7611 #. type: Plain text
7612 #: build/C/man2/sigwaitinfo.2:98
7613 msgid ""
7614 "If both fields of this structure are specified as 0, a poll is performed: "
7615 "B<sigtimedwait>()  returns immediately, either with information about a "
7616 "signal that was pending for the caller, or with an error if none of the "
7617 "signals in I<set> was pending."
7618 msgstr ""
7619
7620 #. type: Plain text
7621 #: build/C/man2/sigwaitinfo.2:107
7622 msgid ""
7623 "On success, both B<sigwaitinfo>()  and B<sigtimedwait>()  return a signal "
7624 "number (i.e., a value greater than zero).  On failure both calls return -1, "
7625 "with I<errno> set to indicate the error."
7626 msgstr ""
7627
7628 #. type: Plain text
7629 #: build/C/man2/sigwaitinfo.2:116
7630 msgid ""
7631 "No signal in I<set> was delivered within the I<timeout> period specified to "
7632 "B<sigtimedwait>()."
7633 msgstr ""
7634
7635 #. type: Plain text
7636 #: build/C/man2/sigwaitinfo.2:122
7637 msgid ""
7638 "The wait was interrupted by a signal handler; see B<signal>(7).  (This "
7639 "handler was for a signal other than one of those in I<set>.)"
7640 msgstr ""
7641
7642 #. type: Plain text
7643 #: build/C/man2/sigwaitinfo.2:126
7644 msgid "I<timeout> was invalid."
7645 msgstr ""
7646
7647 #. type: Plain text
7648 #: build/C/man2/sigwaitinfo.2:145
7649 msgid ""
7650 "In normal usage, the calling program blocks the signals in I<set> via a "
7651 "prior call to B<sigprocmask>(2)  (so that the default disposition for these "
7652 "signals does not occur if they are delivered between successive calls to "
7653 "B<sigwaitinfo>()  or B<sigtimedwait>())  and does not establish handlers for "
7654 "these signals.  In a multithreaded program, the signal should be blocked in "
7655 "all threads to prevent the signal being delivered to a thread other than the "
7656 "one calling B<sigwaitinfo>()  or B<sigtimedwait>())."
7657 msgstr ""
7658
7659 #. type: Plain text
7660 #: build/C/man2/sigwaitinfo.2:150
7661 msgid ""
7662 "The set of signals that is pending for a given thread is the union of the "
7663 "set of signals that is pending specifically for that thread and the set of "
7664 "signals that is pending for the process as a whole (see B<signal>(7))."
7665 msgstr ""
7666
7667 #. type: Plain text
7668 #: build/C/man2/sigwaitinfo.2:156
7669 msgid "Attempts to wait for B<SIGKILL> and B<SIGSTOP> are silently ignored."
7670 msgstr ""
7671
7672 #. type: Plain text
7673 #: build/C/man2/sigwaitinfo.2:165
7674 msgid ""
7675 "If multiple threads of a process are blocked waiting for the same signal(s) "
7676 "in B<sigwaitinfo>()  or B<sigtimedwait>(), then exactly one of the threads "
7677 "will actually receive the signal if it is delivered to the process as a "
7678 "whole; which of the threads receives the signal is indeterminate."
7679 msgstr ""
7680
7681 #. type: Plain text
7682 #: build/C/man2/sigwaitinfo.2:174
7683 msgid ""
7684 "POSIX leaves the meaning of a NULL value for the I<timeout> argument of "
7685 "B<sigtimedwait>()  unspecified, permitting the possibility that this has the "
7686 "same meaning as a call to B<sigwaitinfo>(), and indeed this is what is done "
7687 "on Linux."
7688 msgstr ""
7689
7690 #. type: Plain text
7691 #: build/C/man2/sigwaitinfo.2:179
7692 msgid ""
7693 "On Linux, B<sigwaitinfo>()  is a library function implemented on top of "
7694 "B<sigtimedwait>()."
7695 msgstr ""
7696
7697 #. type: Plain text
7698 #: build/C/man2/sigwaitinfo.2:191
7699 msgid ""
7700 "B<kill>(2), B<sigaction>(2), B<signal>(2), B<signalfd>(2), B<sigpending>(2), "
7701 "B<sigprocmask>(2), B<sigqueue>(3), B<sigsetops>(3), B<sigwait>(3), "
7702 "B<signal>(7), B<time>(7)"
7703 msgstr ""
7704
7705 #. type: TH
7706 #: build/C/man3/sysv_signal.3:23
7707 #, no-wrap
7708 msgid "SYSV_SIGNAL"
7709 msgstr ""
7710
7711 #. type: TH
7712 #: build/C/man3/sysv_signal.3:23
7713 #, no-wrap
7714 msgid "2007-05-04"
7715 msgstr ""
7716
7717 #. type: Plain text
7718 #: build/C/man3/sysv_signal.3:26
7719 msgid "sysv_signal - signal handling with System V semantics"
7720 msgstr ""
7721
7722 #. type: Plain text
7723 #: build/C/man3/sysv_signal.3:28
7724 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
7725 msgstr ""
7726
7727 #. type: Plain text
7728 #: build/C/man3/sysv_signal.3:34
7729 msgid "B<sighandler_t sysv_signal(int >I<signum>B<, sighandler_t >I<handler>B<);>"
7730 msgstr ""
7731
7732 #. type: Plain text
7733 #: build/C/man3/sysv_signal.3:39
7734 msgid ""
7735 "The B<sysv_signal>()  function takes the same arguments, and performs the "
7736 "same task, as B<signal>(2)."
7737 msgstr ""
7738
7739 #. type: Plain text
7740 #: build/C/man3/sysv_signal.3:49
7741 msgid ""
7742 "However B<sysv_signal>()  provides the System V unreliable signal semantics, "
7743 "that is: a) the disposition of the signal is reset to the default when the "
7744 "handler is invoked; b) delivery of further instances of the signal is not "
7745 "blocked while the signal handler is executing; and c) if the handler "
7746 "interrupts (certain) blocking system calls, then the system call is not "
7747 "automatically restarted."
7748 msgstr ""
7749
7750 #. type: Plain text
7751 #: build/C/man3/sysv_signal.3:55
7752 msgid ""
7753 "The B<sysv_signal>()  function returns the previous value of the signal "
7754 "handler, or B<SIG_ERR> on error."
7755 msgstr ""
7756
7757 #. type: Plain text
7758 #: build/C/man3/sysv_signal.3:60
7759 msgid "This function is nonstandard."
7760 msgstr ""
7761
7762 #. type: Plain text
7763 #: build/C/man3/sysv_signal.3:66
7764 msgid "Use of B<sysv_signal>()  should be avoided; use B<sigaction>(2)  instead."
7765 msgstr ""
7766
7767 #. type: Plain text
7768 #: build/C/man3/sysv_signal.3:77
7769 msgid ""
7770 "On older Linux systems, B<sysv_signal>()  and B<signal>(2)  were "
7771 "equivalent.  But on newer systems, B<signal>(2)  provides reliable signal "
7772 "semantics; see B<signal>(2)  for details."
7773 msgstr ""
7774
7775 #. type: Plain text
7776 #: build/C/man3/sysv_signal.3:90
7777 msgid "B<sigaction>(2), B<signal>(2), B<bsd_signal>(3), B<signal>(7)"
7778 msgstr ""
7779
7780 #. type: TH
7781 #: build/C/man2/timer_create.2:29
7782 #, no-wrap
7783 msgid "TIMER_CREATE"
7784 msgstr ""
7785
7786 #. type: TH
7787 #: build/C/man2/timer_create.2:29
7788 #, no-wrap
7789 msgid "2010-09-27"
7790 msgstr ""
7791
7792 #. type: Plain text
7793 #: build/C/man2/timer_create.2:32
7794 msgid "timer_create - create a POSIX per-process timer"
7795 msgstr ""
7796
7797 #. type: Plain text
7798 #: build/C/man2/timer_create.2:36
7799 #, no-wrap
7800 msgid ""
7801 "B<#include E<lt>signal.hE<gt>>\n"
7802 "B<#include E<lt>time.hE<gt>>\n"
7803 msgstr ""
7804
7805 #. type: Plain text
7806 #: build/C/man2/timer_create.2:39
7807 #, no-wrap
7808 msgid ""
7809 "B<int timer_create(clockid_t >I<clockid>B<, struct sigevent *>I<sevp>B<,>\n"
7810 "B<                 timer_t *>I<timerid>B<);>\n"
7811 msgstr ""
7812
7813 #. type: Plain text
7814 #: build/C/man2/timer_create.2:42 build/C/man2/timer_delete.2:34 build/C/man2/timer_getoverrun.2:34 build/C/man2/timer_settime.2:38
7815 msgid "Link with I<-lrt>."
7816 msgstr ""
7817
7818 #. type: Plain text
7819 #: build/C/man2/timer_create.2:50
7820 msgid "B<timer_create>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
7821 msgstr ""
7822
7823 #. type: Plain text
7824 #: build/C/man2/timer_create.2:58
7825 msgid ""
7826 "B<timer_create>()  creates a new per-process interval timer.  The ID of the "
7827 "new timer is returned in the buffer pointed to by I<timerid>, which must be "
7828 "a non-NULL pointer.  This ID is unique within the process, until the timer "
7829 "is deleted.  The new timer is initially disarmed."
7830 msgstr ""
7831
7832 #. type: Plain text
7833 #: build/C/man2/timer_create.2:63
7834 msgid ""
7835 "The I<clockid> argument specifies the clock that the new timer uses to "
7836 "measure time.  It can be specified as one of the following values:"
7837 msgstr ""
7838
7839 #. type: TP
7840 #: build/C/man2/timer_create.2:63
7841 #, no-wrap
7842 msgid "B<CLOCK_REALTIME>"
7843 msgstr ""
7844
7845 #. type: Plain text
7846 #: build/C/man2/timer_create.2:66
7847 msgid "A settable system-wide real-time clock."
7848 msgstr ""
7849
7850 #. type: TP
7851 #: build/C/man2/timer_create.2:66
7852 #, no-wrap
7853 msgid "B<CLOCK_MONOTONIC>"
7854 msgstr ""
7855
7856 #.  Note: the CLOCK_MONOTONIC_RAW clock added for clock_gettime()
7857 #.  in 2.6.28 is not supported for POSIX timers -- mtk, Feb 2009
7858 #. type: Plain text
7859 #: build/C/man2/timer_create.2:73
7860 msgid ""
7861 "A nonsettable monotonically increasing clock that measures time from some "
7862 "unspecified point in the past that does not change after system startup."
7863 msgstr ""
7864
7865 #. type: TP
7866 #: build/C/man2/timer_create.2:73
7867 #, no-wrap
7868 msgid "B<CLOCK_PROCESS_CPUTIME_ID> (since Linux 2.6.12)"
7869 msgstr ""
7870
7871 #. type: Plain text
7872 #: build/C/man2/timer_create.2:77
7873 msgid ""
7874 "A clock that measures (user and system) CPU time consumed by (all of the "
7875 "threads in) the calling process."
7876 msgstr ""
7877
7878 #. type: TP
7879 #: build/C/man2/timer_create.2:77
7880 #, no-wrap
7881 msgid "B<CLOCK_THREAD_CPUTIME_ID> (since Linux 2.6.12)"
7882 msgstr ""
7883
7884 #.  The CLOCK_MONOTONIC_RAW that was added in 2.6.28 can't be used
7885 #.  to create a timer -- mtk, Feb 2009
7886 #. type: Plain text
7887 #: build/C/man2/timer_create.2:83
7888 msgid ""
7889 "A clock that measures (user and system) CPU time consumed by the calling "
7890 "thread."
7891 msgstr ""
7892
7893 #. type: Plain text
7894 #: build/C/man2/timer_create.2:92
7895 msgid ""
7896 "As well as the above values, I<clockid> can be specified as the I<clockid> "
7897 "returned by a call to B<clock_getcpuclockid>(3)  or "
7898 "B<pthread_getcpuclockid>(3)."
7899 msgstr ""
7900
7901 #. type: Plain text
7902 #: build/C/man2/timer_create.2:101
7903 msgid ""
7904 "The I<sevp> argument points to a I<sigevent> structure that specifies how "
7905 "the caller should be notified when the timer expires.  For the definition "
7906 "and general details of this structure, see B<sigevent>(7)."
7907 msgstr ""
7908
7909 #. type: Plain text
7910 #: build/C/man2/timer_create.2:105
7911 msgid "The I<sevp.sigev_notify> field can have the following values:"
7912 msgstr ""
7913
7914 #. type: Plain text
7915 #: build/C/man2/timer_create.2:110
7916 msgid ""
7917 "Don't asynchronously notify when the timer expires.  Progress of the timer "
7918 "can be monitored using B<timer_gettime>(2)."
7919 msgstr ""
7920
7921 #. type: Plain text
7922 #: build/C/man2/timer_create.2:128
7923 msgid ""
7924 "Upon timer expiration, generate the signal I<sigev_signo> for the process.  "
7925 "See B<sigevent>(7)  for general details.  The I<si_code> field of the "
7926 "I<siginfo_t> structure will be set to B<SI_TIMER>.  At any point in time, at "
7927 "most one signal is queued to the process for a given timer; see "
7928 "B<timer_getoverrun>(2)  for more details."
7929 msgstr ""
7930
7931 #. type: Plain text
7932 #: build/C/man2/timer_create.2:136
7933 msgid ""
7934 "Upon timer expiration, invoke I<sigev_notify_function> as if it were the "
7935 "start function of a new thread.  See B<sigevent>(7)  for details."
7936 msgstr ""
7937
7938 #. type: Plain text
7939 #: build/C/man2/timer_create.2:150
7940 msgid ""
7941 "As for B<SIGEV_SIGNAL>, but the signal is targeted at the thread whose ID is "
7942 "given in I<sigev_notify_thread_id>, which must be a thread in the same "
7943 "process as the caller.  The I<sigev_notify_thread_id> field specifies a "
7944 "kernel thread ID, that is, the value returned by B<clone>(2)  or "
7945 "B<gettid>(2).  This flag is only intended for use by threading libraries."
7946 msgstr ""
7947
7948 #. type: Plain text
7949 #: build/C/man2/timer_create.2:165
7950 msgid ""
7951 "Specifying I<sevp> as NULL is equivalent to specifying a pointer to a "
7952 "I<sigevent> structure in which I<sigev_notify> is B<SIGEV_SIGNAL>, "
7953 "I<sigev_signo> is B<SIGALRM>, and I<sigev_value.sival_int> is the timer ID."
7954 msgstr ""
7955
7956 #. type: Plain text
7957 #: build/C/man2/timer_create.2:173
7958 msgid ""
7959 "On success, B<timer_create>()  returns 0, and the ID of the new timer is "
7960 "placed in I<*timerid>.  On failure, -1 is returned, and I<errno> is set to "
7961 "indicate the error."
7962 msgstr ""
7963
7964 #. type: Plain text
7965 #: build/C/man2/timer_create.2:177
7966 msgid "Temporary error during kernel allocation of timer structures."
7967 msgstr ""
7968
7969 #. type: Plain text
7970 #: build/C/man2/timer_create.2:185
7971 msgid ""
7972 "Clock ID, I<sigev_notify>, I<sigev_signo>, or I<sigev_notify_thread_id> is "
7973 "invalid."
7974 msgstr ""
7975
7976 #.  glibc layer: malloc()
7977 #. type: Plain text
7978 #: build/C/man2/timer_create.2:189
7979 msgid "Could not allocate memory."
7980 msgstr ""
7981
7982 #. type: Plain text
7983 #: build/C/man2/timer_create.2:191 build/C/man2/timer_delete.2:64 build/C/man2/timer_getoverrun.2:94
7984 msgid "This system call is available since Linux 2.6."
7985 msgstr ""
7986
7987 #. type: Plain text
7988 #: build/C/man2/timer_create.2:196
7989 msgid "A program may create multiple interval timers using B<timer_create>()."
7990 msgstr ""
7991
7992 #. type: Plain text
7993 #: build/C/man2/timer_create.2:201
7994 msgid ""
7995 "Timers are not inherited by the child of a B<fork>(2), and are disarmed and "
7996 "deleted during an B<execve>(2)."
7997 msgstr ""
7998
7999 #. type: Plain text
8000 #: build/C/man2/timer_create.2:209
8001 msgid ""
8002 "The kernel preallocates a \"queued real-time signal\" for each timer created "
8003 "using B<timer_create>().  Consequently, the number of timers is limited by "
8004 "the B<RLIMIT_SIGPENDING> resource limit (see B<setrlimit>(2))."
8005 msgstr ""
8006
8007 #. type: Plain text
8008 #: build/C/man2/timer_create.2:214
8009 msgid ""
8010 "The timers created by B<timer_create>()  are commonly known as \"POSIX "
8011 "(interval) timers\".  The POSIX timers API consists of the following "
8012 "interfaces:"
8013 msgstr ""
8014
8015 #. type: Plain text
8016 #: build/C/man2/timer_create.2:217
8017 msgid "B<timer_create>(): Create a timer."
8018 msgstr ""
8019
8020 #. type: Plain text
8021 #: build/C/man2/timer_create.2:220
8022 msgid "B<timer_settime>(2): Arm (start) or disarm (stop) a timer."
8023 msgstr ""
8024
8025 #. type: Plain text
8026 #: build/C/man2/timer_create.2:224
8027 msgid ""
8028 "B<timer_gettime>(2): Fetch the time remaining until the next expiration of a "
8029 "timer, along with the interval setting of the timer."
8030 msgstr ""
8031
8032 #. type: Plain text
8033 #: build/C/man2/timer_create.2:227
8034 msgid ""
8035 "B<timer_getoverrun>(2): Return the overrun count for the last timer "
8036 "expiration."
8037 msgstr ""
8038
8039 #. type: Plain text
8040 #: build/C/man2/timer_create.2:230
8041 msgid "B<timer_delete>(2): Disarm and delete a timer."
8042 msgstr ""
8043
8044 #. type: Plain text
8045 #: build/C/man2/timer_create.2:233
8046 msgid ""
8047 "Part of the implementation of the POSIX timers API is provided by glibc.  In "
8048 "particular:"
8049 msgstr ""
8050
8051 #. type: Plain text
8052 #: build/C/man2/timer_create.2:237
8053 msgid ""
8054 "The functionality for B<SIGEV_THREAD> is implemented within glibc, rather "
8055 "than the kernel."
8056 msgstr ""
8057
8058 #.  See the glibc source file kernel-posix-timers.h for the structure
8059 #.  that glibc uses to map userspace timer IDs to kernel timer IDs
8060 #.  The kernel-level timer ID is exposed via siginfo.si_tid.
8061 #. type: Plain text
8062 #: build/C/man2/timer_create.2:243
8063 msgid ""
8064 "The timer IDs presented at user level are maintained by glibc, which maps "
8065 "these IDs to the timer IDs employed by the kernel."
8066 msgstr ""
8067
8068 #. type: Plain text
8069 #: build/C/man2/timer_create.2:251
8070 msgid ""
8071 "The POSIX timers system calls first appeared in Linux 2.6.  Prior to this, "
8072 "glibc provided an incomplete userspace implementation (B<CLOCK_REALTIME> "
8073 "timers only) using POSIX threads, and current glibc falls back to this "
8074 "implementation on systems running pre-2.6 Linux kernels."
8075 msgstr ""
8076
8077 #. type: Plain text
8078 #: build/C/man2/timer_create.2:263
8079 msgid ""
8080 "The program below takes two arguments: a sleep period in seconds, and a "
8081 "timer frequency in nanoseconds.  The program establishes a handler for the "
8082 "signal it uses for the timer, blocks that signal, creates and arms a timer "
8083 "that expires with the given frequency, sleeps for the specified number of "
8084 "seconds, and then unblocks the timer signal.  Assuming that the timer "
8085 "expired at least once while the program slept, the signal handler will be "
8086 "invoked, and the handler displays some information about the timer "
8087 "notification.  The program terminates after one invocation of the signal "
8088 "handler."
8089 msgstr ""
8090
8091 #. type: Plain text
8092 #: build/C/man2/timer_create.2:268
8093 msgid ""
8094 "In the following example run, the program sleeps for 1 second, after "
8095 "creating a timer that has a frequency of 100 nanoseconds.  By the time the "
8096 "signal is unblocked and delivered, there have been around ten million "
8097 "overruns."
8098 msgstr ""
8099
8100 #. type: Plain text
8101 #: build/C/man2/timer_create.2:280
8102 #, no-wrap
8103 msgid ""
8104 "$ B<./a.out 1 100>\n"
8105 "Establishing handler for signal 34\n"
8106 "Blocking signal 34\n"
8107 "timer ID is 0x804c008\n"
8108 "Sleeping for 1 seconds\n"
8109 "Unblocking signal 34\n"
8110 "Caught signal 34\n"
8111 "    sival_ptr = 0xbfb174f4;     *sival_ptr = 0x804c008\n"
8112 "    overrun count = 10004886\n"
8113 msgstr ""
8114
8115 #. type: SS
8116 #: build/C/man2/timer_create.2:282
8117 #, no-wrap
8118 msgid "Program Source"
8119 msgstr ""
8120
8121 #. type: Plain text
8122 #: build/C/man2/timer_create.2:290
8123 #, no-wrap
8124 msgid ""
8125 "#include E<lt>stdlib.hE<gt>\n"
8126 "#include E<lt>unistd.hE<gt>\n"
8127 "#include E<lt>stdio.hE<gt>\n"
8128 "#include E<lt>signal.hE<gt>\n"
8129 "#include E<lt>time.hE<gt>\n"
8130 msgstr ""
8131
8132 #. type: Plain text
8133 #: build/C/man2/timer_create.2:293
8134 #, no-wrap
8135 msgid ""
8136 "#define CLOCKID CLOCK_REALTIME\n"
8137 "#define SIG SIGRTMIN\n"
8138 msgstr ""
8139
8140 #. type: Plain text
8141 #: build/C/man2/timer_create.2:296
8142 #, no-wrap
8143 msgid ""
8144 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
8145 "                        } while (0)\n"
8146 msgstr ""
8147
8148 #. type: Plain text
8149 #: build/C/man2/timer_create.2:302
8150 #, no-wrap
8151 msgid ""
8152 "static void\n"
8153 "print_siginfo(siginfo_t *si)\n"
8154 "{\n"
8155 "    timer_t *tidp;\n"
8156 "    int or;\n"
8157 msgstr ""
8158
8159 #. type: Plain text
8160 #: build/C/man2/timer_create.2:304
8161 #, no-wrap
8162 msgid "    tidp = si-E<gt>si_value.sival_ptr;\n"
8163 msgstr ""
8164
8165 #. type: Plain text
8166 #: build/C/man2/timer_create.2:307
8167 #, no-wrap
8168 msgid ""
8169 "    printf(\"    sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n"
8170 "    printf(\"    *sival_ptr = 0x%lx\\en\", (long) *tidp);\n"
8171 msgstr ""
8172
8173 #. type: Plain text
8174 #: build/C/man2/timer_create.2:314
8175 #, no-wrap
8176 msgid ""
8177 "    or = timer_getoverrun(*tidp);\n"
8178 "    if (or == -1)\n"
8179 "        errExit(\"timer_getoverrun\");\n"
8180 "    else\n"
8181 "        printf(\"    overrun count = %d\\en\", or);\n"
8182 "}\n"
8183 msgstr ""
8184
8185 #. type: Plain text
8186 #: build/C/man2/timer_create.2:321
8187 #, no-wrap
8188 msgid ""
8189 "static void\n"
8190 "handler(int sig, siginfo_t *si, void *uc)\n"
8191 "{\n"
8192 "    /* Note: calling printf() from a signal handler is not\n"
8193 "       strictly correct, since printf() is not async-signal-safe;\n"
8194 "       see signal(7) */\n"
8195 msgstr ""
8196
8197 #. type: Plain text
8198 #: build/C/man2/timer_create.2:326
8199 #, no-wrap
8200 msgid ""
8201 "    printf(\"Caught signal %d\\en\", sig);\n"
8202 "    print_siginfo(si);\n"
8203 "    signal(sig, SIG_IGN);\n"
8204 "}\n"
8205 msgstr ""
8206
8207 #. type: Plain text
8208 #: build/C/man2/timer_create.2:336
8209 #, no-wrap
8210 msgid ""
8211 "int\n"
8212 "main(int argc, char *argv[])\n"
8213 "{\n"
8214 "    timer_t timerid;\n"
8215 "    struct sigevent sev;\n"
8216 "    struct itimerspec its;\n"
8217 "    long long freq_nanosecs;\n"
8218 "    sigset_t mask;\n"
8219 "    struct sigaction sa;\n"
8220 msgstr ""
8221
8222 #. type: Plain text
8223 #: build/C/man2/timer_create.2:342
8224 #, no-wrap
8225 msgid ""
8226 "    if (argc != 3) {\n"
8227 "        fprintf(stderr, \"Usage: %s E<lt>sleep-secsE<gt> "
8228 "E<lt>freq-nanosecsE<gt>\\en\",\n"
8229 "                argv[0]);\n"
8230 "        exit(EXIT_FAILURE);\n"
8231 "    }\n"
8232 msgstr ""
8233
8234 #. type: Plain text
8235 #: build/C/man2/timer_create.2:344
8236 #, no-wrap
8237 msgid "    /* Establish handler for timer signal */\n"
8238 msgstr ""
8239
8240 #. type: Plain text
8241 #: build/C/man2/timer_create.2:351
8242 #, no-wrap
8243 msgid ""
8244 "    printf(\"Establishing handler for signal %d\\en\", SIG);\n"
8245 "    sa.sa_flags = SA_SIGINFO;\n"
8246 "    sa.sa_sigaction = handler;\n"
8247 "    sigemptyset(&sa.sa_mask);\n"
8248 "    if (sigaction(SIG, &sa, NULL) == -1)\n"
8249 "        errExit(\"sigaction\");\n"
8250 msgstr ""
8251
8252 #. type: Plain text
8253 #: build/C/man2/timer_create.2:353
8254 #, no-wrap
8255 msgid "    /* Block timer signal temporarily */\n"
8256 msgstr ""
8257
8258 #. type: Plain text
8259 #: build/C/man2/timer_create.2:359
8260 #, no-wrap
8261 msgid ""
8262 "    printf(\"Blocking signal %d\\en\", SIG);\n"
8263 "    sigemptyset(&mask);\n"
8264 "    sigaddset(&mask, SIG);\n"
8265 "    if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n"
8266 "        errExit(\"sigprocmask\");\n"
8267 msgstr ""
8268
8269 #. type: Plain text
8270 #: build/C/man2/timer_create.2:361
8271 #, no-wrap
8272 msgid "    /* Create the timer */\n"
8273 msgstr ""
8274
8275 #. type: Plain text
8276 #: build/C/man2/timer_create.2:367
8277 #, no-wrap
8278 msgid ""
8279 "    sev.sigev_notify = SIGEV_SIGNAL;\n"
8280 "    sev.sigev_signo = SIG;\n"
8281 "    sev.sigev_value.sival_ptr = &timerid;\n"
8282 "    if (timer_create(CLOCKID, &sev, &timerid) == -1)\n"
8283 "        errExit(\"timer_create\");\n"
8284 msgstr ""
8285
8286 #. type: Plain text
8287 #: build/C/man2/timer_create.2:369
8288 #, no-wrap
8289 msgid "    printf(\"timer ID is 0x%lx\\en\", (long) timerid);\n"
8290 msgstr ""
8291
8292 #. type: Plain text
8293 #: build/C/man2/timer_create.2:371
8294 #, no-wrap
8295 msgid "    /* Start the timer */\n"
8296 msgstr ""
8297
8298 #. type: Plain text
8299 #: build/C/man2/timer_create.2:377
8300 #, no-wrap
8301 msgid ""
8302 "    freq_nanosecs = atoll(argv[2]);\n"
8303 "    its.it_value.tv_sec = freq_nanosecs / 1000000000;\n"
8304 "    its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n"
8305 "    its.it_interval.tv_sec = its.it_value.tv_sec;\n"
8306 "    its.it_interval.tv_nsec = its.it_value.tv_nsec;\n"
8307 msgstr ""
8308
8309 #. type: Plain text
8310 #: build/C/man2/timer_create.2:380
8311 #, no-wrap
8312 msgid ""
8313 "    if (timer_settime(timerid, 0, &its, NULL) == -1)\n"
8314 "         errExit(\"timer_settime\");\n"
8315 msgstr ""
8316
8317 #. type: Plain text
8318 #: build/C/man2/timer_create.2:383
8319 #, no-wrap
8320 msgid ""
8321 "    /* Sleep for a while; meanwhile, the timer may expire\n"
8322 "       multiple times */\n"
8323 msgstr ""
8324
8325 #. type: Plain text
8326 #: build/C/man2/timer_create.2:386
8327 #, no-wrap
8328 msgid ""
8329 "    printf(\"Sleeping for %d seconds\\en\", atoi(argv[1]));\n"
8330 "    sleep(atoi(argv[1]));\n"
8331 msgstr ""
8332
8333 #. type: Plain text
8334 #: build/C/man2/timer_create.2:389
8335 #, no-wrap
8336 msgid ""
8337 "    /* Unlock the timer signal, so that timer notification\n"
8338 "       can be delivered */\n"
8339 msgstr ""
8340
8341 #. type: Plain text
8342 #: build/C/man2/timer_create.2:393
8343 #, no-wrap
8344 msgid ""
8345 "    printf(\"Unblocking signal %d\\en\", SIG);\n"
8346 "    if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n"
8347 "        errExit(\"sigprocmask\");\n"
8348 msgstr ""
8349
8350 #. type: Plain text
8351 #: build/C/man2/timer_create.2:396 build/C/man2/timerfd_create.2:533
8352 #, no-wrap
8353 msgid ""
8354 "    exit(EXIT_SUCCESS);\n"
8355 "}\n"
8356 msgstr ""
8357
8358 #. type: Plain text
8359 #: build/C/man2/timer_create.2:410
8360 msgid ""
8361 "B<clock_gettime>(2), B<setitimer>(2), B<timer_delete>(2), "
8362 "B<timer_getoverrun>(2), B<timer_settime>(2), B<timerfd_create>(2), "
8363 "B<clock_getcpuclockid>(3), B<pthread_getcpuclockid>(3), B<pthreads>(7), "
8364 "B<sigevent>(7), B<signal>(7), B<time>(7)"
8365 msgstr ""
8366
8367 #. type: TH
8368 #: build/C/man2/timer_delete.2:23
8369 #, no-wrap
8370 msgid "TIMER_DELETE"
8371 msgstr ""
8372
8373 #. type: TH
8374 #: build/C/man2/timer_delete.2:23 build/C/man2/timer_getoverrun.2:23 build/C/man2/timer_settime.2:23
8375 #, no-wrap
8376 msgid "2009-02-20"
8377 msgstr ""
8378
8379 #. type: Plain text
8380 #: build/C/man2/timer_delete.2:26
8381 msgid "timer_delete - delete a POSIX per-process timer"
8382 msgstr ""
8383
8384 #. type: Plain text
8385 #: build/C/man2/timer_delete.2:29 build/C/man2/timer_getoverrun.2:29 build/C/man2/timer_settime.2:30
8386 #, no-wrap
8387 msgid "B<#include E<lt>time.hE<gt>>\n"
8388 msgstr ""
8389
8390 #. type: Plain text
8391 #: build/C/man2/timer_delete.2:31
8392 #, no-wrap
8393 msgid "B<int timer_delete(timer_t >I<timerid>B<);>\n"
8394 msgstr ""
8395
8396 #. type: Plain text
8397 #: build/C/man2/timer_delete.2:42
8398 msgid "B<timer_delete>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8399 msgstr ""
8400
8401 #. type: Plain text
8402 #: build/C/man2/timer_delete.2:50
8403 msgid ""
8404 "B<timer_delete>()  deletes the timer whose ID is given in I<timerid>.  If "
8405 "the timer was armed at the time of this call, it is disarmed before being "
8406 "deleted.  The treatment of any pending signal generated by the deleted timer "
8407 "is unspecified."
8408 msgstr ""
8409
8410 #. type: Plain text
8411 #: build/C/man2/timer_delete.2:57
8412 msgid ""
8413 "On success, B<timer_delete>()  returns 0.  On failure, -1 is returned, and "
8414 "I<errno> is set to indicate the error."
8415 msgstr ""
8416
8417 #. type: Plain text
8418 #: build/C/man2/timer_delete.2:62 build/C/man2/timer_getoverrun.2:92
8419 msgid "I<timerid> is not a valid timer ID."
8420 msgstr ""
8421
8422 #. type: Plain text
8423 #: build/C/man2/timer_delete.2:72
8424 msgid ""
8425 "B<clock_gettime>(2), B<timer_create>(2), B<timer_getoverrun>(2), "
8426 "B<timer_settime>(2), B<time>(7)"
8427 msgstr ""
8428
8429 #. type: TH
8430 #: build/C/man2/timer_getoverrun.2:23
8431 #, no-wrap
8432 msgid "TIMER_GETOVERRUN"
8433 msgstr ""
8434
8435 #. type: Plain text
8436 #: build/C/man2/timer_getoverrun.2:26
8437 msgid "timer_getoverrun - get overrun count for a POSIX per-process timer"
8438 msgstr ""
8439
8440 #. type: Plain text
8441 #: build/C/man2/timer_getoverrun.2:31
8442 #, no-wrap
8443 msgid "B<int timer_getoverrun(timer_t >I<timerid>B<);>\n"
8444 msgstr ""
8445
8446 #. type: Plain text
8447 #: build/C/man2/timer_getoverrun.2:42
8448 msgid "B<timer_getoverrun>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8449 msgstr ""
8450
8451 #. type: Plain text
8452 #: build/C/man2/timer_getoverrun.2:53
8453 msgid ""
8454 "B<timer_getoverrun>()  returns the \"overrun count\" for the timer referred "
8455 "to by I<timerid>.  An application can use the overrun count to accurately "
8456 "calculate the number of timer expirations that would have occurred over a "
8457 "given time interval.  Timer overruns can occur both when receiving "
8458 "expiration notifications via signals (B<SIGEV_SIGNAL>), and via threads "
8459 "(B<SIGEV_THREAD>)."
8460 msgstr ""
8461
8462 #. type: Plain text
8463 #: build/C/man2/timer_getoverrun.2:73
8464 msgid ""
8465 "When expiration notifications are delivered via a signal, overruns can occur "
8466 "as follows.  Regardless of whether or not a real-time signal is used for "
8467 "timer notifications, the system queues at most one signal per timer.  (This "
8468 "is the behavior specified by POSIX.1-2001.  The alternative, queuing one "
8469 "signal for each timer expiration, could easily result in overflowing the "
8470 "allowed limits for queued signals on the system.)  Because of system "
8471 "scheduling delays, or because the signal may be temporarily blocked, there "
8472 "can be a delay between the time when the notification signal is generated "
8473 "and the time when it is delivered (e.g., caught by a signal handler) or "
8474 "accepted (e.g., using B<sigwaitinfo>(2)).  In this interval, further timer "
8475 "expirations may occur.  The timer overrun count is the number of additional "
8476 "timer expirations that occurred between the time when the signal was "
8477 "generated and when it was delivered or accepted."
8478 msgstr ""
8479
8480 #. type: Plain text
8481 #: build/C/man2/timer_getoverrun.2:79
8482 msgid ""
8483 "Timer overruns can also occur when expiration notifications are delivered "
8484 "via invocation of a thread, since there may be an arbitrary delay between an "
8485 "expiration of the timer and the invocation of the notification thread, and "
8486 "in that delay interval, additional timer expirations may occur"
8487 msgstr ""
8488
8489 #. type: Plain text
8490 #: build/C/man2/timer_getoverrun.2:87
8491 msgid ""
8492 "On success, B<timer_getoverrun>()  returns the overrun count of the "
8493 "specified timer; this count may be 0 if no overruns have occurred.  On "
8494 "failure, -1 is returned, and I<errno> is set to indicate the error."
8495 msgstr ""
8496
8497 #. type: Plain text
8498 #: build/C/man2/timer_getoverrun.2:108
8499 msgid ""
8500 "When timer notifications are delivered via signals (B<SIGEV_SIGNAL>), on "
8501 "Linux it is also possible to obtain the overrun count via the I<si_overrun> "
8502 "field of the I<siginfo_t> structure (see B<sigaction>(2)).  This allows an "
8503 "application to avoid the overhead of making a system call to obtain the "
8504 "overrun count, but is a nonportable extension to POSIX.1-2001."
8505 msgstr ""
8506
8507 #.  FIXME . Austin bug filed, 11 Feb 09
8508 #. type: Plain text
8509 #: build/C/man2/timer_getoverrun.2:112
8510 msgid ""
8511 "POSIX.1-2001 only discusses timer overruns in the context of timer "
8512 "notifications using signals."
8513 msgstr ""
8514
8515 #.  Bug filed: http://bugzilla.kernel.org/show_bug.cgi?id=12665
8516 #.  http://thread.gmane.org/gmane.linux.kernel/113276/
8517 #. type: Plain text
8518 #: build/C/man2/timer_getoverrun.2:125
8519 msgid ""
8520 "POSIX.1-2001 specifies that if the timer overrun count is equal to or "
8521 "greater than an implementation-defined maximum, B<DELAYTIMER_MAX>, then "
8522 "B<timer_getoverrun>()  should return B<DELAYTIMER_MAX>.  However, Linux does "
8523 "not implement this feature: instead, if the timer overrun value exceeds the "
8524 "maximum representable integer, the counter cycles, starting once more from "
8525 "low values."
8526 msgstr ""
8527
8528 #. type: Plain text
8529 #: build/C/man2/timer_getoverrun.2:128 build/C/man2/timer_settime.2:208
8530 msgid "See B<timer_create>(2)."
8531 msgstr ""
8532
8533 #. type: Plain text
8534 #: build/C/man2/timer_getoverrun.2:138
8535 msgid ""
8536 "B<clock_gettime>(2), B<sigaction>(2), B<signalfd>(2), B<sigwaitinfo>(2), "
8537 "B<timer_create>(2), B<timer_delete>(2), B<timer_settime>(2), B<signal>(7), "
8538 "B<time>(7)"
8539 msgstr ""
8540
8541 #. type: TH
8542 #: build/C/man2/timer_settime.2:23
8543 #, no-wrap
8544 msgid "TIMER_SETTIME"
8545 msgstr ""
8546
8547 #. type: Plain text
8548 #: build/C/man2/timer_settime.2:27
8549 msgid ""
8550 "timer_settime, timer_gettime - arm/disarm and fetch state of POSIX "
8551 "per-process timer"
8552 msgstr ""
8553
8554 #. type: Plain text
8555 #: build/C/man2/timer_settime.2:35
8556 #, no-wrap
8557 msgid ""
8558 "B<int timer_settime(timer_t >I<timerid>B<, int >I<flags>B<,>\n"
8559 "B<                  const struct itimerspec *>I<new_value>B<,>\n"
8560 "B<                  struct itimerspec * >I<old_value>B<);>\n"
8561 "B<int timer_gettime(timer_t >I<timerid>B<, struct itimerspec "
8562 "*>I<curr_value>B<);>\n"
8563 msgstr ""
8564
8565 #. type: Plain text
8566 #: build/C/man2/timer_settime.2:47
8567 msgid "B<timer_settime>(), B<timer_gettime>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L"
8568 msgstr ""
8569
8570 #. type: Plain text
8571 #: build/C/man2/timer_settime.2:60
8572 msgid ""
8573 "B<timer_settime>()  arms or disarms the timer identified by I<timerid>.  The "
8574 "I<new_value> argument is an I<itimerspec> structure that specifies the new "
8575 "initial value and the new interval for the timer.  The I<itimerspec> "
8576 "structure is defined as follows:"
8577 msgstr ""
8578
8579 #. type: Plain text
8580 #: build/C/man2/timer_settime.2:67 build/C/man2/timerfd_create.2:127
8581 #, no-wrap
8582 msgid ""
8583 "struct timespec {\n"
8584 "    time_t tv_sec;                /* Seconds */\n"
8585 "    long   tv_nsec;               /* Nanoseconds */\n"
8586 "};\n"
8587 msgstr ""
8588
8589 #. type: Plain text
8590 #: build/C/man2/timer_settime.2:72
8591 #, no-wrap
8592 msgid ""
8593 "struct itimerspec {\n"
8594 "    struct timespec it_interval;  /* Timer interval */\n"
8595 "    struct timespec it_value;     /* Initial expiration */\n"
8596 "};\n"
8597 msgstr ""
8598
8599 #. type: Plain text
8600 #: build/C/man2/timer_settime.2:84
8601 msgid ""
8602 "Each of the substructures of the I<itimerspec> structure is a I<timespec> "
8603 "structure that allows a time value to be specified in seconds and "
8604 "nanoseconds.  These time values are measured according to the clock that was "
8605 "specified when the timer was created by B<timer_create>(2)"
8606 msgstr ""
8607
8608 #. type: Plain text
8609 #: build/C/man2/timer_settime.2:98
8610 msgid ""
8611 "If I<new_value-E<gt>it_value> specifies a nonzero value (i.e., either "
8612 "subfield is nonzero), then B<timer_settime>()  arms (starts) the timer, "
8613 "setting it to initially expire at the given time.  (If the timer was already "
8614 "armed, then the previous settings are overwritten.)  If "
8615 "I<new_value-E<gt>it_value> specifies a zero value (i.e., both subfields are "
8616 "zero), then the timer is disarmed."
8617 msgstr ""
8618
8619 #. type: Plain text
8620 #: build/C/man2/timer_settime.2:110
8621 msgid ""
8622 "The I<new_value-E<gt>it_interval> field specifies the period of the timer, "
8623 "in seconds and nanoseconds.  If this field is nonzero, then each time that "
8624 "an armed timer expires, the timer is reloaded from the value specified in "
8625 "I<new_value-E<gt>it_interval>.  If I<new_value-E<gt>it_interval> specifies a "
8626 "zero value then the timer expires just once, at the time specified by "
8627 "I<it_value>."
8628 msgstr ""
8629
8630 #.  By experiment: the overrun count is set correctly, for CLOCK_REALTIME.
8631 #. type: Plain text
8632 #: build/C/man2/timer_settime.2:131
8633 msgid ""
8634 "By default, the initial expiration time specified in "
8635 "I<new_value-E<gt>it_value> is interpreted relative to the current time on "
8636 "the timer's clock at the time of the call.  This can be modified by "
8637 "specifying B<TIMER_ABSTIME> in I<flags>, in which case "
8638 "I<new_value-E<gt>it_value> is interpreted as an absolute value as measured "
8639 "on the timer's clock; that is, the timer will expire when the clock value "
8640 "reaches the value specified by I<new_value-E<gt>it_value>.  If the specified "
8641 "absolute time has already passed, then the timer expires immediately, and "
8642 "the overrun count (see B<timer_getoverrun>(2))  will be set correctly."
8643 msgstr ""
8644
8645 #.  Similar remarks might apply with respect to process and thread CPU time
8646 #.  clocks, but these clocks are not currently (2.6.28) settable on Linux.
8647 #. type: Plain text
8648 #: build/C/man2/timer_settime.2:141
8649 msgid ""
8650 "If the value of the B<CLOCK_REALTIME> clock is adjusted while an absolute "
8651 "timer based on that clock is armed, then the expiration of the timer will be "
8652 "appropriately adjusted.  Adjustments to the B<CLOCK_REALTIME> clock have no "
8653 "effect on relative timers based on that clock."
8654 msgstr ""
8655
8656 #. type: Plain text
8657 #: build/C/man2/timer_settime.2:149
8658 msgid ""
8659 "If I<old_value> is not NULL, then it returns the previous interval of the "
8660 "timer (in I<old_value-E<gt>it_interval>)  and the amount of time until the "
8661 "timer would previously have next expired (in I<old_value-E<gt>it_value>)."
8662 msgstr ""
8663
8664 #. type: Plain text
8665 #: build/C/man2/timer_settime.2:169
8666 msgid ""
8667 "B<timer_gettime>()  returns the time until next expiration, and the "
8668 "interval, for the timer specified by I<timerid>, in the buffer pointed to by "
8669 "I<curr_value>.  The time remaining until the next timer expiration is "
8670 "returned in I<curr_value-E<gt>it_value>; this is always a relative value, "
8671 "regardless of whether the B<TIMER_ABSTIME> flag was used when arming the "
8672 "timer.  If the value returned in I<curr_value-E<gt>it_value> is zero, then "
8673 "the timer is currently disarmed.  The timer interval is returned in "
8674 "I<curr_value-E<gt>it_interval>.  If the value returned in "
8675 "I<curr_value-E<gt>it_interval> is zero, then this is a \"one-shot\" timer."
8676 msgstr ""
8677
8678 #. type: Plain text
8679 #: build/C/man2/timer_settime.2:178
8680 msgid ""
8681 "On success, B<timer_settime>()  and B<timer_gettime>()  return 0.  On error, "
8682 "-1 is returned, and I<errno> is set to indicate the error."
8683 msgstr ""
8684
8685 #. type: Plain text
8686 #: build/C/man2/timer_settime.2:180
8687 msgid "These functions may fail with the following errors:"
8688 msgstr ""
8689
8690 #. type: Plain text
8691 #: build/C/man2/timer_settime.2:187
8692 msgid "I<new_value>, I<old_value>, or I<curr_value> is not a valid pointer."
8693 msgstr ""
8694
8695 #.  FIXME . eventually: invalid value in flags
8696 #. type: Plain text
8697 #: build/C/man2/timer_settime.2:192
8698 msgid "I<timerid> is invalid."
8699 msgstr ""
8700
8701 #. type: Plain text
8702 #: build/C/man2/timer_settime.2:195
8703 msgid "B<timer_settime>()  may fail with the following errors:"
8704 msgstr ""
8705
8706 #. type: Plain text
8707 #: build/C/man2/timer_settime.2:201
8708 msgid ""
8709 "I<new_value.it_value> is negative; or I<new_value.it_value.tv_nsec> is "
8710 "negative or greater than 999,999,999."
8711 msgstr ""
8712
8713 #. type: Plain text
8714 #: build/C/man2/timer_settime.2:203
8715 msgid "These system calls are available since Linux 2.6."
8716 msgstr ""
8717
8718 #. type: Plain text
8719 #: build/C/man2/timer_settime.2:212
8720 msgid "B<timer_create>(2), B<timer_getoverrun>(2), B<time>(7)"
8721 msgstr ""
8722
8723 #. type: TH
8724 #: build/C/man2/timerfd_create.2:20
8725 #, no-wrap
8726 msgid "TIMERFD_CREATE"
8727 msgstr ""
8728
8729 #. type: TH
8730 #: build/C/man2/timerfd_create.2:20
8731 #, no-wrap
8732 msgid "2011-09-14"
8733 msgstr ""
8734
8735 #. type: Plain text
8736 #: build/C/man2/timerfd_create.2:24
8737 msgid ""
8738 "timerfd_create, timerfd_settime, timerfd_gettime - timers that notify via "
8739 "file descriptors"
8740 msgstr ""
8741
8742 #. type: Plain text
8743 #: build/C/man2/timerfd_create.2:27
8744 #, no-wrap
8745 msgid "B<#include E<lt>sys/timerfd.hE<gt>>\n"
8746 msgstr ""
8747
8748 #. type: Plain text
8749 #: build/C/man2/timerfd_create.2:29
8750 #, no-wrap
8751 msgid "B<int timerfd_create(int >I<clockid>B<, int >I<flags>B<);>\n"
8752 msgstr ""
8753
8754 #. type: Plain text
8755 #: build/C/man2/timerfd_create.2:33
8756 #, no-wrap
8757 msgid ""
8758 "B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n"
8759 "B<                    const struct itimerspec *>I<new_value>B<,>\n"
8760 "B<                    struct itimerspec *>I<old_value>B<);>\n"
8761 msgstr ""
8762
8763 #. type: Plain text
8764 #: build/C/man2/timerfd_create.2:35
8765 #, no-wrap
8766 msgid "B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n"
8767 msgstr ""
8768
8769 #. type: Plain text
8770 #: build/C/man2/timerfd_create.2:48
8771 msgid ""
8772 "These system calls create and operate on a timer that delivers timer "
8773 "expiration notifications via a file descriptor.  They provide an alternative "
8774 "to the use of B<setitimer>(2)  or B<timer_create>(2), with the advantage "
8775 "that the file descriptor may be monitored by B<select>(2), B<poll>(2), and "
8776 "B<epoll>(7)."
8777 msgstr ""
8778
8779 #. type: Plain text
8780 #: build/C/man2/timerfd_create.2:60
8781 msgid ""
8782 "The use of these three system calls is analogous to the use of "
8783 "B<timer_create>(2), B<timer_settime>(2), and B<timer_gettime>(2).  (There is "
8784 "no analog of B<timer_getoverrun>(2), since that functionality is provided by "
8785 "B<read>(2), as described below.)"
8786 msgstr ""
8787
8788 #. type: SS
8789 #: build/C/man2/timerfd_create.2:60
8790 #, no-wrap
8791 msgid "timerfd_create()"
8792 msgstr ""
8793
8794 #. type: Plain text
8795 #: build/C/man2/timerfd_create.2:79
8796 msgid ""
8797 "B<timerfd_create>()  creates a new timer object, and returns a file "
8798 "descriptor that refers to that timer.  The I<clockid> argument specifies the "
8799 "clock that is used to mark the progress of the timer, and must be either "
8800 "B<CLOCK_REALTIME> or B<CLOCK_MONOTONIC>.  B<CLOCK_REALTIME> is a settable "
8801 "system-wide clock.  B<CLOCK_MONOTONIC> is a nonsettable clock that is not "
8802 "affected by discontinuous changes in the system clock (e.g., manual changes "
8803 "to system time).  The current value of each of these clocks can be retrieved "
8804 "using B<clock_gettime>(2)."
8805 msgstr ""
8806
8807 #. type: Plain text
8808 #: build/C/man2/timerfd_create.2:84
8809 msgid ""
8810 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
8811 "I<flags> to change the behavior of B<timerfd_create>():"
8812 msgstr ""
8813
8814 #. type: TP
8815 #: build/C/man2/timerfd_create.2:84
8816 #, no-wrap
8817 msgid "B<TFD_NONBLOCK>"
8818 msgstr ""
8819
8820 #. type: TP
8821 #: build/C/man2/timerfd_create.2:92
8822 #, no-wrap
8823 msgid "B<TFD_CLOEXEC>"
8824 msgstr ""
8825
8826 #. type: Plain text
8827 #: build/C/man2/timerfd_create.2:106
8828 msgid ""
8829 "In Linux versions up to and including 2.6.26, I<flags> must be specified as "
8830 "zero."
8831 msgstr ""
8832
8833 #. type: SS
8834 #: build/C/man2/timerfd_create.2:106
8835 #, no-wrap
8836 msgid "timerfd_settime()"
8837 msgstr ""
8838
8839 #. type: Plain text
8840 #: build/C/man2/timerfd_create.2:111
8841 msgid ""
8842 "B<timerfd_settime>()  arms (starts) or disarms (stops)  the timer referred "
8843 "to by the file descriptor I<fd>."
8844 msgstr ""
8845
8846 #. type: Plain text
8847 #: build/C/man2/timerfd_create.2:120
8848 msgid ""
8849 "The I<new_value> argument specifies the initial expiration and interval for "
8850 "the timer.  The I<itimer> structure used for this argument contains two "
8851 "fields, each of which is in turn a structure of type I<timespec>:"
8852 msgstr ""
8853
8854 #. type: Plain text
8855 #: build/C/man2/timerfd_create.2:132
8856 #, no-wrap
8857 msgid ""
8858 "struct itimerspec {\n"
8859 "    struct timespec it_interval;  /* Interval for periodic timer */\n"
8860 "    struct timespec it_value;     /* Initial expiration */\n"
8861 "};\n"
8862 msgstr ""
8863
8864 #. type: Plain text
8865 #: build/C/man2/timerfd_create.2:144
8866 msgid ""
8867 "I<new_value.it_value> specifies the initial expiration of the timer, in "
8868 "seconds and nanoseconds.  Setting either field of I<new_value.it_value> to a "
8869 "nonzero value arms the timer.  Setting both fields of I<new_value.it_value> "
8870 "to zero disarms the timer."
8871 msgstr ""
8872
8873 #. type: Plain text
8874 #: build/C/man2/timerfd_create.2:153
8875 msgid ""
8876 "Setting one or both fields of I<new_value.it_interval> to nonzero values "
8877 "specifies the period, in seconds and nanoseconds, for repeated timer "
8878 "expirations after the initial expiration.  If both fields of "
8879 "I<new_value.it_interval> are zero, the timer expires just once, at the time "
8880 "specified by I<new_value.it_value>."
8881 msgstr ""
8882
8883 #. type: Plain text
8884 #: build/C/man2/timerfd_create.2:169
8885 msgid ""
8886 "The I<flags> argument is either 0, to start a relative timer "
8887 "(I<new_value.it_value> specifies a time relative to the current value of the "
8888 "clock specified by I<clockid>), or B<TFD_TIMER_ABSTIME>, to start an "
8889 "absolute timer (I<new_value.it_value> specifies an absolute time for the "
8890 "clock specified by I<clockid>; that is, the timer will expire when the value "
8891 "of that clock reaches the value specified in I<new_value.it_value>)."
8892 msgstr ""
8893
8894 #. type: Plain text
8895 #: build/C/man2/timerfd_create.2:180
8896 msgid ""
8897 "If the I<old_value> argument is not NULL, then the I<itimerspec> structure "
8898 "that it points to is used to return the setting of the timer that was "
8899 "current at the time of the call; see the description of B<timerfd_gettime>()  "
8900 "following."
8901 msgstr ""
8902
8903 #. type: SS
8904 #: build/C/man2/timerfd_create.2:180
8905 #, no-wrap
8906 msgid "timerfd_gettime()"
8907 msgstr ""
8908
8909 #. type: Plain text
8910 #: build/C/man2/timerfd_create.2:189
8911 msgid ""
8912 "B<timerfd_gettime>()  returns, in I<curr_value>, an I<itimerspec> structure "
8913 "that contains the current setting of the timer referred to by the file "
8914 "descriptor I<fd>."
8915 msgstr ""
8916
8917 #. type: Plain text
8918 #: build/C/man2/timerfd_create.2:199
8919 msgid ""
8920 "The I<it_value> field returns the amount of time until the timer will next "
8921 "expire.  If both fields of this structure are zero, then the timer is "
8922 "currently disarmed.  This field always contains a relative value, regardless "
8923 "of whether the B<TFD_TIMER_ABSTIME> flag was specified when setting the "
8924 "timer."
8925 msgstr ""
8926
8927 #. type: Plain text
8928 #: build/C/man2/timerfd_create.2:206
8929 msgid ""
8930 "The I<it_interval> field returns the interval of the timer.  If both fields "
8931 "of this structure are zero, then the timer is set to expire just once, at "
8932 "the time specified by I<curr_value.it_value>."
8933 msgstr ""
8934
8935 #. type: SS
8936 #: build/C/man2/timerfd_create.2:206
8937 #, no-wrap
8938 msgid "Operating on a timer file descriptor"
8939 msgstr ""
8940
8941 #. type: Plain text
8942 #: build/C/man2/timerfd_create.2:210
8943 msgid ""
8944 "The file descriptor returned by B<timerfd_create>()  supports the following "
8945 "operations:"
8946 msgstr ""
8947
8948 #. type: Plain text
8949 #: build/C/man2/timerfd_create.2:224
8950 msgid ""
8951 "If the timer has already expired one or more times since its settings were "
8952 "last modified using B<timerfd_settime>(), or since the last successful "
8953 "B<read>(2), then the buffer given to B<read>(2)  returns an unsigned 8-byte "
8954 "integer (I<uint64_t>)  containing the number of expirations that have "
8955 "occurred.  (The returned value is in host byte order, i.e., the native byte "
8956 "order for integers on the host machine.)"
8957 msgstr ""
8958
8959 #. type: Plain text
8960 #: build/C/man2/timerfd_create.2:237
8961 msgid ""
8962 "If no timer expirations have occurred at the time of the B<read>(2), then "
8963 "the call either blocks until the next timer expiration, or fails with the "
8964 "error B<EAGAIN> if the file descriptor has been made nonblocking (via the "
8965 "use of the B<fcntl>(2)  B<F_SETFL> operation to set the B<O_NONBLOCK> flag)."
8966 msgstr ""
8967
8968 #. type: Plain text
8969 #: build/C/man2/timerfd_create.2:243
8970 msgid ""
8971 "A B<read>(2)  will fail with the error B<EINVAL> if the size of the supplied "
8972 "buffer is less than 8 bytes."
8973 msgstr ""
8974
8975 #. type: Plain text
8976 #: build/C/man2/timerfd_create.2:254
8977 msgid ""
8978 "The file descriptor is readable (the B<select>(2)  I<readfds> argument; the "
8979 "B<poll>(2)  B<POLLIN> flag)  if one or more timer expirations have occurred."
8980 msgstr ""
8981
8982 #. type: Plain text
8983 #: build/C/man2/timerfd_create.2:261
8984 msgid ""
8985 "The file descriptor also supports the other file-descriptor multiplexing "
8986 "APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
8987 msgstr ""
8988
8989 #. type: Plain text
8990 #: build/C/man2/timerfd_create.2:268
8991 msgid ""
8992 "When the file descriptor is no longer required it should be closed.  When "
8993 "all file descriptors associated with the same timer object have been closed, "
8994 "the timer is disarmed and its resources are freed by the kernel."
8995 msgstr ""
8996
8997 #. type: Plain text
8998 #: build/C/man2/timerfd_create.2:280
8999 msgid ""
9000 "After a B<fork>(2), the child inherits a copy of the file descriptor created "
9001 "by B<timerfd_create>().  The file descriptor refers to the same underlying "
9002 "timer object as the corresponding file descriptor in the parent, and "
9003 "B<read>(2)s in the child will return information about expirations of the "
9004 "timer."
9005 msgstr ""
9006
9007 #. type: Plain text
9008 #: build/C/man2/timerfd_create.2:286
9009 msgid ""
9010 "A file descriptor created by B<timerfd_create>()  is preserved across "
9011 "B<execve>(2), and continues to generate timer expirations if the timer was "
9012 "armed."
9013 msgstr ""
9014
9015 #. type: Plain text
9016 #: build/C/man2/timerfd_create.2:293
9017 msgid ""
9018 "On success, B<timerfd_create>()  returns a new file descriptor.  On error, "
9019 "-1 is returned and I<errno> is set to indicate the error."
9020 msgstr ""
9021
9022 #. type: Plain text
9023 #: build/C/man2/timerfd_create.2:301
9024 msgid ""
9025 "B<timerfd_settime>()  and B<timerfd_gettime>()  return 0 on success; on "
9026 "error they return -1, and set I<errno> to indicate the error."
9027 msgstr ""
9028
9029 #. type: Plain text
9030 #: build/C/man2/timerfd_create.2:304
9031 msgid "B<timerfd_create>()  can fail with the following errors:"
9032 msgstr ""
9033
9034 #. type: Plain text
9035 #: build/C/man2/timerfd_create.2:312
9036 msgid "The I<clockid> argument is neither B<CLOCK_MONOTONIC> nor B<CLOCK_REALTIME>;"
9037 msgstr ""
9038
9039 #. type: Plain text
9040 #: build/C/man2/timerfd_create.2:332
9041 msgid "There was insufficient kernel memory to create the timer."
9042 msgstr ""
9043
9044 #. type: Plain text
9045 #: build/C/man2/timerfd_create.2:337
9046 msgid ""
9047 "B<timerfd_settime>()  and B<timerfd_gettime>()  can fail with the following "
9048 "errors:"
9049 msgstr ""
9050
9051 #. type: Plain text
9052 #: build/C/man2/timerfd_create.2:341
9053 msgid "I<fd> is not a valid file descriptor."
9054 msgstr ""
9055
9056 #. type: Plain text
9057 #: build/C/man2/timerfd_create.2:352
9058 msgid "I<fd> is not a valid timerfd file descriptor."
9059 msgstr ""
9060
9061 #. type: Plain text
9062 #: build/C/man2/timerfd_create.2:355
9063 msgid "B<timerfd_settime>()  can also fail with the following errors:"
9064 msgstr ""
9065
9066 #. type: Plain text
9067 #: build/C/man2/timerfd_create.2:361
9068 msgid ""
9069 "I<new_value> is not properly initialized (one of the I<tv_nsec> falls "
9070 "outside the range zero to 999,999,999)."
9071 msgstr ""
9072
9073 #.  This case only checked since 2.6.29, and 2.2.2[78].some-stable-version.
9074 #.  In older kernel versions, no check was made for invalid flags.
9075 #. type: Plain text
9076 #: build/C/man2/timerfd_create.2:367
9077 msgid "I<flags> is invalid."
9078 msgstr ""
9079
9080 #. type: Plain text
9081 #: build/C/man2/timerfd_create.2:370
9082 msgid ""
9083 "These system calls are available on Linux since kernel 2.6.25.  Library "
9084 "support is provided by glibc since version 2.8."
9085 msgstr ""
9086
9087 #. type: Plain text
9088 #: build/C/man2/timerfd_create.2:381
9089 msgid ""
9090 "The following program creates a timer and then monitors its progress.  The "
9091 "program accepts up to three command-line arguments.  The first argument "
9092 "specifies the number of seconds for the initial expiration of the timer.  "
9093 "The second argument specifies the interval for the timer, in seconds.  The "
9094 "third argument specifies the number of times the program should allow the "
9095 "timer to expire before terminating.  The second and third command-line "
9096 "arguments are optional."
9097 msgstr ""
9098
9099 #. type: Plain text
9100 #: build/C/man2/timerfd_create.2:383 build/C/man2/wait.2:541
9101 msgid "The following shell session demonstrates the use of the program:"
9102 msgstr ""
9103
9104 #. type: Plain text
9105 #: build/C/man2/timerfd_create.2:398
9106 #, no-wrap
9107 msgid ""
9108 "$B< a.out 3 1 100>\n"
9109 "0.000: timer started\n"
9110 "3.000: read: 1; total=1\n"
9111 "4.000: read: 1; total=2\n"
9112 "B<^Z >                 # type control-Z to suspend the program\n"
9113 "[1]+  Stopped                 ./timerfd3_demo 3 1 100\n"
9114 "$ B<fg>                # Resume execution after a few seconds\n"
9115 "a.out 3 1 100\n"
9116 "9.660: read: 5; total=7\n"
9117 "10.000: read: 1; total=8\n"
9118 "11.000: read: 1; total=9\n"
9119 "B<^C >                 # type control-C to suspend the program\n"
9120 msgstr ""
9121
9122 #.  The commented out code here is what we currently need until
9123 #.  the required stuff is in glibc
9124 #
9125 #
9126 #. /* Link with -lrt */
9127 #. #define _GNU_SOURCE
9128 #. #include <sys/syscall.h>
9129 #. #include <unistd.h>
9130 #. #include <time.h>
9131 #. #if defined(__i386__)
9132 #. #define __NR_timerfd_create 322
9133 #. #define __NR_timerfd_settime 325
9134 #. #define __NR_timerfd_gettime 326
9135 #. #endif
9136 #
9137 #. static int
9138 #. timerfd_create(int clockid, int flags)
9139 #. {
9140 #.     return syscall(__NR_timerfd_create, clockid, flags);
9141 #. }
9142 #
9143 #. static int
9144 #. timerfd_settime(int fd, int flags, struct itimerspec *new_value,
9145 #.         struct itimerspec *curr_value)
9146 #. {
9147 #.     return syscall(__NR_timerfd_settime, fd, flags, new_value,
9148 #.                    curr_value);
9149 #. }
9150 #
9151 #. static int
9152 #. timerfd_gettime(int fd, struct itimerspec *curr_value)
9153 #. {
9154 #.     return syscall(__NR_timerfd_gettime, fd, curr_value);
9155 #. }
9156 #
9157 #. #define TFD_TIMER_ABSTIME (1 << 0)
9158 #
9159 #. ////////////////////////////////////////////////////////////
9160 #. type: Plain text
9161 #: build/C/man2/timerfd_create.2:447
9162 #, no-wrap
9163 msgid ""
9164 "#include E<lt>sys/timerfd.hE<gt>\n"
9165 "#include E<lt>time.hE<gt>\n"
9166 "#include E<lt>unistd.hE<gt>\n"
9167 "#include E<lt>stdlib.hE<gt>\n"
9168 "#include E<lt>stdio.hE<gt>\n"
9169 "#include E<lt>stdint.hE<gt>        /* Definition of uint64_t */\n"
9170 msgstr ""
9171
9172 #. type: Plain text
9173 #: build/C/man2/timerfd_create.2:450
9174 #, no-wrap
9175 msgid ""
9176 "#define handle_error(msg) \\e\n"
9177 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
9178 msgstr ""
9179
9180 #. type: Plain text
9181 #: build/C/man2/timerfd_create.2:458
9182 #, no-wrap
9183 msgid ""
9184 "static void\n"
9185 "print_elapsed_time(void)\n"
9186 "{\n"
9187 "    static struct timespec start;\n"
9188 "    struct timespec curr;\n"
9189 "    static int first_call = 1;\n"
9190 "    int secs, nsecs;\n"
9191 msgstr ""
9192
9193 #. type: Plain text
9194 #: build/C/man2/timerfd_create.2:464
9195 #, no-wrap
9196 msgid ""
9197 "    if (first_call) {\n"
9198 "        first_call = 0;\n"
9199 "        if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
9200 "            handle_error(\"clock_gettime\");\n"
9201 "    }\n"
9202 msgstr ""
9203
9204 #. type: Plain text
9205 #: build/C/man2/timerfd_create.2:467
9206 #, no-wrap
9207 msgid ""
9208 "    if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
9209 "        handle_error(\"clock_gettime\");\n"
9210 msgstr ""
9211
9212 #. type: Plain text
9213 #: build/C/man2/timerfd_create.2:476
9214 #, no-wrap
9215 msgid ""
9216 "    secs = curr.tv_sec - start.tv_sec;\n"
9217 "    nsecs = curr.tv_nsec - start.tv_nsec;\n"
9218 "    if (nsecs E<lt> 0) {\n"
9219 "        secs--;\n"
9220 "        nsecs += 1000000000;\n"
9221 "    }\n"
9222 "    printf(\"%d.%03d: \", secs, (nsecs + 500000) / 1000000);\n"
9223 "}\n"
9224 msgstr ""
9225
9226 #. type: Plain text
9227 #: build/C/man2/timerfd_create.2:485
9228 #, no-wrap
9229 msgid ""
9230 "int\n"
9231 "main(int argc, char *argv[])\n"
9232 "{\n"
9233 "    struct itimerspec new_value;\n"
9234 "    int max_exp, fd;\n"
9235 "    struct timespec now;\n"
9236 "    uint64_t exp, tot_exp;\n"
9237 "    ssize_t s;\n"
9238 msgstr ""
9239
9240 #. type: Plain text
9241 #: build/C/man2/timerfd_create.2:491
9242 #, no-wrap
9243 msgid ""
9244 "    if ((argc != 2) && (argc != 4)) {\n"
9245 "        fprintf(stderr, \"%s init-secs [interval-secs max-exp]\\en\",\n"
9246 "                argv[0]);\n"
9247 "        exit(EXIT_FAILURE);\n"
9248 "    }\n"
9249 msgstr ""
9250
9251 #. type: Plain text
9252 #: build/C/man2/timerfd_create.2:494
9253 #, no-wrap
9254 msgid ""
9255 "    if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
9256 "        handle_error(\"clock_gettime\");\n"
9257 msgstr ""
9258
9259 #. type: Plain text
9260 #: build/C/man2/timerfd_create.2:497
9261 #, no-wrap
9262 msgid ""
9263 "    /* Create a CLOCK_REALTIME absolute timer with initial\n"
9264 "       expiration and interval as specified in command line */\n"
9265 msgstr ""
9266
9267 #. type: Plain text
9268 #: build/C/man2/timerfd_create.2:508
9269 #, no-wrap
9270 msgid ""
9271 "    new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
9272 "    new_value.it_value.tv_nsec = now.tv_nsec;\n"
9273 "    if (argc == 2) {\n"
9274 "        new_value.it_interval.tv_sec = 0;\n"
9275 "        max_exp = 1;\n"
9276 "    } else {\n"
9277 "        new_value.it_interval.tv_sec = atoi(argv[2]);\n"
9278 "        max_exp = atoi(argv[3]);\n"
9279 "    }\n"
9280 "    new_value.it_interval.tv_nsec = 0;\n"
9281 msgstr ""
9282
9283 #. type: Plain text
9284 #: build/C/man2/timerfd_create.2:512
9285 #, no-wrap
9286 msgid ""
9287 "    fd = timerfd_create(CLOCK_REALTIME, 0);\n"
9288 "    if (fd == -1)\n"
9289 "        handle_error(\"timerfd_create\");\n"
9290 msgstr ""
9291
9292 #. type: Plain text
9293 #: build/C/man2/timerfd_create.2:515
9294 #, no-wrap
9295 msgid ""
9296 "    if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
9297 "        handle_error(\"timerfd_settime\");\n"
9298 msgstr ""
9299
9300 #. type: Plain text
9301 #: build/C/man2/timerfd_create.2:518
9302 #, no-wrap
9303 msgid ""
9304 "    print_elapsed_time();\n"
9305 "    printf(\"timer started\\en\");\n"
9306 msgstr ""
9307
9308 #. type: Plain text
9309 #: build/C/man2/timerfd_create.2:523
9310 #, no-wrap
9311 msgid ""
9312 "    for (tot_exp = 0; tot_exp E<lt> max_exp;) {\n"
9313 "        s = read(fd, &exp, sizeof(uint64_t));\n"
9314 "        if (s != sizeof(uint64_t))\n"
9315 "            handle_error(\"read\");\n"
9316 msgstr ""
9317
9318 #. type: Plain text
9319 #: build/C/man2/timerfd_create.2:530
9320 #, no-wrap
9321 msgid ""
9322 "        tot_exp += exp;\n"
9323 "        print_elapsed_time();\n"
9324 "        printf(\"read: %llu; total=%llu\\en\",\n"
9325 "                (unsigned long long) exp,\n"
9326 "                (unsigned long long) tot_exp);\n"
9327 "    }\n"
9328 msgstr ""
9329
9330 #.  2.6.29
9331 #. type: Plain text
9332 #: build/C/man2/timerfd_create.2:540
9333 msgid ""
9334 "Currently, B<timerfd_create>()  supports fewer types of clock IDs than "
9335 "B<timer_create>(2)."
9336 msgstr ""
9337
9338 #. type: Plain text
9339 #: build/C/man2/timerfd_create.2:552
9340 msgid ""
9341 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), "
9342 "B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), "
9343 "B<timer_settime>(2), B<epoll>(7), B<time>(7)"
9344 msgstr ""
9345
9346 #. type: TH
9347 #: build/C/man2/tkill.2:29
9348 #, no-wrap
9349 msgid "TKILL"
9350 msgstr ""
9351
9352 #. type: Plain text
9353 #: build/C/man2/tkill.2:32
9354 msgid "tkill, tgkill - send a signal to a thread"
9355 msgstr ""
9356
9357 #. type: Plain text
9358 #: build/C/man2/tkill.2:35
9359 #, no-wrap
9360 msgid "B<int tkill(int >I<tid>B<, int >I<sig>B<);>\n"
9361 msgstr ""
9362
9363 #. type: Plain text
9364 #: build/C/man2/tkill.2:37
9365 #, no-wrap
9366 msgid "B<int tgkill(int >I<tgid>B<, int >I<tid>B<, int >I<sig>B<);>\n"
9367 msgstr ""
9368
9369 #. type: Plain text
9370 #: build/C/man2/tkill.2:51
9371 msgid ""
9372 "B<tgkill>()  sends the signal I<sig> to the thread with the thread ID I<tid> "
9373 "in the thread group I<tgid>.  (By contrast, B<kill>(2)  can only be used to "
9374 "send a signal to a process (i.e., thread group)  as a whole, and the signal "
9375 "will be delivered to an arbitrary thread within that process.)"
9376 msgstr ""
9377
9378 #. type: Plain text
9379 #: build/C/man2/tkill.2:59
9380 msgid ""
9381 "B<tkill>()  is an obsolete predecessor to B<tgkill>().  It only allows the "
9382 "target thread ID to be specified, which may result in the wrong thread being "
9383 "signaled if a thread terminates and its thread ID is recycled.  Avoid using "
9384 "this system call."
9385 msgstr ""
9386
9387 #. type: Plain text
9388 #: build/C/man2/tkill.2:66
9389 msgid "If I<tgid> is specified as -1, B<tgkill>()  is equivalent to B<tkill>()."
9390 msgstr ""
9391
9392 #. type: Plain text
9393 #: build/C/man2/tkill.2:69
9394 msgid ""
9395 "These are the raw system call interfaces, meant for internal thread library "
9396 "use."
9397 msgstr ""
9398
9399 #. type: Plain text
9400 #: build/C/man2/tkill.2:77
9401 msgid "An invalid thread ID, thread group ID, or signal was specified."
9402 msgstr ""
9403
9404 #. type: Plain text
9405 #: build/C/man2/tkill.2:82
9406 msgid "Permission denied.  For the required permissions, see B<kill>(2)."
9407 msgstr ""
9408
9409 #. type: Plain text
9410 #: build/C/man2/tkill.2:85
9411 msgid "No process with the specified thread ID (and thread group ID) exists."
9412 msgstr ""
9413
9414 #. type: Plain text
9415 #: build/C/man2/tkill.2:90
9416 msgid ""
9417 "B<tkill>()  is supported since Linux 2.4.19 / 2.5.4.  B<tgkill>()  was added "
9418 "in Linux 2.5.75."
9419 msgstr ""
9420
9421 #. type: Plain text
9422 #: build/C/man2/tkill.2:96
9423 msgid ""
9424 "B<tkill>()  and B<tgkill>()  are Linux-specific and should not be used in "
9425 "programs that are intended to be portable."
9426 msgstr ""
9427
9428 #. type: Plain text
9429 #: build/C/man2/tkill.2:102
9430 msgid ""
9431 "See the description of B<CLONE_THREAD> in B<clone>(2)  for an explanation of "
9432 "thread groups."
9433 msgstr ""
9434
9435 #. type: Plain text
9436 #: build/C/man2/tkill.2:105
9437 msgid ""
9438 "Glibc does not provide wrappers for these system calls; call them using "
9439 "B<syscall>(2)."
9440 msgstr ""
9441
9442 #. type: Plain text
9443 #: build/C/man2/tkill.2:110
9444 msgid "B<clone>(2), B<gettid>(2), B<kill>(2), B<rt_sigqueueinfo>(2)"
9445 msgstr ""
9446
9447 #. type: TH
9448 #: build/C/man2/wait.2:50
9449 #, no-wrap
9450 msgid "WAIT"
9451 msgstr ""
9452
9453 #. type: Plain text
9454 #: build/C/man2/wait.2:53
9455 msgid "wait, waitpid, waitid - wait for process to change state"
9456 msgstr ""
9457
9458 #. type: Plain text
9459 #: build/C/man2/wait.2:55
9460 msgid "B<#include E<lt>sys/types.hE<gt>>"
9461 msgstr ""
9462
9463 #. type: Plain text
9464 #: build/C/man2/wait.2:57
9465 msgid "B<#include E<lt>sys/wait.hE<gt>>"
9466 msgstr ""
9467
9468 #. type: Plain text
9469 #: build/C/man2/wait.2:59
9470 msgid "B<pid_t wait(int *>I<status>B<);>"
9471 msgstr ""
9472
9473 #. type: Plain text
9474 #: build/C/man2/wait.2:61
9475 msgid "B<pid_t waitpid(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<);>"
9476 msgstr ""
9477
9478 #. type: Plain text
9479 #: build/C/man2/wait.2:64
9480 msgid ""
9481 "B<int waitid(idtype_t >I<idtype>B<, id_t >I<id>B<, siginfo_t *>I<infop>B<, "
9482 "int >I<options>B<);>"
9483 msgstr ""
9484
9485 #. type: Plain text
9486 #: build/C/man2/wait.2:73
9487 msgid "B<waitid>():"
9488 msgstr ""
9489
9490 #. type: Plain text
9491 #: build/C/man2/wait.2:77
9492 msgid ""
9493 "_SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9494 "_XOPEN_SOURCE_EXTENDED"
9495 msgstr ""
9496
9497 #. type: Plain text
9498 #: build/C/man2/wait.2:92
9499 msgid ""
9500 "All of these system calls are used to wait for state changes in a child of "
9501 "the calling process, and obtain information about the child whose state has "
9502 "changed.  A state change is considered to be: the child terminated; the "
9503 "child was stopped by a signal; or the child was resumed by a signal.  In the "
9504 "case of a terminated child, performing a wait allows the system to release "
9505 "the resources associated with the child; if a wait is not performed, then "
9506 "the terminated child remains in a \"zombie\" state (see NOTES below)."
9507 msgstr ""
9508
9509 #. type: Plain text
9510 #: build/C/man2/wait.2:104
9511 msgid ""
9512 "If a child has already changed state, then these calls return immediately.  "
9513 "Otherwise they block until either a child changes state or a signal handler "
9514 "interrupts the call (assuming that system calls are not automatically "
9515 "restarted using the B<SA_RESTART> flag of B<sigaction>(2)).  In the "
9516 "remainder of this page, a child whose state has changed and which has not "
9517 "yet been waited upon by one of these system calls is termed I<waitable>."
9518 msgstr ""
9519
9520 #. type: SS
9521 #: build/C/man2/wait.2:104
9522 #, no-wrap
9523 msgid "wait() and waitpid()"
9524 msgstr ""
9525
9526 #. type: Plain text
9527 #: build/C/man2/wait.2:112
9528 msgid ""
9529 "The B<wait>()  system call suspends execution of the calling process until "
9530 "one of its children terminates.  The call I<wait(&status)> is equivalent to:"
9531 msgstr ""
9532
9533 #. type: Plain text
9534 #: build/C/man2/wait.2:115
9535 #, no-wrap
9536 msgid "    waitpid(-1, &status, 0);\n"
9537 msgstr ""
9538
9539 #. type: Plain text
9540 #: build/C/man2/wait.2:129
9541 msgid ""
9542 "The B<waitpid>()  system call suspends execution of the calling process "
9543 "until a child specified by I<pid> argument has changed state.  By default, "
9544 "B<waitpid>()  waits only for terminated children, but this behavior is "
9545 "modifiable via the I<options> argument, as described below."
9546 msgstr ""
9547
9548 #. type: Plain text
9549 #: build/C/man2/wait.2:133
9550 msgid "The value of I<pid> can be:"
9551 msgstr ""
9552
9553 #. type: IP
9554 #: build/C/man2/wait.2:133
9555 #, no-wrap
9556 msgid "E<lt> -1"
9557 msgstr ""
9558
9559 #. type: Plain text
9560 #: build/C/man2/wait.2:137
9561 msgid ""
9562 "meaning wait for any child process whose process group ID is equal to the "
9563 "absolute value of I<pid>."
9564 msgstr ""
9565
9566 #. type: IP
9567 #: build/C/man2/wait.2:137
9568 #, no-wrap
9569 msgid "-1"
9570 msgstr ""
9571
9572 #. type: Plain text
9573 #: build/C/man2/wait.2:139
9574 msgid "meaning wait for any child process."
9575 msgstr ""
9576
9577 #. type: IP
9578 #: build/C/man2/wait.2:139
9579 #, no-wrap
9580 msgid "0"
9581 msgstr ""
9582
9583 #. type: Plain text
9584 #: build/C/man2/wait.2:142
9585 msgid ""
9586 "meaning wait for any child process whose process group ID is equal to that "
9587 "of the calling process."
9588 msgstr ""
9589
9590 #. type: IP
9591 #: build/C/man2/wait.2:142
9592 #, no-wrap
9593 msgid "E<gt> 0"
9594 msgstr ""
9595
9596 #. type: Plain text
9597 #: build/C/man2/wait.2:146
9598 msgid "meaning wait for the child whose process ID is equal to the value of I<pid>."
9599 msgstr ""
9600
9601 #. type: Plain text
9602 #: build/C/man2/wait.2:150
9603 msgid "The value of I<options> is an OR of zero or more of the following constants:"
9604 msgstr ""
9605
9606 #. type: TP
9607 #: build/C/man2/wait.2:150 build/C/man2/wait.2:279
9608 #, no-wrap
9609 msgid "B<WNOHANG>"
9610 msgstr ""
9611
9612 #. type: Plain text
9613 #: build/C/man2/wait.2:153
9614 msgid "return immediately if no child has exited."
9615 msgstr ""
9616
9617 #. type: TP
9618 #: build/C/man2/wait.2:153
9619 #, no-wrap
9620 msgid "B<WUNTRACED>"
9621 msgstr ""
9622
9623 #. type: Plain text
9624 #: build/C/man2/wait.2:162
9625 msgid ""
9626 "also return if a child has stopped (but not traced via B<ptrace>(2)).  "
9627 "Status for I<traced> children which have stopped is provided even if this "
9628 "option is not specified."
9629 msgstr ""
9630
9631 #. type: TP
9632 #: build/C/man2/wait.2:162
9633 #, no-wrap
9634 msgid "B<WCONTINUED> (since Linux 2.6.10)"
9635 msgstr ""
9636
9637 #. type: Plain text
9638 #: build/C/man2/wait.2:166
9639 msgid "also return if a stopped child has been resumed by delivery of B<SIGCONT>."
9640 msgstr ""
9641
9642 #. type: Plain text
9643 #: build/C/man2/wait.2:168
9644 msgid "(For Linux-only options, see below.)"
9645 msgstr ""
9646
9647 #. type: Plain text
9648 #: build/C/man2/wait.2:182
9649 msgid ""
9650 "If I<status> is not NULL, B<wait>()  and B<waitpid>()  store status "
9651 "information in the I<int> to which it points.  This integer can be inspected "
9652 "with the following macros (which take the integer itself as an argument, not "
9653 "a pointer to it, as is done in B<wait>()  and B<waitpid>()!):"
9654 msgstr ""
9655
9656 #. type: TP
9657 #: build/C/man2/wait.2:182
9658 #, no-wrap
9659 msgid "B<WIFEXITED(>I<status>B<)>"
9660 msgstr ""
9661
9662 #. type: Plain text
9663 #: build/C/man2/wait.2:190
9664 msgid ""
9665 "returns true if the child terminated normally, that is, by calling "
9666 "B<exit>(3)  or B<_exit>(2), or by returning from main()."
9667 msgstr ""
9668
9669 #. type: TP
9670 #: build/C/man2/wait.2:190
9671 #, no-wrap
9672 msgid "B<WEXITSTATUS(>I<status>B<)>"
9673 msgstr ""
9674
9675 #. type: Plain text
9676 #: build/C/man2/wait.2:203
9677 msgid ""
9678 "returns the exit status of the child.  This consists of the least "
9679 "significant 8 bits of the I<status> argument that the child specified in a "
9680 "call to B<exit>(3)  or B<_exit>(2)  or as the argument for a return "
9681 "statement in main().  This macro should only be employed if B<WIFEXITED> "
9682 "returned true."
9683 msgstr ""
9684
9685 #. type: TP
9686 #: build/C/man2/wait.2:203
9687 #, no-wrap
9688 msgid "B<WIFSIGNALED(>I<status>B<)>"
9689 msgstr ""
9690
9691 #. type: Plain text
9692 #: build/C/man2/wait.2:206
9693 msgid "returns true if the child process was terminated by a signal."
9694 msgstr ""
9695
9696 #. type: TP
9697 #: build/C/man2/wait.2:206
9698 #, no-wrap
9699 msgid "B<WTERMSIG(>I<status>B<)>"
9700 msgstr ""
9701
9702 #. type: Plain text
9703 #: build/C/man2/wait.2:213
9704 msgid ""
9705 "returns the number of the signal that caused the child process to "
9706 "terminate.  This macro should only be employed if B<WIFSIGNALED> returned "
9707 "true."
9708 msgstr ""
9709
9710 #. type: TP
9711 #: build/C/man2/wait.2:213
9712 #, no-wrap
9713 msgid "B<WCOREDUMP(>I<status>B<)>"
9714 msgstr ""
9715
9716 #. type: Plain text
9717 #: build/C/man2/wait.2:222
9718 msgid ""
9719 "returns true if the child produced a core dump.  This macro should only be "
9720 "employed if B<WIFSIGNALED> returned true.  This macro is not specified in "
9721 "POSIX.1-2001 and is not available on some UNIX implementations (e.g., AIX, "
9722 "SunOS).  Only use this enclosed in #ifdef WCOREDUMP ... #endif."
9723 msgstr ""
9724
9725 #. type: TP
9726 #: build/C/man2/wait.2:222
9727 #, no-wrap
9728 msgid "B<WIFSTOPPED(>I<status>B<)>"
9729 msgstr ""
9730
9731 #. type: Plain text
9732 #: build/C/man2/wait.2:229
9733 msgid ""
9734 "returns true if the child process was stopped by delivery of a signal; this "
9735 "is only possible if the call was done using B<WUNTRACED> or when the child "
9736 "is being traced (see B<ptrace>(2))."
9737 msgstr ""
9738
9739 #. type: TP
9740 #: build/C/man2/wait.2:229
9741 #, no-wrap
9742 msgid "B<WSTOPSIG(>I<status>B<)>"
9743 msgstr ""
9744
9745 #. type: Plain text
9746 #: build/C/man2/wait.2:235
9747 msgid ""
9748 "returns the number of the signal which caused the child to stop.  This macro "
9749 "should only be employed if B<WIFSTOPPED> returned true."
9750 msgstr ""
9751
9752 #. type: TP
9753 #: build/C/man2/wait.2:235
9754 #, no-wrap
9755 msgid "B<WIFCONTINUED(>I<status>B<)>"
9756 msgstr ""
9757
9758 #. type: Plain text
9759 #: build/C/man2/wait.2:240
9760 msgid ""
9761 "(since Linux 2.6.10)  returns true if the child process was resumed by "
9762 "delivery of B<SIGCONT>."
9763 msgstr ""
9764
9765 #. type: SS
9766 #: build/C/man2/wait.2:240
9767 #, no-wrap
9768 msgid "waitid()"
9769 msgstr ""
9770
9771 #. type: Plain text
9772 #: build/C/man2/wait.2:245
9773 msgid ""
9774 "The B<waitid>()  system call (available since Linux 2.6.9) provides more "
9775 "precise control over which child state changes to wait for."
9776 msgstr ""
9777
9778 #. type: Plain text
9779 #: build/C/man2/wait.2:251
9780 msgid ""
9781 "The I<idtype> and I<id> arguments select the child(ren) to wait for, as "
9782 "follows:"
9783 msgstr ""
9784
9785 #. type: IP
9786 #: build/C/man2/wait.2:251
9787 #, no-wrap
9788 msgid "I<idtype> == B<P_PID>"
9789 msgstr ""
9790
9791 #. type: Plain text
9792 #: build/C/man2/wait.2:254
9793 msgid "Wait for the child whose process ID matches I<id>."
9794 msgstr ""
9795
9796 #. type: IP
9797 #: build/C/man2/wait.2:254
9798 #, no-wrap
9799 msgid "I<idtype> == B<P_PGID>"
9800 msgstr ""
9801
9802 #. type: Plain text
9803 #: build/C/man2/wait.2:257
9804 msgid "Wait for any child whose process group ID matches I<id>."
9805 msgstr ""
9806
9807 #. type: IP
9808 #: build/C/man2/wait.2:257
9809 #, no-wrap
9810 msgid "I<idtype> == B<P_ALL>"
9811 msgstr ""
9812
9813 #. type: Plain text
9814 #: build/C/man2/wait.2:261
9815 msgid "Wait for any child; I<id> is ignored."
9816 msgstr ""
9817
9818 #. type: Plain text
9819 #: build/C/man2/wait.2:265
9820 msgid ""
9821 "The child state changes to wait for are specified by ORing one or more of "
9822 "the following flags in I<options>:"
9823 msgstr ""
9824
9825 #. type: TP
9826 #: build/C/man2/wait.2:265
9827 #, no-wrap
9828 msgid "B<WEXITED>"
9829 msgstr ""
9830
9831 #. type: Plain text
9832 #: build/C/man2/wait.2:268
9833 msgid "Wait for children that have terminated."
9834 msgstr ""
9835
9836 #. type: TP
9837 #: build/C/man2/wait.2:268
9838 #, no-wrap
9839 msgid "B<WSTOPPED>"
9840 msgstr ""
9841
9842 #. type: Plain text
9843 #: build/C/man2/wait.2:271
9844 msgid "Wait for children that have been stopped by delivery of a signal."
9845 msgstr ""
9846
9847 #. type: TP
9848 #: build/C/man2/wait.2:271
9849 #, no-wrap
9850 msgid "B<WCONTINUED>"
9851 msgstr ""
9852
9853 #. type: Plain text
9854 #: build/C/man2/wait.2:276
9855 msgid ""
9856 "Wait for (previously stopped) children that have been resumed by delivery of "
9857 "B<SIGCONT>."
9858 msgstr ""
9859
9860 #. type: Plain text
9861 #: build/C/man2/wait.2:279
9862 msgid "The following flags may additionally be ORed in I<options>:"
9863 msgstr ""
9864
9865 #. type: Plain text
9866 #: build/C/man2/wait.2:283
9867 msgid "As for B<waitpid>()."
9868 msgstr ""
9869
9870 #. type: TP
9871 #: build/C/man2/wait.2:283
9872 #, no-wrap
9873 msgid "B<WNOWAIT>"
9874 msgstr ""
9875
9876 #. type: Plain text
9877 #: build/C/man2/wait.2:287
9878 msgid ""
9879 "Leave the child in a waitable state; a later wait call can be used to again "
9880 "retrieve the child status information."
9881 msgstr ""
9882
9883 #. type: Plain text
9884 #: build/C/man2/wait.2:294
9885 msgid ""
9886 "Upon successful return, B<waitid>()  fills in the following fields of the "
9887 "I<siginfo_t> structure pointed to by I<infop>:"
9888 msgstr ""
9889
9890 #. type: Plain text
9891 #: build/C/man2/wait.2:297
9892 msgid "The process ID of the child."
9893 msgstr ""
9894
9895 #. type: Plain text
9896 #: build/C/man2/wait.2:301
9897 msgid ""
9898 "The real user ID of the child.  (This field is not set on most other "
9899 "implementations.)"
9900 msgstr ""
9901
9902 #. type: Plain text
9903 #: build/C/man2/wait.2:305
9904 msgid "Always set to B<SIGCHLD>."
9905 msgstr ""
9906
9907 #. type: TP
9908 #: build/C/man2/wait.2:305
9909 #, no-wrap
9910 msgid "I<si_status>"
9911 msgstr ""
9912
9913 #. type: Plain text
9914 #: build/C/man2/wait.2:315
9915 msgid ""
9916 "Either the exit status of the child, as given to B<_exit>(2)  (or "
9917 "B<exit>(3)), or the signal that caused the child to terminate, stop, or "
9918 "continue.  The I<si_code> field can be used to determine how to interpret "
9919 "this field."
9920 msgstr ""
9921
9922 #. type: Plain text
9923 #: build/C/man2/wait.2:332
9924 msgid ""
9925 "Set to one of: B<CLD_EXITED> (child called B<_exit>(2)); B<CLD_KILLED> "
9926 "(child killed by signal); B<CLD_DUMPED> (child killed by signal, and dumped "
9927 "core); B<CLD_STOPPED> (child stopped by signal); B<CLD_TRAPPED> (traced "
9928 "child has trapped); or B<CLD_CONTINUED> (child continued by B<SIGCONT>)."
9929 msgstr ""
9930
9931 #.  POSIX.1-2001 leaves this possibility unspecified; most
9932 #.  implementations (including Linux) zero out the structure
9933 #.  in this case, but at at least one implementation (AIX 5.1)
9934 #.  does not -- MTK Nov 04
9935 #. type: Plain text
9936 #: build/C/man2/wait.2:354
9937 msgid ""
9938 "If B<WNOHANG> was specified in I<options> and there were no children in a "
9939 "waitable state, then B<waitid>()  returns 0 immediately and the state of the "
9940 "I<siginfo_t> structure pointed to by I<infop> is unspecified.  To "
9941 "distinguish this case from that where a child was in a waitable state, zero "
9942 "out the I<si_pid> field before the call and check for a nonzero value in "
9943 "this field after the call returns."
9944 msgstr ""
9945
9946 #. type: Plain text
9947 #: build/C/man2/wait.2:358
9948 msgid ""
9949 "B<wait>(): on success, returns the process ID of the terminated child; on "
9950 "error, -1 is returned."
9951 msgstr ""
9952
9953 #. type: Plain text
9954 #: build/C/man2/wait.2:367
9955 msgid ""
9956 "B<waitpid>(): on success, returns the process ID of the child whose state "
9957 "has changed; if B<WNOHANG> was specified and one or more child(ren) "
9958 "specified by I<pid> exist, but have not yet changed state, then 0 is "
9959 "returned.  On error, -1 is returned."
9960 msgstr ""
9961
9962 #.  FIXME: As reported by Vegard Nossum, if infop is NULL, then waitid()
9963 #.  returns the PID of the child.  Either this is a bug, or it is intended
9964 #.  behavior that needs to be documented.  See my Jan 2009 LKML mail
9965 #.  "waitid() return value strangeness when infop is NULL".
9966 #. type: Plain text
9967 #: build/C/man2/wait.2:383
9968 msgid ""
9969 "B<waitid>(): returns 0 on success or if B<WNOHANG> was specified and no "
9970 "child(ren) specified by I<id> has yet changed state; on error, -1 is "
9971 "returned.  Each of these calls sets I<errno> to an appropriate value in the "
9972 "case of an error."
9973 msgstr ""
9974
9975 #. type: TP
9976 #: build/C/man2/wait.2:384 build/C/man2/wait.2:389
9977 #, no-wrap
9978 msgid "B<ECHILD>"
9979 msgstr ""
9980
9981 #. type: Plain text
9982 #: build/C/man2/wait.2:389
9983 msgid ""
9984 "(for B<wait>())  The calling process does not have any unwaited-for "
9985 "children."
9986 msgstr ""
9987
9988 #. type: Plain text
9989 #: build/C/man2/wait.2:409
9990 msgid ""
9991 "(for B<waitpid>()  or B<waitid>())  The process specified by I<pid> "
9992 "(B<waitpid>())  or I<idtype> and I<id> (B<waitid>())  does not exist or is "
9993 "not a child of the calling process.  (This can happen for one's own child if "
9994 "the action for B<SIGCHLD> is set to B<SIG_IGN>.  See also the I<Linux Notes> "
9995 "section about threads.)"
9996 msgstr ""
9997
9998 #. type: Plain text
9999 #: build/C/man2/wait.2:416
10000 msgid ""
10001 "B<WNOHANG> was not set and an unblocked signal or a B<SIGCHLD> was caught; "
10002 "see B<signal>(7)."
10003 msgstr ""
10004
10005 #. type: Plain text
10006 #: build/C/man2/wait.2:421
10007 msgid "The I<options> argument was invalid."
10008 msgstr ""
10009
10010 #. type: Plain text
10011 #: build/C/man2/wait.2:436
10012 msgid ""
10013 "A child that terminates, but has not been waited for becomes a \"zombie\".  "
10014 "The kernel maintains a minimal set of information about the zombie process "
10015 "(PID, termination status, resource usage information)  in order to allow the "
10016 "parent to later perform a wait to obtain information about the child.  As "
10017 "long as a zombie is not removed from the system via a wait, it will consume "
10018 "a slot in the kernel process table, and if this table fills, it will not be "
10019 "possible to create further processes.  If a parent process terminates, then "
10020 "its \"zombie\" children (if any)  are adopted by B<init>(8), which "
10021 "automatically performs a wait to remove the zombies."
10022 msgstr ""
10023
10024 #. type: Plain text
10025 #: build/C/man2/wait.2:477
10026 msgid ""
10027 "POSIX.1-2001 specifies that if the disposition of B<SIGCHLD> is set to "
10028 "B<SIG_IGN> or the B<SA_NOCLDWAIT> flag is set for B<SIGCHLD> (see "
10029 "B<sigaction>(2)), then children that terminate do not become zombies and a "
10030 "call to B<wait>()  or B<waitpid>()  will block until all children have "
10031 "terminated, and then fail with I<errno> set to B<ECHILD>.  (The original "
10032 "POSIX standard left the behavior of setting B<SIGCHLD> to B<SIG_IGN> "
10033 "unspecified.  Note that even though the default disposition of B<SIGCHLD> is "
10034 "\"ignore\", explicitly setting the disposition to B<SIG_IGN> results in "
10035 "different treatment of zombie process children.)  Linux 2.6 conforms to this "
10036 "specification.  However, Linux 2.4 (and earlier) does not: if a B<wait>()  "
10037 "or B<waitpid>()  call is made while B<SIGCHLD> is being ignored, the call "
10038 "behaves just as though B<SIGCHLD> were not being ignored, that is, the call "
10039 "blocks until the next child terminates and then returns the process ID and "
10040 "status of that child."
10041 msgstr ""
10042
10043 #. type: Plain text
10044 #: build/C/man2/wait.2:493
10045 msgid ""
10046 "In the Linux kernel, a kernel-scheduled thread is not a distinct construct "
10047 "from a process.  Instead, a thread is simply a process that is created using "
10048 "the Linux-unique B<clone>(2)  system call; other routines such as the "
10049 "portable B<pthread_create>(3)  call are implemented using B<clone>(2).  "
10050 "Before Linux 2.4, a thread was just a special case of a process, and as a "
10051 "consequence one thread could not wait on the children of another thread, "
10052 "even when the latter belongs to the same thread group.  However, POSIX "
10053 "prescribes such functionality, and since Linux 2.4 a thread can, and by "
10054 "default will, wait on children of other threads in the same thread group."
10055 msgstr ""
10056
10057 #. type: Plain text
10058 #: build/C/man2/wait.2:500
10059 msgid ""
10060 "The following Linux-specific I<options> are for use with children created "
10061 "using B<clone>(2); they cannot be used with B<waitid>():"
10062 msgstr ""
10063
10064 #. type: TP
10065 #: build/C/man2/wait.2:500
10066 #, no-wrap
10067 msgid "B<__WCLONE>"
10068 msgstr ""
10069
10070 #.  since 0.99pl10
10071 #. type: Plain text
10072 #: build/C/man2/wait.2:511
10073 msgid ""
10074 "Wait for \"clone\" children only.  If omitted then wait for \"non-clone\" "
10075 "children only.  (A \"clone\" child is one which delivers no signal, or a "
10076 "signal other than B<SIGCHLD> to its parent upon termination.)  This option "
10077 "is ignored if B<__WALL> is also specified."
10078 msgstr ""
10079
10080 #. type: TP
10081 #: build/C/man2/wait.2:511
10082 #, no-wrap
10083 msgid "B<__WALL> (since Linux 2.4)"
10084 msgstr ""
10085
10086 #.  since patch-2.3.48
10087 #. type: Plain text
10088 #: build/C/man2/wait.2:516
10089 msgid "Wait for all children, regardless of type (\"clone\" or \"non-clone\")."
10090 msgstr ""
10091
10092 #. type: TP
10093 #: build/C/man2/wait.2:516
10094 #, no-wrap
10095 msgid "B<__WNOTHREAD> (since Linux 2.4)"
10096 msgstr ""
10097
10098 #.  since patch-2.4.0-test8
10099 #. type: Plain text
10100 #: build/C/man2/wait.2:522
10101 msgid ""
10102 "Do not wait for children of other threads in the same thread group.  This "
10103 "was the default before Linux 2.4."
10104 msgstr ""
10105
10106 #.  fork.2 refers to this example program.
10107 #. type: Plain text
10108 #: build/C/man2/wait.2:539
10109 msgid ""
10110 "The following program demonstrates the use of B<fork>(2)  and B<waitpid>().  "
10111 "The program creates a child process.  If no command-line argument is "
10112 "supplied to the program, then the child suspends its execution using "
10113 "B<pause>(2), to allow the user to send signals to the child.  Otherwise, if "
10114 "a command-line argument is supplied, then the child exits immediately, using "
10115 "the integer supplied on the command line as the exit status.  The parent "
10116 "process executes a loop that monitors the child using B<waitpid>(), and uses "
10117 "the W*() macros described above to analyze the wait status value."
10118 msgstr ""
10119
10120 #. type: Plain text
10121 #: build/C/man2/wait.2:555
10122 #, no-wrap
10123 msgid ""
10124 "$B< ./a.out &>\n"
10125 "Child PID is 32360\n"
10126 "[1] 32359\n"
10127 "$B< kill -STOP 32360>\n"
10128 "stopped by signal 19\n"
10129 "$B< kill -CONT 32360>\n"
10130 "continued\n"
10131 "$B< kill -TERM 32360>\n"
10132 "killed by signal 15\n"
10133 "[1]+  Done                    ./a.out\n"
10134 "$\n"
10135 msgstr ""
10136
10137 #. type: Plain text
10138 #: build/C/man2/wait.2:564
10139 #, no-wrap
10140 msgid ""
10141 "#include E<lt>sys/wait.hE<gt>\n"
10142 "#include E<lt>stdlib.hE<gt>\n"
10143 "#include E<lt>unistd.hE<gt>\n"
10144 "#include E<lt>stdio.hE<gt>\n"
10145 msgstr ""
10146
10147 #. type: Plain text
10148 #: build/C/man2/wait.2:570
10149 #, no-wrap
10150 msgid ""
10151 "int\n"
10152 "main(int argc, char *argv[])\n"
10153 "{\n"
10154 "    pid_t cpid, w;\n"
10155 "    int status;\n"
10156 msgstr ""
10157
10158 #. type: Plain text
10159 #: build/C/man2/wait.2:576
10160 #, no-wrap
10161 msgid ""
10162 "    cpid = fork();\n"
10163 "    if (cpid == -1) {\n"
10164 "        perror(\"fork\");\n"
10165 "        exit(EXIT_FAILURE);\n"
10166 "    }\n"
10167 msgstr ""
10168
10169 #. type: Plain text
10170 #: build/C/man2/wait.2:582
10171 #, no-wrap
10172 msgid ""
10173 "    if (cpid == 0) {            /* Code executed by child */\n"
10174 "        printf(\"Child PID is %ld\\en\", (long) getpid());\n"
10175 "        if (argc == 1)\n"
10176 "            pause();                    /* Wait for signals */\n"
10177 "        _exit(atoi(argv[1]));\n"
10178 msgstr ""
10179
10180 #. type: Plain text
10181 #: build/C/man2/wait.2:590
10182 #, no-wrap
10183 msgid ""
10184 "    } else {                    /* Code executed by parent */\n"
10185 "        do {\n"
10186 "            w = waitpid(cpid, &status, WUNTRACED | WCONTINUED);\n"
10187 "            if (w == -1) {\n"
10188 "                perror(\"waitpid\");\n"
10189 "                exit(EXIT_FAILURE);\n"
10190 "            }\n"
10191 msgstr ""
10192
10193 #. type: Plain text
10194 #: build/C/man2/wait.2:604
10195 #, no-wrap
10196 msgid ""
10197 "            if (WIFEXITED(status)) {\n"
10198 "                printf(\"exited, status=%d\\en\", WEXITSTATUS(status));\n"
10199 "            } else if (WIFSIGNALED(status)) {\n"
10200 "                printf(\"killed by signal %d\\en\", WTERMSIG(status));\n"
10201 "            } else if (WIFSTOPPED(status)) {\n"
10202 "                printf(\"stopped by signal %d\\en\", WSTOPSIG(status));\n"
10203 "            } else if (WIFCONTINUED(status)) {\n"
10204 "                printf(\"continued\\en\");\n"
10205 "            }\n"
10206 "        } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n"
10207 "        exit(EXIT_SUCCESS);\n"
10208 "    }\n"
10209 "}\n"
10210 msgstr ""
10211
10212 #. type: Plain text
10213 #: build/C/man2/wait.2:617
10214 msgid ""
10215 "B<_exit>(2), B<clone>(2), B<fork>(2), B<kill>(2), B<ptrace>(2), "
10216 "B<sigaction>(2), B<signal>(2), B<wait4>(2), B<pthread_create>(3), "
10217 "B<credentials>(7), B<signal>(7)"
10218 msgstr ""
10219
10220 #. type: TH
10221 #: build/C/man2/wait4.2:34
10222 #, no-wrap
10223 msgid "WAIT4"
10224 msgstr ""
10225
10226 #. type: Plain text
10227 #: build/C/man2/wait4.2:37
10228 msgid "wait3, wait4 - wait for process to change state, BSD style"
10229 msgstr ""
10230
10231 #. type: Plain text
10232 #: build/C/man2/wait4.2:43
10233 #, no-wrap
10234 msgid ""
10235 "B<#include E<lt>sys/types.hE<gt>>\n"
10236 "B<#include E<lt>sys/time.hE<gt>>\n"
10237 "B<#include E<lt>sys/resource.hE<gt>>\n"
10238 "B<#include E<lt>sys/wait.hE<gt>>\n"
10239 msgstr ""
10240
10241 #. type: Plain text
10242 #: build/C/man2/wait4.2:46
10243 #, no-wrap
10244 msgid ""
10245 "B<pid_t wait3(int *>I<status>B<, int >I<options>B<,>\n"
10246 "B<            struct rusage *>I<rusage>B<);>\n"
10247 msgstr ""
10248
10249 #. type: Plain text
10250 #: build/C/man2/wait4.2:49
10251 #, no-wrap
10252 msgid ""
10253 "B<pid_t wait4(pid_t >I<pid>B<, int *>I<status>B<, int >I<options>B<,>\n"
10254 "B<            struct rusage *>I<rusage>B<);>\n"
10255 msgstr ""
10256
10257 #. type: Plain text
10258 #: build/C/man2/wait4.2:58
10259 msgid "B<wait3>():"
10260 msgstr ""
10261
10262 #. type: Plain text
10263 #: build/C/man2/wait4.2:64
10264 msgid "B<wait4>():"
10265 msgstr ""
10266
10267 #. type: Plain text
10268 #: build/C/man2/wait4.2:66
10269 msgid "_BSD_SOURCE"
10270 msgstr ""
10271
10272 #. type: Plain text
10273 #: build/C/man2/wait4.2:78
10274 msgid ""
10275 "The B<wait3>()  and B<wait4>()  system calls are similar to B<waitpid>(2), "
10276 "but additionally return resource usage information about the child in the "
10277 "structure pointed to by I<rusage>."
10278 msgstr ""
10279
10280 #. type: Plain text
10281 #: build/C/man2/wait4.2:84
10282 msgid ""
10283 "Other than the use of the I<rusage> argument, the following B<wait3>()  "
10284 "call:"
10285 msgstr ""
10286
10287 #. type: Plain text
10288 #: build/C/man2/wait4.2:87
10289 #, no-wrap
10290 msgid "    wait3(status, options, rusage);\n"
10291 msgstr ""
10292
10293 #. type: Plain text
10294 #: build/C/man2/wait4.2:90 build/C/man2/wait4.2:104
10295 msgid "is equivalent to:"
10296 msgstr ""
10297
10298 #. type: Plain text
10299 #: build/C/man2/wait4.2:93
10300 #, no-wrap
10301 msgid "    waitpid(-1, status, options);\n"
10302 msgstr ""
10303
10304 #. type: Plain text
10305 #: build/C/man2/wait4.2:98
10306 msgid "Similarly, the following B<wait4>()  call:"
10307 msgstr ""
10308
10309 #. type: Plain text
10310 #: build/C/man2/wait4.2:101
10311 #, no-wrap
10312 msgid "    wait4(pid, status, options, rusage);\n"
10313 msgstr ""
10314
10315 #. type: Plain text
10316 #: build/C/man2/wait4.2:107
10317 #, no-wrap
10318 msgid "    waitpid(pid, status, options);\n"
10319 msgstr ""
10320
10321 #. type: Plain text
10322 #: build/C/man2/wait4.2:117
10323 msgid ""
10324 "In other words, B<wait3>()  waits of any child, while B<wait4>()  can be "
10325 "used to select a specific child, or children, on which to wait.  See "
10326 "B<wait>(2)  for further details."
10327 msgstr ""
10328
10329 #. type: Plain text
10330 #: build/C/man2/wait4.2:127
10331 msgid ""
10332 "If I<rusage> is not NULL, the I<struct rusage> to which it points will be "
10333 "filled with accounting information about the child.  See B<getrusage>(2)  "
10334 "for details."
10335 msgstr ""
10336
10337 #. type: Plain text
10338 #: build/C/man2/wait4.2:130 build/C/man2/wait4.2:133
10339 msgid "As for B<waitpid>(2)."
10340 msgstr ""
10341
10342 #. type: Plain text
10343 #: build/C/man2/wait4.2:135
10344 msgid "4.3BSD."
10345 msgstr ""
10346
10347 #. type: Plain text
10348 #: build/C/man2/wait4.2:147
10349 msgid ""
10350 "Including I<E<lt>sys/time.hE<gt>> is not required these days, but increases "
10351 "portability.  (Indeed, I<E<lt>sys/resource.hE<gt>> defines the I<rusage> "
10352 "structure with fields of type I<struct timeval> defined in "
10353 "I<E<lt>sys/time.hE<gt>>.)"
10354 msgstr ""
10355
10356 #. type: Plain text
10357 #: build/C/man2/wait4.2:153
10358 msgid ""
10359 "On Linux, B<wait3>()  is a library function implemented on top of the "
10360 "B<wait4>()  system call."
10361 msgstr ""
10362
10363 #. type: Plain text
10364 #: build/C/man2/wait4.2:160
10365 msgid ""
10366 "B<fork>(2), B<getrusage>(2), B<sigaction>(2), B<signal>(2), B<wait>(2), "
10367 "B<signal>(7)"
10368 msgstr ""