Debian Codegraph @

po/ru/man2/pidfd_send_signal.2.po

raw
1 # Russian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Alexey, 2016.
5 # Azamat Hackimov <[email protected]>, 2014-2017.
6 # kogamatranslator49 <[email protected]>, 2015.
7 # Darima Kogan <[email protected]>, 2014.
8 # Max Is <[email protected]>, 2016.
9 # Yuri Kozlov <[email protected]>, 2011-2019.
10 # Иван Павлов <[email protected]>, 2017.
11 msgid ""
12 msgstr ""
13 "Project-Id-Version: manpages-l10n\n"
14 "POT-Creation-Date: 2026-06-05 06:34+0200\n"
15 "PO-Revision-Date: 2024-12-21 19:49+0300\n"
16 "Last-Translator: Yuri Kozlov <[email protected]>\n"
17 "Language-Team: Russian <[email protected]>\n"
18 "Language: ru\n"
19 "MIME-Version: 1.0\n"
20 "Content-Type: text/plain; charset=UTF-8\n"
21 "Content-Transfer-Encoding: 8bit\n"
22 "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
23 "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
24 "(n%100>=11 && n%100<=14)? 2 : 3);\n"
25 "X-Generator: Lokalize 2.0\n"
26
27 #. type: TH
28 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
29 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
30 #, no-wrap
31 msgid "pidfd_send_signal"
32 msgstr "pidfd_send_signal"
33
34 #. type: TH
35 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
36 #: opensuse-tumbleweed
37 #, no-wrap
38 msgid "2026-02-08"
39 msgstr "8 февраля 2026 г."
40
41 #. type: TH
42 #: archlinux debian-unstable
43 #, fuzzy, no-wrap
44 #| msgid "Linux man-pages 6.17"
45 msgid "Linux man-pages 6.18"
46 msgstr "Справочные страницы Linux 6.17"
47
48 #. type: SH
49 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
50 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
51 #, no-wrap
52 msgid "NAME"
53 msgstr "НАИМЕНОВАНИЕ"
54
55 #. type: Plain text
56 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
57 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
58 msgid ""
59 "pidfd_send_signal - send a signal to a process specified by a file descriptor"
60 msgstr ""
61
62 #. type: SH
63 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
64 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
65 #, no-wrap
66 msgid "LIBRARY"
67 msgstr "БИБЛИОТЕКА"
68
69 #. type: Plain text
70 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
71 #: opensuse-leap-16-1 opensuse-tumbleweed
72 msgid "Standard C library (I<libc>,\\ I<-lc>)"
73 msgstr "Стандартная библиотека языка C (I<libc>,\\ I<-lc>)"
74
75 #. type: SH
76 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
77 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
78 #, no-wrap
79 msgid "SYNOPSIS"
80 msgstr "СИНТАКСИС"
81
82 #. type: Plain text
83 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
84 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
85 #, no-wrap
86 msgid ""
87 "B<#include E<lt>linux/signal.hE<gt>> /* Definition of B<SIG*> constants */\n"
88 "B<#include E<lt>signal.hE<gt>> /* Definition of B<SI_*> constants */\n"
89 "B<#include E<lt>sys/syscall.hE<gt>> /* Definition of B<SYS_*> constants */\n"
90 "B<#include E<lt>unistd.hE<gt>>\n"
91 msgstr ""
92 "B<#include E<lt>linux/signal.hE<gt>> /* определения констант B<SIG*> */\n"
93 "B<#include E<lt>signal.hE<gt>> /* определения констант B<SI_*> */\n"
94 "B<#include E<lt>sys/syscall.hE<gt>> /* определения констант B<SYS_*> */\n"
95 "B<#include E<lt>unistd.hE<gt>>\n"
96
97 #. type: Plain text
98 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
99 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
100 #, fuzzy, no-wrap
101 #| msgid ""
102 #| "B<int syscall(SYS_pidfd_send_signal, int >I<pidfd>B<, int >I<sig>B<, siginfo_t *>I<info>B<,>\n"
103 #| "B< unsigned int >I<flags>B<);>\n"
104 msgid ""
105 "B<int syscall(SYS_pidfd_send_signal, int >I<pidfd>B<, int >I<sig>B<,>\n"
106 "B< siginfo_t *_Nullable >I<info>B<, unsigned int >I<flags>B<);>\n"
107 msgstr ""
108 "B<int syscall(SYS_pidfd_send_signal, int >I<pidfd>B<, int >I<sig>B<, siginfo_t *>I<info>B<,>\n"
109 "B< unsigned int >I<flags>B<);>\n"
110
111 #. type: Plain text
112 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
113 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
114 msgid ""
115 "I<Note>: glibc provides no wrapper for B<pidfd_send_signal>(), necessitating "
116 "the use of B<syscall>(2)."
117 msgstr ""
118
119 #. type: SH
120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
122 #, no-wrap
123 msgid "DESCRIPTION"
124 msgstr "ОПИСАНИЕ"
125
126 #. See the very detailed commit message for kernel commit
127 #. 3eb39f47934f9d5a3027fe00d906a45fe3a15fad
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 "The B<pidfd_send_signal>() system call sends the signal I<sig> to the "
133 "target process referred to by I<pidfd>, a PID file descriptor that refers to "
134 "a process."
135 msgstr ""
136
137 #. type: Plain text
138 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
139 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
140 msgid ""
141 "If the I<info> argument points to a I<siginfo_t> buffer, that buffer should "
142 "be populated as described in B<rt_sigqueueinfo>(2)."
143 msgstr ""
144
145 #. type: Plain text
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 msgid ""
149 "If the I<info> argument is a null pointer, this is equivalent to specifying "
150 "a pointer to a I<siginfo_t> buffer whose fields match the values that are "
151 "implicitly supplied when a signal is sent using B<kill>(2):"
152 msgstr ""
153
154 #. type: IP
155 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
156 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
157 #, no-wrap
158 msgid "\\[bu]"
159 msgstr "\\[bu]"
160
161 #. type: Plain text
162 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
163 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
164 msgid "I<si_signo> is set to the signal number;"
165 msgstr ""
166
167 #. type: Plain text
168 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
169 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
170 msgid "I<si_errno> is set to 0;"
171 msgstr ""
172
173 #. type: Plain text
174 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
175 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
176 msgid "I<si_code> is set to B<SI_USER>;"
177 msgstr ""
178
179 #. type: Plain text
180 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
181 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
182 msgid "I<si_pid> is set to the caller's PID; and"
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<si_uid> is set to the caller's real user ID."
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 "The calling process must either be in the same PID namespace as the process "
196 "referred to by I<pidfd>, or be in an ancestor of that namespace."
197 msgstr ""
198
199 #. type: Plain text
200 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
201 #: opensuse-tumbleweed
202 msgid ""
203 "The I<flags> argument allows to modify the scope of the signal. By default, "
204 "the scope of the signal will be inferred from the I<pidfd> argument. For "
205 "example, if I<pidfd> refers to a specific thread \\[em]i.e., the I<pidfd> "
206 "was created through B<pidfd_open>(2) using the B<PIDFD_THREAD> flag or "
207 "through B<clone3>(2) using the B<CLONE_PIDFD> flag together with the "
208 "B<CLONE_THREAD> flag\\[em] then passing I<pidfd> to B<pidfd_send_signal>(2) "
209 "and leaving the I<flags> argument as B<0> will cause the signal to be sent "
210 "to the specific thread referenced by the I<pidfd>."
211 msgstr ""
212
213 #. type: TP
214 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
215 #: opensuse-tumbleweed
216 #, fuzzy, no-wrap
217 #| msgid "B<RWF_NOAPPEND> (since Linux 6.9)"
218 msgid "B<PIDFD_SIGNAL_THREAD> (since Linux 6.9)"
219 msgstr "B<RWF_NOAPPEND> (начиная с Linux 6.9)"
220
221 #. commit e1fb1dc08e73466830612bcf2f9f72180965c9ba
222 #. type: Plain text
223 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
224 #: opensuse-tumbleweed
225 msgid ""
226 "Ensure that the signal is sent to the specific thread referenced by I<pidfd>."
227 msgstr ""
228
229 #. type: TP
230 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
231 #: opensuse-tumbleweed
232 #, fuzzy, no-wrap
233 #| msgid "B<RWF_NOAPPEND> (since Linux 6.9)"
234 msgid "B<PIDFD_SIGNAL_THREAD_GROUP> (since Linux 6.9)"
235 msgstr "B<RWF_NOAPPEND> (начиная с Linux 6.9)"
236
237 #. commit e1fb1dc08e73466830612bcf2f9f72180965c9ba
238 #. type: Plain text
239 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
240 #: opensuse-tumbleweed
241 msgid ""
242 "If I<pidfd> refers to a thread-group leader, ensure that the signal is sent "
243 "to the thread-group, even if I<pidfd> was created to refer to a specific "
244 "thread."
245 msgstr ""
246
247 #. type: TP
248 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
249 #: opensuse-tumbleweed
250 #, fuzzy, no-wrap
251 #| msgid "B<RWF_NOAPPEND> (since Linux 6.9)"
252 msgid "B<PIDFD_SIGNAL_PROCESS_GROUP> (since Linux 6.9)"
253 msgstr "B<RWF_NOAPPEND> (начиная с Linux 6.9)"
254
255 #. commit e1fb1dc08e73466830612bcf2f9f72180965c9ba
256 #. type: Plain text
257 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
258 #: opensuse-tumbleweed
259 msgid ""
260 "If I<pidfd> refers to a process-group leader, ensure that the signal is sent "
261 "to the process-group, even if I<pidfd> was created to refer to a specific "
262 "thread or to a thread-group leader."
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 "RETURN VALUE"
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 #, fuzzy
276 #| msgid ""
277 #| "On success, B<ptsname_r>() returns 0. On failure, a nonzero value is "
278 #| "returned and I<errno> is set to indicate the error."
279 msgid ""
280 "On success, B<pidfd_send_signal>() returns 0. On error, -1 is returned and "
281 "I<errno> is set to indicate the error."
282 msgstr ""
283 "При успешном выполнении B<ptsname_r>() возвращает 0. При ошибке возвращается "
284 "ненулевое значение и в I<errno> записывается номер ошибки."
285
286 #. type: SH
287 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
288 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
289 #, no-wrap
290 msgid "ERRORS"
291 msgstr "ОШИБКИ"
292
293 #. type: TP
294 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
295 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
296 #, no-wrap
297 msgid "B<EBADF>"
298 msgstr "B<EBADF>"
299
300 #. type: Plain text
301 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
302 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
303 msgid "I<pidfd> is not a valid PID file descriptor."
304 msgstr "Значение I<pidfd> не является правильным дескриптором файла PID."
305
306 #. type: TP
307 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
308 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
309 #, no-wrap
310 msgid "B<EINVAL>"
311 msgstr "B<EINVAL>"
312
313 #. type: Plain text
314 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
315 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
316 #, fuzzy
317 #| msgid "I<sem> is not a valid semaphore."
318 msgid "I<sig> is not a valid signal."
319 msgstr "Значение I<sem> не является корректным для семафора."
320
321 #. type: Plain text
322 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
323 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
324 msgid ""
325 "The calling process is not in a PID namespace from which it can send a "
326 "signal to the target process."
327 msgstr ""
328
329 #. type: Plain text
330 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
331 #: opensuse-tumbleweed
332 #, fuzzy
333 #| msgid "I<flags> is invalid."
334 msgid "I<flags> is not valid."
335 msgstr "Значение I<flags> неверно."
336
337 #. type: TP
338 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
339 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
340 #, no-wrap
341 msgid "B<EPERM>"
342 msgstr "B<EPERM>"
343
344 #. type: Plain text
345 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
346 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
347 #, fuzzy
348 #| msgid ""
349 #| "The caller does not have permission to access the address space of the "
350 #| "process I<pid>."
351 msgid ""
352 "The calling process does not have permission to send the signal to the "
353 "target process."
354 msgstr ""
355 "Вызывающий не имеет прав на доступ к адресному пространству процесса I<pid>."
356
357 #. type: Plain text
358 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
359 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
360 msgid ""
361 "I<pidfd> doesn't refer to the calling process, and I<info.si_code> is "
362 "invalid (see B<rt_sigqueueinfo>(2))."
363 msgstr ""
364
365 #. type: TP
366 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
367 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
368 #, no-wrap
369 msgid "B<ESRCH>"
370 msgstr "B<ESRCH>"
371
372 #. type: Plain text
373 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
374 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
375 msgid ""
376 "The target process does not exist (i.e., it has terminated and been waited "
377 "on)."
378 msgstr ""
379
380 #. type: SH
381 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
382 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
383 #, no-wrap
384 msgid "STANDARDS"
385 msgstr "СТАНДАРТЫ"
386
387 #. type: Plain text
388 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
389 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
390 msgid "Linux."
391 msgstr "Linux."
392
393 #. type: SH
394 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
395 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
396 #, no-wrap
397 msgid "HISTORY"
398 msgstr "ИСТОРИЯ"
399
400 #. type: Plain text
401 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
402 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
403 #, fuzzy
404 #| msgid "Linux"
405 msgid "Linux 5.1."
406 msgstr "Linux"
407
408 #. type: SH
409 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
410 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
411 #, no-wrap
412 msgid "NOTES"
413 msgstr "ПРИМЕЧАНИЯ"
414
415 #. type: SS
416 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
417 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
418 #, fuzzy, no-wrap
419 #| msgid "open file descriptors"
420 msgid "PID file descriptors"
421 msgstr "Открытые файловые дескрипторы"
422
423 #. type: Plain text
424 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
425 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
426 msgid ""
427 "The I<pidfd> argument is a PID file descriptor, a file descriptor that "
428 "refers to process. Such a file descriptor can be obtained in any of the "
429 "following ways:"
430 msgstr ""
431
432 #. type: Plain text
433 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
434 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
435 #, fuzzy
436 #| msgid "I</proc/[pid]> subdirectories"
437 msgid "by opening a I</proc/>pid directory;"
438 msgstr "Подкаталоги I</proc/[pid]>"
439
440 #. type: Plain text
441 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
442 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
443 msgid "using B<pidfd_open>(2); or"
444 msgstr ""
445
446 #. type: Plain text
447 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
448 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
449 msgid ""
450 "via the PID file descriptor that is returned by a call to B<clone>(2) or "
451 "B<clone3>(2) that specifies the B<CLONE_PIDFD> flag."
452 msgstr ""
453
454 #. type: Plain text
455 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
456 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
457 msgid ""
458 "The B<pidfd_send_signal>() system call allows the avoidance of race "
459 "conditions that occur when using traditional interfaces (such as "
460 "B<kill>(2)) to signal a process. The problem is that the traditional "
461 "interfaces specify the target process via a process ID (PID), with the "
462 "result that the sender may accidentally send a signal to the wrong process "
463 "if the originally intended target process has terminated and its PID has "
464 "been recycled for another process. By contrast, a PID file descriptor is a "
465 "stable reference to a specific process; if that process terminates, "
466 "B<pidfd_send_signal>() fails with the error B<ESRCH>."
467 msgstr ""
468
469 #. type: SH
470 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
471 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
472 #, no-wrap
473 msgid "EXAMPLES"
474 msgstr "ПРИМЕРЫ"
475
476 #. type: Plain text
477 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
478 #: opensuse-tumbleweed
479 #, no-wrap
480 msgid ""
481 "#define _GNU_SOURCE\n"
482 "#include E<lt>fcntl.hE<gt>\n"
483 "#include E<lt>limits.hE<gt>\n"
484 "#include E<lt>signal.hE<gt>\n"
485 "#include E<lt>stdio.hE<gt>\n"
486 "#include E<lt>stdlib.hE<gt>\n"
487 "#include E<lt>string.hE<gt>\n"
488 "#include E<lt>sys/syscall.hE<gt>\n"
489 "#include E<lt>unistd.hE<gt>\n"
490 "\\&\n"
491 "static int\n"
492 "pidfd_send_signal(int pidfd, int sig, siginfo_t *info,\n"
493 " unsigned int flags)\n"
494 "{\n"
495 " return syscall(SYS_pidfd_send_signal, pidfd, sig, info, flags);\n"
496 "}\n"
497 "\\&\n"
498 "int\n"
499 "main(int argc, char *argv[])\n"
500 "{\n"
501 " int pidfd, sig;\n"
502 " char path[PATH_MAX];\n"
503 " siginfo_t info;\n"
504 "\\&\n"
505 " if (argc != 3) {\n"
506 " fprintf(stderr, \"Usage: %s E<lt>pidE<gt> E<lt>signalE<gt>\\[rs]n\", argv[0]);\n"
507 " exit(EXIT_FAILURE);\n"
508 " }\n"
509 "\\&\n"
510 " sig = atoi(argv[2]);\n"
511 "\\&\n"
512 " /* Obtain a PID file descriptor by opening the /proc/PID directory\n"
513 " of the target process. */\n"
514 "\\&\n"
515 " snprintf(path, sizeof(path), \"/proc/%s\", argv[1]);\n"
516 "\\&\n"
517 " pidfd = open(path, O_RDONLY);\n"
518 " if (pidfd == -1) {\n"
519 " perror(\"open\");\n"
520 " exit(EXIT_FAILURE);\n"
521 " }\n"
522 "\\&\n"
523 " /* Populate a \\[aq]siginfo_t\\[aq] structure for use with\n"
524 " pidfd_send_signal(). */\n"
525 "\\&\n"
526 " memset(&info, 0, sizeof(info));\n"
527 " info.si_code = SI_QUEUE;\n"
528 " info.si_signo = sig;\n"
529 " info.si_errno = 0;\n"
530 " info.si_uid = getuid();\n"
531 " info.si_pid = getpid();\n"
532 " info.si_value.sival_int = 1234;\n"
533 "\\&\n"
534 " /* Send the signal. */\n"
535 "\\&\n"
536 " if (pidfd_send_signal(pidfd, sig, &info, 0) == -1) {\n"
537 " perror(\"pidfd_send_signal\");\n"
538 " exit(EXIT_FAILURE);\n"
539 " }\n"
540 "\\&\n"
541 " exit(EXIT_SUCCESS);\n"
542 "}\n"
543 msgstr ""
544
545 #. SRC END
546 #. type: SH
547 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
548 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
549 #, no-wrap
550 msgid "SEE ALSO"
551 msgstr "СМОТРИТЕ ТАКЖЕ"
552
553 #. type: Plain text
554 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
555 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
556 msgid ""
557 "B<clone>(2), B<kill>(2), B<pidfd_open>(2), B<rt_sigqueueinfo>(2), "
558 "B<sigaction>(2), B<pid_namespaces>(7), B<signal>(7)"
559 msgstr ""
560 "B<clone>(2), B<kill>(2), B<pidfd_open>(2), B<rt_sigqueueinfo>(2), "
561 "B<sigaction>(2), B<pid_namespaces>(7), B<signal>(7)"
562
563 #. type: TH
564 #: debian-trixie
565 #, no-wrap
566 msgid "2024-06-15"
567 msgstr "15 июня 2024 г."
568
569 #. type: TH
570 #: debian-trixie
571 #, no-wrap
572 msgid "Linux man-pages 6.9.1"
573 msgstr "Страницы руководства Linux 6.9.1"
574
575 #. type: Plain text
576 #: debian-trixie
577 msgid "Standard C library (I<libc>, I<-lc>)"
578 msgstr "Стандартная библиотека языка C (I<libc>, I<-lc>)"
579
580 #. type: Plain text
581 #: debian-trixie fedora-44 fedora-rawhide
582 msgid ""
583 "The I<flags> argument is reserved for future use; currently, this argument "
584 "must be specified as 0."
585 msgstr ""
586 "Аргумент I<flags> зарезервирован для будущего использования; в настоящее "
587 "время этот аргумент должен быть указан как 0."
588
589 #. type: Plain text
590 #: debian-trixie fedora-44 fedora-rawhide
591 msgid "I<flags> is not 0."
592 msgstr "Значение I<flags> не равно 0."
593
594 #. type: Plain text
595 #: debian-trixie fedora-44 fedora-rawhide
596 #, no-wrap
597 msgid ""
598 "#define _GNU_SOURCE\n"
599 "#include E<lt>fcntl.hE<gt>\n"
600 "#include E<lt>limits.hE<gt>\n"
601 "#include E<lt>signal.hE<gt>\n"
602 "#include E<lt>stdio.hE<gt>\n"
603 "#include E<lt>stdlib.hE<gt>\n"
604 "#include E<lt>string.hE<gt>\n"
605 "#include E<lt>sys/syscall.hE<gt>\n"
606 "#include E<lt>unistd.hE<gt>\n"
607 "\\&\n"
608 "static int\n"
609 "pidfd_send_signal(int pidfd, int sig, siginfo_t *info,\n"
610 " unsigned int flags)\n"
611 "{\n"
612 " return syscall(SYS_pidfd_send_signal, pidfd, sig, info, flags);\n"
613 "}\n"
614 "\\&\n"
615 "int\n"
616 "main(int argc, char *argv[])\n"
617 "{\n"
618 " int pidfd, sig;\n"
619 " char path[PATH_MAX];\n"
620 " siginfo_t info;\n"
621 "\\&\n"
622 " if (argc != 3) {\n"
623 " fprintf(stderr, \"Usage: %s E<lt>pidE<gt> E<lt>signalE<gt>\\[rs]n\", argv[0]);\n"
624 " exit(EXIT_FAILURE);\n"
625 " }\n"
626 "\\&\n"
627 " sig = atoi(argv[2]);\n"
628 "\\&\n"
629 " /* Obtain a PID file descriptor by opening the /proc/PID directory\n"
630 " of the target process. */\n"
631 "\\&\n"
632 " snprintf(path, sizeof(path), \"/proc/%s\", argv[1]);\n"
633 "\\&\n"
634 " pidfd = open(path, O_RDONLY);\n"
635 " if (pidfd == -1) {\n"
636 " perror(\"open\");\n"
637 " exit(EXIT_FAILURE);\n"
638 " }\n"
639 "\\&\n"
640 " /* Populate a \\[aq]siginfo_t\\[aq] structure for use with\n"
641 " pidfd_send_signal(). */\n"
642 "\\&\n"
643 " memset(&info, 0, sizeof(info));\n"
644 " info.si_code = SI_QUEUE;\n"
645 " info.si_signo = sig;\n"
646 " info.si_errno = 0;\n"
647 " info.si_uid = getuid();\n"
648 " info.si_pid = getpid();\n"
649 " info.si_value.sival_int = 1234;\n"
650 "\\&\n"
651 " /* Send the signal. */\n"
652 "\\&\n"
653 " if (pidfd_send_signal(pidfd, sig, &info, 0) == -1) {\n"
654 " perror(\"pidfd_send_signal\");\n"
655 " exit(EXIT_FAILURE);\n"
656 " }\n"
657 "\\&\n"
658 " exit(EXIT_SUCCESS);\n"
659 "}\n"
660 msgstr ""
661
662 #. type: TH
663 #: fedora-44 fedora-rawhide
664 #, no-wrap
665 msgid "2024-07-23"
666 msgstr "23 июля 2024 г."
667
668 #. type: TH
669 #: fedora-44 fedora-rawhide
670 #, no-wrap
671 msgid "Linux man-pages 6.13"
672 msgstr "Страницы руководства Linux 6.13"
673
674 #. type: TH
675 #: mageia-cauldron
676 #, no-wrap
677 msgid "Linux man-pages 6.17"
678 msgstr "Страницы руководства Linux 6.17"
679
680 #. type: TH
681 #: opensuse-leap-16-1 opensuse-tumbleweed
682 #, no-wrap
683 msgid "Linux man-pages (unreleased)"
684 msgstr "Страницы руководства Linux (не выпущены)"