Debian Codegraph @

templates/man2/signalfd.2.pot

raw
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: 2026-06-05 06:43+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "signalfd"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid "signalfd - create a file descriptor for accepting signals"
50 msgstr ""
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "LIBRARY"
57 msgstr ""
58
59 #. type: Plain text
60 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
61 #: opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "Standard C library (I<libc>,\\ I<-lc>)"
63 msgstr ""
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "SYNOPSIS"
70 msgstr ""
71
72 #. type: Plain text
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid "B<#include E<lt>sys/signalfd.hE<gt>>\n"
77 msgstr ""
78
79 #. type: Plain text
80 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
81 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
82 #, no-wrap
83 msgid "B<int signalfd(int >I<fd>B<, const sigset_t *>I<mask>B<, int >I<flags>B<);>\n"
84 msgstr ""
85
86 #. type: SH
87 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
88 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
89 #, no-wrap
90 msgid "DESCRIPTION"
91 msgstr ""
92
93 #. type: Plain text
94 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
95 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
96 msgid ""
97 "B<signalfd>() creates a file descriptor that can be used to accept signals "
98 "targeted at the caller. This provides an alternative to the use of a signal "
99 "handler or B<sigwaitinfo>(2), and has the advantage that the file descriptor "
100 "may be monitored by B<select>(2), B<poll>(2), and B<epoll>(7)."
101 msgstr ""
102
103 #. type: Plain text
104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
106 msgid ""
107 "The I<mask> argument specifies the set of signals that the caller wishes to "
108 "accept via the file descriptor. This argument is a signal set whose "
109 "contents can be initialized using the macros described in B<sigsetops>(3). "
110 "Normally, the set of signals to be received via the file descriptor should "
111 "be blocked using B<sigprocmask>(2), to prevent the signals being handled "
112 "according to their default dispositions. It is not possible to receive "
113 "B<SIGKILL> or B<SIGSTOP> signals via a signalfd file descriptor; these "
114 "signals are silently ignored if specified in I<mask>."
115 msgstr ""
116
117 #. type: Plain text
118 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
119 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
120 msgid ""
121 "If the I<fd> argument is -1, then the call creates a new file descriptor and "
122 "associates the signal set specified in I<mask> with that file descriptor. "
123 "If I<fd> is not -1, then it must specify a valid existing signalfd file "
124 "descriptor, and I<mask> is used to replace the signal set associated with "
125 "that file descriptor."
126 msgstr ""
127
128 #. type: Plain text
129 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
130 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
131 msgid ""
132 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
133 "I<flags> to change the behavior of B<signalfd>():"
134 msgstr ""
135
136 #. type: TP
137 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
138 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
139 #, no-wrap
140 msgid "B<SFD_NONBLOCK>"
141 msgstr ""
142
143 #. type: Plain text
144 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
145 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
146 msgid ""
147 "Set the B<O_NONBLOCK> file status flag on the open file description (see "
148 "B<open>(2)) referred to by the new file descriptor. Using this flag saves "
149 "extra calls to B<fcntl>(2) to achieve the same result."
150 msgstr ""
151
152 #. type: TP
153 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
154 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
155 #, no-wrap
156 msgid "B<SFD_CLOEXEC>"
157 msgstr ""
158
159 #. type: Plain text
160 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
161 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
162 msgid ""
163 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See "
164 "the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this "
165 "may be useful."
166 msgstr ""
167
168 #. type: Plain text
169 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
170 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
171 msgid ""
172 "Up to Linux 2.6.26, the I<flags> argument is unused, and must be specified "
173 "as zero."
174 msgstr ""
175
176 #. type: Plain text
177 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
178 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
179 msgid ""
180 "B<signalfd>() returns a file descriptor that supports the following "
181 "operations:"
182 msgstr ""
183
184 #. type: TP
185 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
186 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
187 #, no-wrap
188 msgid "B<read>(2)"
189 msgstr ""
190
191 #. type: Plain text
192 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
193 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
194 msgid ""
195 "If one or more of the signals specified in I<mask> is pending for the "
196 "process, then the buffer supplied to B<read>(2) is used to return one or "
197 "more I<signalfd_siginfo> structures (see below) that describe the signals. "
198 "The B<read>(2) returns information for as many signals as are pending and "
199 "will fit in the supplied buffer. The buffer must be at least "
200 "I<sizeof(struct signalfd_siginfo)> bytes. The return value of the "
201 "B<read>(2) is the total number of bytes read."
202 msgstr ""
203
204 #. type: Plain text
205 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
206 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
207 msgid ""
208 "As a consequence of the B<read>(2), the signals are consumed, so that they "
209 "are no longer pending for the process (i.e., will not be caught by signal "
210 "handlers, and cannot be accepted using B<sigwaitinfo>(2))."
211 msgstr ""
212
213 #. type: Plain text
214 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
215 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
216 msgid ""
217 "If none of the signals in I<mask> is pending for the process, then the "
218 "B<read>(2) either blocks until one of the signals in I<mask> is generated "
219 "for the process, or fails with the error B<EAGAIN> if the file descriptor "
220 "has been made nonblocking."
221 msgstr ""
222
223 #. type: TP
224 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
225 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
226 #, no-wrap
227 msgid "B<poll>(2)"
228 msgstr ""
229
230 #. type: TQ
231 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
232 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
233 #, no-wrap
234 msgid "B<select>(2)"
235 msgstr ""
236
237 #. type: TQ
238 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
239 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
240 #, no-wrap
241 msgid "(and similar)"
242 msgstr ""
243
244 #. type: Plain text
245 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
246 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
247 msgid ""
248 "The file descriptor is readable (the B<select>(2) I<readfds> argument; the "
249 "B<poll>(2) B<POLLIN> flag) if one or more of the signals in I<mask> is "
250 "pending for the process."
251 msgstr ""
252
253 #. type: Plain text
254 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
255 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
256 msgid ""
257 "The signalfd file descriptor also supports the other file-descriptor "
258 "multiplexing APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
259 msgstr ""
260
261 #. type: TP
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 #, no-wrap
265 msgid "B<close>(2)"
266 msgstr ""
267
268 #. type: Plain text
269 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
270 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
271 msgid ""
272 "When the file descriptor is no longer required it should be closed. When "
273 "all file descriptors associated with the same signalfd object have been "
274 "closed, the resources for object are freed by the kernel."
275 msgstr ""
276
277 #. type: SS
278 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
279 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
280 #, no-wrap
281 msgid "The signalfd_siginfo structure"
282 msgstr ""
283
284 #. type: Plain text
285 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
286 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
287 msgid ""
288 "The format of the I<signalfd_siginfo> structure(s) returned by B<read>(2)s "
289 "from a signalfd file descriptor is as follows:"
290 msgstr ""
291
292 #. ssi_trapno is unused on most arches
293 #. ssi_addr_lsb: commit b8aeec34175fc8fe8b0d40efea4846dfc1ba663e
294 #. type: Plain text
295 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
296 #: opensuse-tumbleweed
297 #, no-wrap
298 msgid ""
299 "struct signalfd_siginfo {\n"
300 " uint32_t ssi_signo; /* Signal number */\n"
301 " int32_t ssi_errno; /* Error number (unused) */\n"
302 " int32_t ssi_code; /* Signal code */\n"
303 " uint32_t ssi_pid; /* PID of sender */\n"
304 " uint32_t ssi_uid; /* Real UID of sender */\n"
305 " int32_t ssi_fd; /* File descriptor (SIGIO) */\n"
306 " uint32_t ssi_tid; /* Kernel timer ID (POSIX timers)\n"
307 " uint32_t ssi_band; /* Band event (SIGIO) */\n"
308 " uint32_t ssi_overrun; /* POSIX timer overrun count */\n"
309 " uint32_t ssi_trapno; /* Trap number that caused signal */\n"
310 " int32_t ssi_status; /* Exit status or signal (SIGCHLD) */\n"
311 " int32_t ssi_int; /* Integer sent by sigqueue(3) */\n"
312 " uint64_t ssi_ptr; /* Pointer sent by sigqueue(3) */\n"
313 " uint64_t ssi_utime; /* User CPU time consumed (SIGCHLD) */\n"
314 " uint64_t ssi_stime; /* System CPU time consumed\n"
315 " (SIGCHLD) */\n"
316 " uint64_t ssi_addr; /* Address that generated signal\n"
317 " (for hardware-generated signals) */\n"
318 " uint16_t ssi_addr_lsb; /* Least significant bit of address\n"
319 " (SIGBUS; since Linux 2.6.37) */\n"
320 " uint8_t pad[\\f[I]X\\fR]; /* Pad size to 128 bytes (allow for\n"
321 " additional fields in the future) */\n"
322 "};\n"
323 msgstr ""
324
325 #. type: Plain text
326 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
327 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
328 msgid ""
329 "Each of the fields in this structure is analogous to the similarly named "
330 "field in the I<siginfo_t> structure. The I<siginfo_t> structure is "
331 "described in B<sigaction>(2). Not all fields in the returned "
332 "I<signalfd_siginfo> structure will be valid for a specific signal; the set "
333 "of valid fields can be determined from the value returned in the I<ssi_code> "
334 "field. This field is the analog of the I<siginfo_t> I<si_code> field; see "
335 "B<sigaction>(2) for details."
336 msgstr ""
337
338 #. type: SS
339 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
340 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
341 #, no-wrap
342 msgid "fork(2) semantics"
343 msgstr ""
344
345 #. type: Plain text
346 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
347 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
348 msgid ""
349 "After a B<fork>(2), the child inherits a copy of the signalfd file "
350 "descriptor. A B<read>(2) from the file descriptor in the child will return "
351 "information about signals queued to the child."
352 msgstr ""
353
354 #. type: SS
355 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
356 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
357 #, no-wrap
358 msgid "Semantics of file descriptor passing"
359 msgstr ""
360
361 #. type: Plain text
362 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
363 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
364 msgid ""
365 "As with other file descriptors, signalfd file descriptors can be passed to "
366 "another process via a UNIX domain socket (see B<unix>(7)). In the receiving "
367 "process, a B<read>(2) from the received file descriptor will return "
368 "information about signals queued to that process."
369 msgstr ""
370
371 #. type: SS
372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
374 #, no-wrap
375 msgid "execve(2) semantics"
376 msgstr ""
377
378 #. type: Plain text
379 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
380 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
381 msgid ""
382 "Just like any other file descriptor, a signalfd file descriptor remains open "
383 "across an B<execve>(2), unless it has been marked for close-on-exec (see "
384 "B<fcntl>(2)). Any signals that were available for reading before the "
385 "B<execve>(2) remain available to the newly loaded program. (This is "
386 "analogous to traditional signal semantics, where a blocked signal that is "
387 "pending remains pending across an B<execve>(2).)"
388 msgstr ""
389
390 #. type: SS
391 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
392 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
393 #, no-wrap
394 msgid "Thread semantics"
395 msgstr ""
396
397 #. type: Plain text
398 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
399 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
400 msgid ""
401 "The semantics of signalfd file descriptors in a multithreaded program mirror "
402 "the standard semantics for signals. In other words, when a thread reads "
403 "from a signalfd file descriptor, it will read the signals that are directed "
404 "to the thread itself and the signals that are directed to the process (i.e., "
405 "the entire thread group). (A thread will not be able to read signals that "
406 "are directed to other threads in the process.)"
407 msgstr ""
408
409 #. type: SS
410 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
411 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
412 #, no-wrap
413 msgid "epoll(7) semantics"
414 msgstr ""
415
416 #. type: Plain text
417 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
418 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
419 msgid ""
420 "If a process adds (via B<epoll_ctl>(2)) a signalfd file descriptor to an "
421 "B<epoll>(7) instance, then B<epoll_wait>(2) returns events only for "
422 "signals sent to that process. In particular, if the process then uses "
423 "B<fork>(2) to create a child process, then the child will be able to "
424 "B<read>(2) signals that are sent to it using the signalfd file descriptor, "
425 "but B<epoll_wait>(2) will B<not> indicate that the signalfd file descriptor "
426 "is ready. In this scenario, a possible workaround is that after the "
427 "B<fork>(2), the child process can close the signalfd file descriptor that it "
428 "inherited from the parent process and then create another signalfd file "
429 "descriptor and add it to the epoll instance. Alternatively, the parent and "
430 "the child could delay creating their (separate) signalfd file descriptors "
431 "and adding them to the epoll instance until after the call to B<fork>(2)."
432 msgstr ""
433
434 #. type: SH
435 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
436 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
437 #, no-wrap
438 msgid "RETURN VALUE"
439 msgstr ""
440
441 #. type: Plain text
442 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
443 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
444 msgid ""
445 "On success, B<signalfd>() returns a signalfd file descriptor; this is "
446 "either a new file descriptor (if I<fd> was -1), or I<fd> if I<fd> was a "
447 "valid signalfd file descriptor. On error, -1 is returned and I<errno> is "
448 "set to indicate the error."
449 msgstr ""
450
451 #. type: SH
452 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
453 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
454 #, no-wrap
455 msgid "ERRORS"
456 msgstr ""
457
458 #. type: TP
459 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
460 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
461 #, no-wrap
462 msgid "B<EBADF>"
463 msgstr ""
464
465 #. type: Plain text
466 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
467 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
468 msgid "The I<fd> file descriptor is not a valid file descriptor."
469 msgstr ""
470
471 #. type: TP
472 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
473 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
474 #, no-wrap
475 msgid "B<EINVAL>"
476 msgstr ""
477
478 #. or, the
479 #. .I sizemask
480 #. argument is not equal to
481 #. .IR sizeof(sigset_t) ;
482 #. type: Plain text
483 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
484 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
485 msgid "I<fd> is not a valid signalfd file descriptor."
486 msgstr ""
487
488 #. type: Plain text
489 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
490 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
491 msgid ""
492 "I<flags> is invalid; or, in Linux 2.6.26 or earlier, I<flags> is nonzero."
493 msgstr ""
494
495 #. type: TP
496 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
497 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
498 #, no-wrap
499 msgid "B<EMFILE>"
500 msgstr ""
501
502 #. type: Plain text
503 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
504 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
505 msgid ""
506 "The per-process limit on the number of open file descriptors has been "
507 "reached."
508 msgstr ""
509
510 #. type: TP
511 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
512 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
513 #, no-wrap
514 msgid "B<ENFILE>"
515 msgstr ""
516
517 #. type: Plain text
518 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
519 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
520 msgid ""
521 "The system-wide limit on the total number of open files has been reached."
522 msgstr ""
523
524 #. type: TP
525 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
526 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
527 #, no-wrap
528 msgid "B<ENODEV>"
529 msgstr ""
530
531 #. type: Plain text
532 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
533 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
534 msgid "Could not mount (internal) anonymous inode device."
535 msgstr ""
536
537 #. type: TP
538 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
539 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
540 #, no-wrap
541 msgid "B<ENOMEM>"
542 msgstr ""
543
544 #. type: Plain text
545 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
546 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
547 msgid "There was insufficient memory to create a new signalfd file descriptor."
548 msgstr ""
549
550 #. type: SH
551 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
552 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
553 #, no-wrap
554 msgid "VERSIONS"
555 msgstr ""
556
557 #. type: SS
558 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
559 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
560 #, no-wrap
561 msgid "C library/kernel differences"
562 msgstr ""
563
564 #. type: Plain text
565 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
566 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
567 msgid ""
568 "The underlying Linux system call requires an additional argument, I<size_t "
569 "sizemask>, which specifies the size of the I<mask> argument. The glibc "
570 "B<signalfd>() wrapper function does not include this argument, since it "
571 "provides the required value for the underlying system call."
572 msgstr ""
573
574 #. type: Plain text
575 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
576 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
577 msgid ""
578 "There are two underlying Linux system calls: B<signalfd>() and the more "
579 "recent B<signalfd4>(). The former system call does not implement a I<flags> "
580 "argument. The latter system call implements the I<flags> values described "
581 "above. Starting with glibc 2.9, the B<signalfd>() wrapper function will "
582 "use B<signalfd4>() where it is available."
583 msgstr ""
584
585 #. type: SH
586 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
587 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
588 #, no-wrap
589 msgid "STANDARDS"
590 msgstr ""
591
592 #. type: Plain text
593 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
594 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
595 msgid "Linux."
596 msgstr ""
597
598 #. type: SH
599 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
600 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
601 #, no-wrap
602 msgid "HISTORY"
603 msgstr ""
604
605 #. type: TP
606 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
607 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
608 #, no-wrap
609 msgid "B<signalfd>()"
610 msgstr ""
611
612 #. signalfd() is in glibc 2.7, but reportedly does not build
613 #. type: Plain text
614 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
615 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
616 msgid "Linux 2.6.22, glibc 2.8."
617 msgstr ""
618
619 #. type: TP
620 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
621 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
622 #, no-wrap
623 msgid "B<signalfd4>()"
624 msgstr ""
625
626 #. type: Plain text
627 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
628 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
629 msgid "Linux 2.6.27."
630 msgstr ""
631
632 #. type: SH
633 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
634 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
635 #, no-wrap
636 msgid "NOTES"
637 msgstr ""
638
639 #. type: Plain text
640 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
641 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
642 msgid ""
643 "A process can create multiple signalfd file descriptors. This makes it "
644 "possible to accept different signals on different file descriptors. (This "
645 "may be useful if monitoring the file descriptors using B<select>(2), "
646 "B<poll>(2), or B<epoll>(7): the arrival of different signals will make "
647 "different file descriptors ready.) If a signal appears in the I<mask> of "
648 "more than one of the file descriptors, then occurrences of that signal can "
649 "be read (once) from any one of the file descriptors."
650 msgstr ""
651
652 #. type: Plain text
653 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
654 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
655 msgid ""
656 "Attempts to include B<SIGKILL> and B<SIGSTOP> in I<mask> are silently "
657 "ignored."
658 msgstr ""
659
660 #. type: Plain text
661 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
662 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
663 msgid ""
664 "The signal mask employed by a signalfd file descriptor can be viewed via the "
665 "entry for the corresponding file descriptor in the process's I</proc/>pidI</"
666 "fdinfo> directory. See B<proc>(5) for further details."
667 msgstr ""
668
669 #. type: SS
670 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
671 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
672 #, no-wrap
673 msgid "Limitations"
674 msgstr ""
675
676 #. type: Plain text
677 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
678 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
679 msgid ""
680 "The signalfd mechanism can't be used to receive signals that are "
681 "synchronously generated, such as the B<SIGSEGV> signal that results from "
682 "accessing an invalid memory address or the B<SIGFPE> signal that results "
683 "from an arithmetic error. Such signals can be caught only via signal "
684 "handler."
685 msgstr ""
686
687 #. type: Plain text
688 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
689 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
690 msgid ""
691 "As described above, in normal usage one blocks the signals that will be "
692 "accepted via B<signalfd>(). If spawning a child process to execute a helper "
693 "program (that does not need the signalfd file descriptor), then, after the "
694 "call to B<fork>(2), you will normally want to unblock those signals before "
695 "calling B<execve>(2), so that the helper program can see any signals that it "
696 "expects to see. Be aware, however, that this won't be possible in the case "
697 "of a helper program spawned behind the scenes by any library function that "
698 "the program may call. In such cases, one must fall back to using a "
699 "traditional signal handler that writes to a file descriptor monitored by "
700 "B<select>(2), B<poll>(2), or B<epoll>(7)."
701 msgstr ""
702
703 #. type: SH
704 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
705 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
706 #, no-wrap
707 msgid "BUGS"
708 msgstr ""
709
710 #. The fix also was put into Linux 2.6.24.5
711 #. type: Plain text
712 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
713 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
714 msgid ""
715 "Before Linux 2.6.25, the I<ssi_ptr> and I<ssi_int> fields are not filled in "
716 "with the data accompanying a signal sent by B<sigqueue>(3)."
717 msgstr ""
718
719 #. type: SH
720 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
721 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
722 #, no-wrap
723 msgid "EXAMPLES"
724 msgstr ""
725
726 #. type: Plain text
727 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
728 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
729 msgid ""
730 "The program below accepts the signals B<SIGINT> and B<SIGQUIT> via a "
731 "signalfd file descriptor. The program terminates after accepting a "
732 "B<SIGQUIT> signal. The following shell session demonstrates the use of the "
733 "program:"
734 msgstr ""
735
736 #. type: Plain text
737 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
738 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
739 #, no-wrap
740 msgid ""
741 "$B< ./signalfd_demo>\n"
742 "B<\\[ha]C> # Control-C generates SIGINT\n"
743 "Got SIGINT\n"
744 "B<\\[ha]C>\n"
745 "Got SIGINT\n"
746 "B<\\[ha]\\[rs]> # Control-\\[rs] generates SIGQUIT\n"
747 "Got SIGQUIT\n"
748 "$\n"
749 msgstr ""
750
751 #. type: SS
752 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
753 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
754 #, no-wrap
755 msgid "Program source"
756 msgstr ""
757
758 #. type: Plain text
759 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
760 #: opensuse-tumbleweed
761 #, no-wrap
762 msgid ""
763 "#include E<lt>err.hE<gt>\n"
764 "#include E<lt>signal.hE<gt>\n"
765 "#include E<lt>stdio.hE<gt>\n"
766 "#include E<lt>stdlib.hE<gt>\n"
767 "#include E<lt>sys/signalfd.hE<gt>\n"
768 "#include E<lt>sys/types.hE<gt>\n"
769 "#include E<lt>unistd.hE<gt>\n"
770 "\\&\n"
771 "int\n"
772 "main(void)\n"
773 "{\n"
774 " int sfd;\n"
775 " ssize_t s;\n"
776 " sigset_t mask;\n"
777 " struct signalfd_siginfo fdsi;\n"
778 "\\&\n"
779 " sigemptyset(&mask);\n"
780 " sigaddset(&mask, SIGINT);\n"
781 " sigaddset(&mask, SIGQUIT);\n"
782 "\\&\n"
783 " /* Block signals so that they aren\\[aq]t handled\n"
784 " according to their default dispositions. */\n"
785 "\\&\n"
786 " if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n"
787 " err(EXIT_FAILURE, \"sigprocmask\");\n"
788 "\\&\n"
789 " sfd = signalfd(-1, &mask, 0);\n"
790 " if (sfd == -1)\n"
791 " err(EXIT_FAILURE, \"signalfd\");\n"
792 "\\&\n"
793 " for (;;) {\n"
794 " s = read(sfd, &fdsi, sizeof(fdsi));\n"
795 " if (s != sizeof(fdsi))\n"
796 " err(EXIT_FAILURE, \"read\");\n"
797 "\\&\n"
798 " if (fdsi.ssi_signo == SIGINT) {\n"
799 " printf(\"Got SIGINT\\[rs]n\");\n"
800 " } else if (fdsi.ssi_signo == SIGQUIT) {\n"
801 " printf(\"Got SIGQUIT\\[rs]n\");\n"
802 " exit(EXIT_SUCCESS);\n"
803 " } else {\n"
804 " printf(\"Read unexpected signal\\[rs]n\");\n"
805 " }\n"
806 " }\n"
807 "}\n"
808 msgstr ""
809
810 #. SRC END
811 #. type: SH
812 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
813 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
814 #, no-wrap
815 msgid "SEE ALSO"
816 msgstr ""
817
818 #. type: Plain text
819 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
820 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
821 msgid ""
822 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<sigaction>(2), "
823 "B<sigprocmask>(2), B<sigwaitinfo>(2), B<timerfd_create>(2), B<sigsetops>(3), "
824 "B<sigwait>(3), B<epoll>(7), B<signal>(7)"
825 msgstr ""
826
827 #. type: TH
828 #: debian-trixie
829 #, no-wrap
830 msgid "2024-06-15"
831 msgstr ""
832
833 #. type: TH
834 #: debian-trixie
835 #, no-wrap
836 msgid "Linux man-pages 6.9.1"
837 msgstr ""
838
839 #. type: Plain text
840 #: debian-trixie
841 msgid "Standard C library (I<libc>, I<-lc>)"
842 msgstr ""
843
844 #. ssi_trapno is unused on most arches
845 #. ssi_addr_lsb: commit b8aeec34175fc8fe8b0d40efea4846dfc1ba663e
846 #. type: Plain text
847 #: debian-trixie fedora-44 fedora-rawhide
848 #, no-wrap
849 msgid ""
850 "struct signalfd_siginfo {\n"
851 " uint32_t ssi_signo; /* Signal number */\n"
852 " int32_t ssi_errno; /* Error number (unused) */\n"
853 " int32_t ssi_code; /* Signal code */\n"
854 " uint32_t ssi_pid; /* PID of sender */\n"
855 " uint32_t ssi_uid; /* Real UID of sender */\n"
856 " int32_t ssi_fd; /* File descriptor (SIGIO) */\n"
857 " uint32_t ssi_tid; /* Kernel timer ID (POSIX timers)\n"
858 " uint32_t ssi_band; /* Band event (SIGIO) */\n"
859 " uint32_t ssi_overrun; /* POSIX timer overrun count */\n"
860 " uint32_t ssi_trapno; /* Trap number that caused signal */\n"
861 " int32_t ssi_status; /* Exit status or signal (SIGCHLD) */\n"
862 " int32_t ssi_int; /* Integer sent by sigqueue(3) */\n"
863 " uint64_t ssi_ptr; /* Pointer sent by sigqueue(3) */\n"
864 " uint64_t ssi_utime; /* User CPU time consumed (SIGCHLD) */\n"
865 " uint64_t ssi_stime; /* System CPU time consumed\n"
866 " (SIGCHLD) */\n"
867 " uint64_t ssi_addr; /* Address that generated signal\n"
868 " (for hardware-generated signals) */\n"
869 " uint16_t ssi_addr_lsb; /* Least significant bit of address\n"
870 " (SIGBUS; since Linux 2.6.37) */\n"
871 " uint8_t pad[I<X>]; /* Pad size to 128 bytes (allow for\n"
872 " additional fields in the future) */\n"
873 "};\n"
874 msgstr ""
875
876 #. type: Plain text
877 #: debian-trixie fedora-44 fedora-rawhide
878 #, no-wrap
879 msgid ""
880 "#include E<lt>err.hE<gt>\n"
881 "#include E<lt>signal.hE<gt>\n"
882 "#include E<lt>stdio.hE<gt>\n"
883 "#include E<lt>stdlib.hE<gt>\n"
884 "#include E<lt>sys/signalfd.hE<gt>\n"
885 "#include E<lt>sys/types.hE<gt>\n"
886 "#include E<lt>unistd.hE<gt>\n"
887 "\\&\n"
888 "int\n"
889 "main(void)\n"
890 "{\n"
891 " int sfd;\n"
892 " ssize_t s;\n"
893 " sigset_t mask;\n"
894 " struct signalfd_siginfo fdsi;\n"
895 "\\&\n"
896 " sigemptyset(&mask);\n"
897 " sigaddset(&mask, SIGINT);\n"
898 " sigaddset(&mask, SIGQUIT);\n"
899 "\\&\n"
900 " /* Block signals so that they aren\\[aq]t handled\n"
901 " according to their default dispositions. */\n"
902 "\\&\n"
903 " if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)\n"
904 " err(EXIT_FAILURE, \"sigprocmask\");\n"
905 "\\&\n"
906 " sfd = signalfd(-1, &mask, 0);\n"
907 " if (sfd == -1)\n"
908 " err(EXIT_FAILURE, \"signalfd\");\n"
909 "\\&\n"
910 " for (;;) {\n"
911 " s = read(sfd, &fdsi, sizeof(fdsi));\n"
912 " if (s != sizeof(fdsi))\n"
913 " err(EXIT_FAILURE, \"read\");\n"
914 "\\&\n"
915 " if (fdsi.ssi_signo == SIGINT) {\n"
916 " printf(\"Got SIGINT\\[rs]n\");\n"
917 " } else if (fdsi.ssi_signo == SIGQUIT) {\n"
918 " printf(\"Got SIGQUIT\\[rs]n\");\n"
919 " exit(EXIT_SUCCESS);\n"
920 " } else {\n"
921 " printf(\"Read unexpected signal\\[rs]n\");\n"
922 " }\n"
923 " }\n"
924 "}\n"
925 msgstr ""
926
927 #. type: TH
928 #: fedora-44 fedora-rawhide
929 #, no-wrap
930 msgid "2024-07-23"
931 msgstr ""
932
933 #. type: TH
934 #: fedora-44 fedora-rawhide
935 #, no-wrap
936 msgid "Linux man-pages 6.13"
937 msgstr ""
938
939 #. type: TH
940 #: mageia-cauldron
941 #, no-wrap
942 msgid "Linux man-pages 6.17"
943 msgstr ""
944
945 #. type: TH
946 #: opensuse-leap-16-1 opensuse-tumbleweed
947 #, no-wrap
948 msgid "Linux man-pages (unreleased)"
949 msgstr ""