Debian Codegraph @

templates/man2/pidfd_open.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:34+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 "pidfd_open"
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-unstable mageia-cauldron opensuse-leap-16-1
48 #: opensuse-tumbleweed
49 msgid "pidfd_open - obtain a file descriptor that refers to a task"
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 ""
77 "B<#include E<lt>sys/syscall.hE<gt>> /* Definition of B<SYS_*> constants */\n"
78 "B<#include E<lt>unistd.hE<gt>>\n"
79 msgstr ""
80
81 #. type: Plain text
82 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
83 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
84 #, no-wrap
85 msgid "B<int syscall(SYS_pidfd_open, pid_t >I<pid>B<, unsigned int >I<flags>B<);>\n"
86 msgstr ""
87
88 #. type: Plain text
89 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
90 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
91 msgid ""
92 "I<Note>: glibc provides no wrapper for B<pidfd_open>(), necessitating the "
93 "use of B<syscall>(2)."
94 msgstr ""
95
96 #. type: SH
97 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
98 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
99 #, no-wrap
100 msgid "DESCRIPTION"
101 msgstr ""
102
103 #. type: Plain text
104 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
105 #: opensuse-tumbleweed
106 msgid ""
107 "The B<pidfd_open>() system call creates a file descriptor that refers to "
108 "the task referenced by I<pid>. The file descriptor is returned as the "
109 "function result; the close-on-exec flag is set on the file descriptor."
110 msgstr ""
111
112 #. type: Plain text
113 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
114 #: opensuse-tumbleweed
115 msgid ""
116 "The I<flags> argument either has the value 0, or contains the following "
117 "flags:"
118 msgstr ""
119
120 #. type: TP
121 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
122 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
123 #, no-wrap
124 msgid "B<PIDFD_NONBLOCK> (since Linux 5.10)"
125 msgstr ""
126
127 #. commit 4da9af0014b51c8b015ed8c622440ef28912efe6
128 #. type: Plain text
129 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
130 #: opensuse-tumbleweed
131 msgid ""
132 "Return a nonblocking file descriptor. If the task referred to by the file "
133 "descriptor has not yet terminated, then an attempt to wait on the file "
134 "descriptor using B<waitid>(2) will immediately return the error B<EAGAIN> "
135 "rather than blocking."
136 msgstr ""
137
138 #. type: TP
139 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
140 #: opensuse-tumbleweed
141 #, no-wrap
142 msgid "B<PIDFD_THREAD> (since Linux 6.9)"
143 msgstr ""
144
145 #. commit 64bef697d33b75fc06c5789b3f8108680271529f
146 #. type: Plain text
147 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
148 #: opensuse-tumbleweed
149 msgid ""
150 "Create a file descriptor that refers to a specific thread, rather than a "
151 "process (thread-group leader). If this flag is not set, I<pid> must refer "
152 "to a process."
153 msgstr ""
154
155 #. type: SH
156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
158 #, no-wrap
159 msgid "RETURN VALUE"
160 msgstr ""
161
162 #. type: Plain text
163 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
164 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
165 msgid ""
166 "On success, B<pidfd_open>() returns a file descriptor (a nonnegative "
167 "integer). On error, -1 is returned and I<errno> is set to indicate the "
168 "error."
169 msgstr ""
170
171 #. type: SH
172 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
173 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
174 #, no-wrap
175 msgid "ERRORS"
176 msgstr ""
177
178 #. type: TP
179 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
180 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
181 #, no-wrap
182 msgid "B<EINVAL>"
183 msgstr ""
184
185 #. type: Plain text
186 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
187 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
188 msgid "I<flags> is not valid."
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 "I<pid> is not valid."
195 msgstr ""
196
197 #. type: TP
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 #, no-wrap
201 msgid "B<EMFILE>"
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 "The per-process limit on the number of open file descriptors has been "
209 "reached (see the description of B<RLIMIT_NOFILE> in B<getrlimit>(2))."
210 msgstr ""
211
212 #. type: TP
213 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
214 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
215 #, no-wrap
216 msgid "B<ENFILE>"
217 msgstr ""
218
219 #. type: Plain text
220 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
221 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
222 msgid ""
223 "The system-wide limit on the total number of open files has been reached."
224 msgstr ""
225
226 #. type: TP
227 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
228 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
229 #, no-wrap
230 msgid "B<ENODEV>"
231 msgstr ""
232
233 #. type: Plain text
234 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
235 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
236 msgid "The anonymous inode filesystem is not available in this kernel."
237 msgstr ""
238
239 #. type: TP
240 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
241 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
242 #, no-wrap
243 msgid "B<ENOMEM>"
244 msgstr ""
245
246 #. type: Plain text
247 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
248 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
249 msgid "Insufficient kernel memory was available."
250 msgstr ""
251
252 #. type: TP
253 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
254 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
255 #, no-wrap
256 msgid "B<ESRCH>"
257 msgstr ""
258
259 #. type: Plain text
260 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
261 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
262 msgid "The process specified by I<pid> does not exist."
263 msgstr ""
264
265 #. type: SH
266 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
267 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
268 #, no-wrap
269 msgid "STANDARDS"
270 msgstr ""
271
272 #. type: Plain text
273 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
274 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
275 msgid "Linux."
276 msgstr ""
277
278 #. type: SH
279 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
280 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
281 #, no-wrap
282 msgid "HISTORY"
283 msgstr ""
284
285 #. type: Plain text
286 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
287 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
288 msgid "Linux 5.3."
289 msgstr ""
290
291 #. type: SH
292 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
293 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
294 #, no-wrap
295 msgid "NOTES"
296 msgstr ""
297
298 #. type: Plain text
299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
301 msgid ""
302 "The following code sequence can be used to obtain a file descriptor for the "
303 "child of B<fork>(2):"
304 msgstr ""
305
306 #. type: Plain text
307 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
308 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
309 #, no-wrap
310 msgid ""
311 "pid = fork();\n"
312 "if (pid E<gt> 0) { /* If parent */\n"
313 " pidfd = pidfd_open(pid, 0);\n"
314 " ...\n"
315 "}\n"
316 msgstr ""
317
318 #. type: Plain text
319 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
320 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
321 msgid ""
322 "Even if the child has already terminated by the time of the B<pidfd_open>() "
323 "call, its PID will not have been recycled and the returned file descriptor "
324 "will refer to the resulting zombie process. Note, however, that this is "
325 "guaranteed only if the following conditions hold true:"
326 msgstr ""
327
328 #. type: IP
329 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
330 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
331 #, no-wrap
332 msgid "\\[bu]"
333 msgstr ""
334
335 #. type: Plain text
336 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
337 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
338 msgid ""
339 "the disposition of B<SIGCHLD> has not been explicitly set to B<SIG_IGN> (see "
340 "B<sigaction>(2));"
341 msgstr ""
342
343 #. type: Plain text
344 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
345 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
346 msgid ""
347 "the B<SA_NOCLDWAIT> flag was not specified while establishing a handler for "
348 "B<SIGCHLD> or while setting the disposition of that signal to B<SIG_DFL> "
349 "(see B<sigaction>(2)); and"
350 msgstr ""
351
352 #. type: Plain text
353 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
354 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
355 msgid ""
356 "the zombie process was not reaped elsewhere in the program (e.g., either by "
357 "an asynchronously executed signal handler or by B<wait>(2) or similar in "
358 "another thread)."
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 "If any of these conditions does not hold, then the child process (along with "
366 "a PID file descriptor that refers to it) should instead be created using "
367 "B<clone>(2) with the B<CLONE_PIDFD> flag."
368 msgstr ""
369
370 #. type: SS
371 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
372 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
373 #, no-wrap
374 msgid "Use cases for PID file descriptors"
375 msgstr ""
376
377 #. type: Plain text
378 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
379 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
380 msgid ""
381 "A PID file descriptor returned by B<pidfd_open>() (or by B<clone>(2) with "
382 "the B<CLONE_PID> flag) can be used for the following purposes:"
383 msgstr ""
384
385 #. type: Plain text
386 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
387 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
388 msgid ""
389 "The B<pidfd_send_signal>(2) system call can be used to send a signal to the "
390 "process referred to by a PID file descriptor."
391 msgstr ""
392
393 #. type: Plain text
394 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
395 #: opensuse-tumbleweed
396 msgid ""
397 "A PID file descriptor can be monitored using B<poll>(2), B<select>(2), and "
398 "B<epoll>(7)."
399 msgstr ""
400
401 #. commit 43f0df54c96f
402 #. type: Plain text
403 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
404 #: opensuse-tumbleweed
405 msgid ""
406 "When the task that it refers to terminates and becomes a zombie, these "
407 "interfaces indicate the file descriptor as readable (B<EPOLLIN>). When the "
408 "task is reaped, these interfaces produce a hangup event (B<EPOLLHUP>)."
409 msgstr ""
410
411 #. type: Plain text
412 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
413 #: opensuse-tumbleweed
414 msgid ""
415 "Note, however, that in the current implementation, nothing can be read from "
416 "the file descriptor (B<read>(2) on the file descriptor fails with the error "
417 "B<EINVAL>). The polling behavior depends on whether B<PIDFD_THREAD> flag "
418 "was used when obtaining the file descriptor:"
419 msgstr ""
420
421 #. type: Plain text
422 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
423 #: opensuse-tumbleweed
424 msgid ""
425 "With B<PIDFD_THREAD>, the file descriptor becomes readable when the task "
426 "exits and becomes a zombie, even if the thread-group is not empty."
427 msgstr ""
428
429 #. type: Plain text
430 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
431 #: opensuse-tumbleweed
432 msgid ""
433 "Without B<PIDFD_THREAD>, the file descriptor becomes readable only when the "
434 "last thread in the thread group exits."
435 msgstr ""
436
437 #. type: Plain text
438 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
439 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
440 msgid ""
441 "If the PID file descriptor refers to a child of the calling process, then it "
442 "can be waited on using B<waitid>(2)."
443 msgstr ""
444
445 #. type: Plain text
446 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
447 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
448 msgid ""
449 "The B<pidfd_getfd>(2) system call can be used to obtain a duplicate of a "
450 "file descriptor of another process referred to by a PID file descriptor."
451 msgstr ""
452
453 #. type: Plain text
454 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
455 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
456 msgid ""
457 "A PID file descriptor can be used as the argument of B<setns>(2) in order "
458 "to move into one or more of the same namespaces as the process referred to "
459 "by the file descriptor."
460 msgstr ""
461
462 #. type: Plain text
463 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
464 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
465 msgid ""
466 "A PID file descriptor can be used as the argument of B<process_madvise>(2) "
467 "in order to provide advice on the memory usage patterns of the process "
468 "referred to by the file descriptor."
469 msgstr ""
470
471 #. type: Plain text
472 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
473 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
474 msgid ""
475 "The B<pidfd_open>() system call is the preferred way of obtaining a PID "
476 "file descriptor for an already existing process. The alternative is to "
477 "obtain a file descriptor by opening a I</proc/>pid directory. However, the "
478 "latter technique is possible only if the B<proc>(5) filesystem is mounted; "
479 "furthermore, the file descriptor obtained in this way is I<not> pollable and "
480 "can't be waited on with B<waitid>(2)."
481 msgstr ""
482
483 #. type: SH
484 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
485 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
486 #, no-wrap
487 msgid "EXAMPLES"
488 msgstr ""
489
490 #. type: Plain text
491 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
492 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
493 msgid ""
494 "The program below opens a PID file descriptor for the process whose PID is "
495 "specified as its command-line argument. It then uses B<poll>(2) to monitor "
496 "the file descriptor for process exit, as indicated by an B<EPOLLIN> event."
497 msgstr ""
498
499 #. type: SS
500 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
501 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
502 #, no-wrap
503 msgid "Program source"
504 msgstr ""
505
506 #. type: Plain text
507 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
508 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
509 #, no-wrap
510 msgid ""
511 "#define _GNU_SOURCE\n"
512 "#include E<lt>poll.hE<gt>\n"
513 "#include E<lt>stdio.hE<gt>\n"
514 "#include E<lt>stdlib.hE<gt>\n"
515 "#include E<lt>sys/syscall.hE<gt>\n"
516 "#include E<lt>sys/types.hE<gt>\n"
517 "#include E<lt>unistd.hE<gt>\n"
518 "\\&\n"
519 "static int\n"
520 "pidfd_open(pid_t pid, unsigned int flags)\n"
521 "{\n"
522 " return syscall(SYS_pidfd_open, pid, flags);\n"
523 "}\n"
524 "\\&\n"
525 "int\n"
526 "main(int argc, char *argv[])\n"
527 "{\n"
528 " int pidfd, ready;\n"
529 " struct pollfd pollfd;\n"
530 "\\&\n"
531 " if (argc != 2) {\n"
532 " fprintf(stderr, \"Usage: %s E<lt>pidE<gt>\\[rs]n\", argv[0]);\n"
533 " exit(EXIT_SUCCESS);\n"
534 " }\n"
535 "\\&\n"
536 " pidfd = pidfd_open(atoi(argv[1]), 0);\n"
537 " if (pidfd == -1) {\n"
538 " perror(\"pidfd_open\");\n"
539 " exit(EXIT_FAILURE);\n"
540 " }\n"
541 "\\&\n"
542 " pollfd.fd = pidfd;\n"
543 " pollfd.events = POLLIN;\n"
544 "\\&\n"
545 " ready = poll(&pollfd, 1, -1);\n"
546 " if (ready == -1) {\n"
547 " perror(\"poll\");\n"
548 " exit(EXIT_FAILURE);\n"
549 " }\n"
550 "\\&\n"
551 " printf(\"Events (%#x): POLLIN is %sset\\[rs]n\", pollfd.revents,\n"
552 " (pollfd.revents & POLLIN) ? \"\" : \"not \");\n"
553 "\\&\n"
554 " close(pidfd);\n"
555 " exit(EXIT_SUCCESS);\n"
556 "}\n"
557 msgstr ""
558
559 #. SRC END
560 #. type: SH
561 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
562 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
563 #, no-wrap
564 msgid "SEE ALSO"
565 msgstr ""
566
567 #. type: Plain text
568 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
569 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
570 msgid ""
571 "B<clone>(2), B<kill>(2), B<pidfd_getfd>(2), B<pidfd_send_signal>(2), "
572 "B<poll>(2), B<process_madvise>(2), B<select>(2), B<setns>(2), B<waitid>(2), "
573 "B<epoll>(7)"
574 msgstr ""
575
576 #. type: TH
577 #: debian-trixie
578 #, no-wrap
579 msgid "2024-06-15"
580 msgstr ""
581
582 #. type: TH
583 #: debian-trixie
584 #, no-wrap
585 msgid "Linux man-pages 6.9.1"
586 msgstr ""
587
588 #. type: Plain text
589 #: debian-trixie fedora-44 fedora-rawhide
590 msgid "pidfd_open - obtain a file descriptor that refers to a process"
591 msgstr ""
592
593 #. type: Plain text
594 #: debian-trixie
595 msgid "Standard C library (I<libc>, I<-lc>)"
596 msgstr ""
597
598 #. type: Plain text
599 #: debian-trixie fedora-44 fedora-rawhide
600 msgid ""
601 "The B<pidfd_open>() system call creates a file descriptor that refers to "
602 "the process whose PID is specified in I<pid>. The file descriptor is "
603 "returned as the function result; the close-on-exec flag is set on the file "
604 "descriptor."
605 msgstr ""
606
607 #. type: Plain text
608 #: debian-trixie fedora-44 fedora-rawhide
609 msgid ""
610 "The I<flags> argument either has the value 0, or contains the following flag:"
611 msgstr ""
612
613 #. commit 4da9af0014b51c8b015ed8c622440ef28912efe6
614 #. type: Plain text
615 #: debian-trixie fedora-44 fedora-rawhide
616 msgid ""
617 "Return a nonblocking file descriptor. If the process referred to by the "
618 "file descriptor has not yet terminated, then an attempt to wait on the file "
619 "descriptor using B<waitid>(2) will immediately return the error B<EAGAIN> "
620 "rather than blocking."
621 msgstr ""
622
623 #. type: Plain text
624 #: debian-trixie fedora-44 fedora-rawhide
625 msgid ""
626 "A PID file descriptor can be monitored using B<poll>(2), B<select>(2), and "
627 "B<epoll>(7). When the process that it refers to terminates, these "
628 "interfaces indicate the file descriptor as readable. Note, however, that in "
629 "the current implementation, nothing can be read from the file descriptor "
630 "(B<read>(2) on the file descriptor fails with the error B<EINVAL>)."
631 msgstr ""
632
633 #. type: TH
634 #: fedora-44 fedora-rawhide
635 #, no-wrap
636 msgid "2024-07-23"
637 msgstr ""
638
639 #. type: TH
640 #: fedora-44 fedora-rawhide
641 #, no-wrap
642 msgid "Linux man-pages 6.13"
643 msgstr ""
644
645 #. type: TH
646 #: mageia-cauldron
647 #, no-wrap
648 msgid "Linux man-pages 6.17"
649 msgstr ""
650
651 #. type: TH
652 #: opensuse-leap-16-1 opensuse-tumbleweed
653 #, no-wrap
654 msgid "Linux man-pages (unreleased)"
655 msgstr ""