| 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:35+0200\n" |
| 15 |
"PO-Revision-Date: 2024-12-21 19:50+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 "posix_spawn" |
| 32 |
msgstr "" |
| 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 "posix_spawn, posix_spawnp - spawn a process" |
| 59 |
msgstr "posix_spawn, posix_spawnp - порождает процесс" |
| 60 |
|
| 61 |
#. type: SH |
| 62 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 63 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 64 |
#, no-wrap |
| 65 |
msgid "LIBRARY" |
| 66 |
msgstr "БИБЛИОТЕКА" |
| 67 |
|
| 68 |
#. type: Plain text |
| 69 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 70 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 71 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 72 |
msgstr "Стандартная библиотека языка C (I<libc>,\\ I<-lc>)" |
| 73 |
|
| 74 |
#. type: SH |
| 75 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 76 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 77 |
#, no-wrap |
| 78 |
msgid "SYNOPSIS" |
| 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<#include E<lt>spawn.hE<gt>>\n" |
| 86 |
msgstr "B<#include E<lt>spawn.hE<gt>>\n" |
| 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 |
#, no-wrap |
| 92 |
msgid "" |
| 93 |
"B<int posix_spawn(pid_t *restrict >I<pid>B<, const char *restrict >I<path>B<,>\n" |
| 94 |
"B< const posix_spawn_file_actions_t *restrict >I<file_actions>B<,>\n" |
| 95 |
"B< const posix_spawnattr_t *restrict >I<attrp>B<,>\n" |
| 96 |
"B< char *const >I<argv>B<[restrict],>\n" |
| 97 |
"B< char *const >I<envp>B<[restrict]);>\n" |
| 98 |
"B<int posix_spawnp(pid_t *restrict >I<pid>B<, const char *restrict >I<file>B<,>\n" |
| 99 |
"B< const posix_spawn_file_actions_t *restrict >I<file_actions>B<,>\n" |
| 100 |
"B< const posix_spawnattr_t *restrict >I<attrp>B<,>\n" |
| 101 |
"B< char *const >I<argv>B<[restrict],>\n" |
| 102 |
"B< char *const >I<envp>B<[restrict]);>\n" |
| 103 |
msgstr "" |
| 104 |
|
| 105 |
#. type: SH |
| 106 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 107 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 108 |
#, no-wrap |
| 109 |
msgid "DESCRIPTION" |
| 110 |
msgstr "ОПИСАНИЕ" |
| 111 |
|
| 112 |
#. type: Plain text |
| 113 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 114 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 115 |
msgid "" |
| 116 |
"The B<posix_spawn>() and B<posix_spawnp>() functions are used to create a " |
| 117 |
"new child process that executes a specified file. These functions were " |
| 118 |
"specified by POSIX to provide a standardized method of creating new " |
| 119 |
"processes on machines that lack the capability to support the B<fork>(2) " |
| 120 |
"system call. These machines are generally small, embedded systems lacking " |
| 121 |
"MMU support." |
| 122 |
msgstr "" |
| 123 |
"Функции B<posix_spawn>() и B<posix_spawnp>() используются для создания новых " |
| 124 |
"дочерних процессов, которые выполняют указываемый файл. Эти функции были " |
| 125 |
"определены в POSIX для стандартизации метода создания новых процессов на " |
| 126 |
"машинах, у которых нет возможности поддержки системного вызова B<fork>(2). К " |
| 127 |
"таким машинах, обычно, относятся встраиваемые системы без поддержки MMU." |
| 128 |
|
| 129 |
#. type: Plain text |
| 130 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 131 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 132 |
msgid "" |
| 133 |
"The B<posix_spawn>() and B<posix_spawnp>() functions provide the " |
| 134 |
"functionality of a combined B<fork>(2) and B<exec>(3), with some optional " |
| 135 |
"housekeeping steps in the child process before the B<exec>(3). These " |
| 136 |
"functions are not meant to replace the B<fork>(2) and B<execve>(2) system " |
| 137 |
"calls. In fact, they provide only a subset of the functionality that can be " |
| 138 |
"achieved by using the system calls." |
| 139 |
msgstr "" |
| 140 |
"Функции B<posix_spawn>() и B<posix_spawnp>() предоставляют комбинацию " |
| 141 |
"возможностей B<fork>(2) и B<exec>(3) с некоторыми необязательными " |
| 142 |
"обслуживающими действиями в дочернем процессе перед B<exec>(3). Эти функции " |
| 143 |
"не служат заменой системных вызовов B<fork>(2) и B<execve>(2). Фактически, " |
| 144 |
"они предоставляют только часть функций системных вызовов." |
| 145 |
|
| 146 |
#. type: Plain text |
| 147 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 148 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 149 |
msgid "" |
| 150 |
"The only difference between B<posix_spawn>() and B<posix_spawnp>() is the " |
| 151 |
"manner in which they specify the file to be executed by the child process. " |
| 152 |
"With B<posix_spawn>(), the executable file is specified as a pathname (which " |
| 153 |
"can be absolute or relative). With B<posix_spawnp>(), the executable file " |
| 154 |
"is specified as a simple filename; the system searches for this file in the " |
| 155 |
"list of directories specified by B<PATH> (in the same way as for " |
| 156 |
"B<execvp>(3)). For the remainder of this page, the discussion is phrased in " |
| 157 |
"terms of B<posix_spawn>(), with the understanding that B<posix_spawnp>() " |
| 158 |
"differs only on the point just described." |
| 159 |
msgstr "" |
| 160 |
"Единственным отличием между B<posix_spawnp>() и B<posix_spawnp>() является " |
| 161 |
"способ, которым в них указывается исполняемый дочерним процессом файл. В " |
| 162 |
"B<posix_spawn>() исполняемый файл задаётся в виде пути (которое может быть " |
| 163 |
"абсолютным или относительным). В B<posix_spawnp>() исполняемый файл задаётся " |
| 164 |
"в виде имени файла; система ищет этот файл в списке каталогов, указанных в " |
| 165 |
"B<PATH> (также, как это делает B<execvp>(3)). Кроме данного отличия далее на " |
| 166 |
"этой странице всё описание B<posix_spawn>() также относится и к " |
| 167 |
"B<posix_spawnp>()." |
| 168 |
|
| 169 |
#. type: Plain text |
| 170 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 171 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 172 |
msgid "The remaining arguments to these two functions are as follows:" |
| 173 |
msgstr "Остальные аргументы функций:" |
| 174 |
|
| 175 |
#. type: TP |
| 176 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 177 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 178 |
#, fuzzy, no-wrap |
| 179 |
#| msgid "I<si_pid>" |
| 180 |
msgid "I<pid>" |
| 181 |
msgstr "I<si_pid>" |
| 182 |
|
| 183 |
#. type: Plain text |
| 184 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 185 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 186 |
#, fuzzy |
| 187 |
#| msgid "" |
| 188 |
#| "The I<pid> argument points to a buffer that is used to return the process " |
| 189 |
#| "ID of the new child process." |
| 190 |
msgid "" |
| 191 |
"points to a buffer that is used to return the process ID of the new child " |
| 192 |
"process." |
| 193 |
msgstr "" |
| 194 |
"Аргумент I<pid> указывает на буфер, в котором возвращается ID нового " |
| 195 |
"дочернего процесса." |
| 196 |
|
| 197 |
#. type: TP |
| 198 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 199 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 200 |
#, fuzzy, no-wrap |
| 201 |
#| msgid "B<sigaction>(2)" |
| 202 |
msgid "I<file_actions>" |
| 203 |
msgstr "B<sigaction>(2)" |
| 204 |
|
| 205 |
#. type: Plain text |
| 206 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 207 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 208 |
#, fuzzy |
| 209 |
#| msgid "" |
| 210 |
#| "The I<file_actions> argument points to a I<spawn file actions object> " |
| 211 |
#| "that specifies file-related actions to be performed in the child between " |
| 212 |
#| "the B<fork>(2) and B<exec>(3) steps. This object is initialized and " |
| 213 |
#| "populated before the B<posix_spawn>() call using " |
| 214 |
#| "B<posix_spawn_file_actions_init>(3) and the " |
| 215 |
#| "B<posix_spawn_file_actions_*>() functions." |
| 216 |
msgid "" |
| 217 |
"points to a I<spawn file actions object> that specifies file-related actions " |
| 218 |
"to be performed in the child between the B<fork>(2) and B<exec>(3) steps. " |
| 219 |
"This object is initialized and populated before the B<posix_spawn>() call " |
| 220 |
"using B<posix_spawn_file_actions_init>(3) and the " |
| 221 |
"B<posix_spawn_file_actions_*>() functions." |
| 222 |
msgstr "" |
| 223 |
"Аргумент I<file_actions> указывает на I<объект файловых действий при " |
| 224 |
"создании>, в котором задаются действия с файлом, выполняемые в потомке между " |
| 225 |
"шагами B<fork>(2) и B<exec>(3). Данный объект инициализируется и заполняется " |
| 226 |
"перед вызовом B<posix_spawn>() с помощью функций " |
| 227 |
"B<posix_spawn_file_actions_init>(3) и B<posix_spawn_file_actions_*>()." |
| 228 |
|
| 229 |
#. type: TP |
| 230 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 231 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 232 |
#, no-wrap |
| 233 |
msgid "I<attrp>" |
| 234 |
msgstr "" |
| 235 |
|
| 236 |
#. type: Plain text |
| 237 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 238 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 239 |
#, fuzzy |
| 240 |
#| msgid "" |
| 241 |
#| "The I<attrp> argument points to an I<attributes objects> that specifies " |
| 242 |
#| "various attributes of the created child process. This object is " |
| 243 |
#| "initialized and populated before the B<posix_spawn>() call using " |
| 244 |
#| "B<posix_spawnattr_init>(3) and the B<posix_spawnattr_*>() functions." |
| 245 |
msgid "" |
| 246 |
"points to an I<attributes objects> that specifies various attributes of the " |
| 247 |
"created child process. This object is initialized and populated before the " |
| 248 |
"B<posix_spawn>() call using B<posix_spawnattr_init>(3) and the " |
| 249 |
"B<posix_spawnattr_*>() functions." |
| 250 |
msgstr "" |
| 251 |
"Аргумент I<attrp> указывает на I<объект атрибутов>, в котором задаются " |
| 252 |
"различные атрибуты создаваемого дочернего процесса. Данный объект " |
| 253 |
"инициализируется и заполняется перед вызовом B<posix_spawn>() с помощью " |
| 254 |
"функций B<posix_spawnattr_init>(3) и B<posix_spawnattr_*>()." |
| 255 |
|
| 256 |
#. type: TP |
| 257 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 258 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 259 |
#, no-wrap |
| 260 |
msgid "I<argv>" |
| 261 |
msgstr "" |
| 262 |
|
| 263 |
#. type: TQ |
| 264 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 265 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 266 |
#, fuzzy, no-wrap |
| 267 |
#| msgid "I<env>" |
| 268 |
msgid "I<envp>" |
| 269 |
msgstr "I<env>" |
| 270 |
|
| 271 |
#. type: Plain text |
| 272 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 273 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 274 |
#, fuzzy |
| 275 |
#| msgid "" |
| 276 |
#| "The I<argv> and I<envp> arguments specify the argument list and " |
| 277 |
#| "environment for the program that is executed in the child process, as for " |
| 278 |
#| "B<execve>(2)." |
| 279 |
msgid "" |
| 280 |
"specify the argument list and environment for the program that is executed " |
| 281 |
"in the child process, as for B<execve>(2)." |
| 282 |
msgstr "" |
| 283 |
"В аргументах I<argv> и I<envp> задаётся список аргументов и окружения для " |
| 284 |
"программы, выполняемой в дочернем процессе, как для B<execve>(2)." |
| 285 |
|
| 286 |
#. type: Plain text |
| 287 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 288 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 289 |
msgid "" |
| 290 |
"Below, the functions are described in terms of a three-step process: the " |
| 291 |
"B<fork>() step, the pre-B<exec>() step (executed in the child), and the " |
| 292 |
"B<exec>() step (executed in the child)." |
| 293 |
msgstr "" |
| 294 |
"Далее функции описаны в виде трёх ступенчатого процесса: шаг B<fork>(), шаг " |
| 295 |
"перед B<exec>() (выполняется в потомке) и шаг B<exec>() (выполняется в " |
| 296 |
"потомке)." |
| 297 |
|
| 298 |
#. type: SS |
| 299 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 300 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 301 |
#, no-wrap |
| 302 |
msgid "fork() step" |
| 303 |
msgstr "Шаг fork()" |
| 304 |
|
| 305 |
#. type: Plain text |
| 306 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 307 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 308 |
#, fuzzy |
| 309 |
#| msgid "" |
| 310 |
#| "The B<posix_spawn>() function commences by calling B<fork>(2), or " |
| 311 |
#| "possibly B<vfork>(2) (see below)." |
| 312 |
msgid "" |
| 313 |
"Since glibc 2.24, the B<posix_spawn>() function commences by calling " |
| 314 |
"B<clone>(2) with B<CLONE_VM> and B<CLONE_VFORK> flags. Older " |
| 315 |
"implementations use B<fork>(2), or possibly B<vfork>(2) (see below)." |
| 316 |
msgstr "" |
| 317 |
"Функция B<posix_spawn>() начинает работу с вызова B<fork>(2) или, возможно, " |
| 318 |
"B<vfork>(2) (смотрите ниже)." |
| 319 |
|
| 320 |
#. type: Plain text |
| 321 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 322 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 323 |
msgid "" |
| 324 |
"The PID of the new child process is placed in I<*pid>. The " |
| 325 |
"B<posix_spawn>() function then returns control to the parent process." |
| 326 |
msgstr "" |
| 327 |
"PID нового дочернего процесса помещается в I<*pid>. После этого функция " |
| 328 |
"B<posix_spawn>() возвращает управление родительскому процессу." |
| 329 |
|
| 330 |
#. type: Plain text |
| 331 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 332 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 333 |
msgid "" |
| 334 |
"Subsequently, the parent can use one of the system calls described in " |
| 335 |
"B<wait>(2) to check the status of the child process. If the child fails in " |
| 336 |
"any of the housekeeping steps described below, or fails to execute the " |
| 337 |
"desired file, it exits with a status of 127." |
| 338 |
msgstr "" |
| 339 |
"Соответственно, родитель может использовать один из системных вызовов, " |
| 340 |
"описанных в B<wait>(2), для проверки состояния дочернего процесса. Если " |
| 341 |
"потомок завершится с ошибкой в любом из служебных шагов, описанных далее, " |
| 342 |
"или возникнет ошибка при выполнении желаемого файла, то он завершит работу с " |
| 343 |
"кодом состояния 127." |
| 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 |
#, fuzzy |
| 349 |
#| msgid "" |
| 350 |
#| "The child process is created using B<vfork>(2) instead of B<fork>(2) " |
| 351 |
#| "when either of the following is true:" |
| 352 |
msgid "" |
| 353 |
"Before glibc 2.24, the child process is created using B<vfork>(2) instead " |
| 354 |
"of B<fork>(2) when either of the following is true:" |
| 355 |
msgstr "" |
| 356 |
"Дочерний процесс создаётся с помощью B<vfork>(2), а не B<fork>(2) в любом из " |
| 357 |
"следующих случаев:" |
| 358 |
|
| 359 |
#. type: IP |
| 360 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 361 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 362 |
#, no-wrap |
| 363 |
msgid "\\[bu]" |
| 364 |
msgstr "\\[bu]" |
| 365 |
|
| 366 |
#. type: Plain text |
| 367 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 368 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 369 |
msgid "" |
| 370 |
"the I<spawn-flags> element of the attributes object pointed to by I<attrp> " |
| 371 |
"contains the GNU-specific flag B<POSIX_SPAWN_USEVFORK>; or" |
| 372 |
msgstr "" |
| 373 |
"элемент I<spawn-flags> объекта атрибутов, на который указывает I<attrp>, " |
| 374 |
"содержит определённый в GNU флаг B<POSIX_SPAWN_USEVFORK>; или" |
| 375 |
|
| 376 |
#. type: Plain text |
| 377 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 378 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 379 |
msgid "" |
| 380 |
"I<file_actions> is NULL and the I<spawn-flags> element of the attributes " |
| 381 |
"object pointed to by I<attrp> does I<not> contain B<POSIX_SPAWN_SETSIGMASK>, " |
| 382 |
"B<POSIX_SPAWN_SETSIGDEF>, B<POSIX_SPAWN_SETSCHEDPARAM>, " |
| 383 |
"B<POSIX_SPAWN_SETSCHEDULER>, B<POSIX_SPAWN_SETPGROUP>, or " |
| 384 |
"B<POSIX_SPAWN_RESETIDS>." |
| 385 |
msgstr "" |
| 386 |
"I<file_actions> равно NULL и элемент I<spawn-flags> объекта атрибутов, на " |
| 387 |
"который указывает I<attrp>, I<не> содержит B<POSIX_SPAWN_SETSIGMASK>, " |
| 388 |
"B<POSIX_SPAWN_SETSIGDEF>, B<POSIX_SPAWN_SETSCHEDPARAM>, " |
| 389 |
"B<POSIX_SPAWN_SETSCHEDULER>, B<POSIX_SPAWN_SETPGROUP> или " |
| 390 |
"B<POSIX_SPAWN_RESETIDS>." |
| 391 |
|
| 392 |
#. type: Plain text |
| 393 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 394 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 395 |
msgid "" |
| 396 |
"In other words, B<vfork>(2) is used if the caller requests it, or if there " |
| 397 |
"is no cleanup expected in the child before it B<exec>(3)s the requested file." |
| 398 |
msgstr "" |
| 399 |
"Иначе говоря, B<vfork>(2) используется, если это запросил вызывающий или не " |
| 400 |
"нужна очистка в потомке перед выполнением B<exec>(3) запрашиваемого файла." |
| 401 |
|
| 402 |
#. type: SS |
| 403 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 404 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 405 |
#, no-wrap |
| 406 |
msgid "pre-exec() step: housekeeping" |
| 407 |
msgstr "Шаг перед exec(): служебные действия" |
| 408 |
|
| 409 |
#. type: Plain text |
| 410 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 411 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 412 |
#, fuzzy |
| 413 |
#| msgid "" |
| 414 |
#| "In between the B<fork>(2) and the B<exec>(3), a child process may need " |
| 415 |
#| "to perform a set of housekeeping actions. The B<posix_spawn>() and " |
| 416 |
#| "B<posix_spawnp>() functions support a small, well-defined set of system " |
| 417 |
#| "tasks that the child process can accomplish before it executes the " |
| 418 |
#| "executable file. These operations are controlled by the attributes " |
| 419 |
#| "object pointed to by I<attrp> and the file actions object pointed to by " |
| 420 |
#| "I<file_actions>. In the child, processing is done in the following " |
| 421 |
#| "sequence:" |
| 422 |
msgid "" |
| 423 |
"In between the B<fork()> and the B<exec()> steps, a child process may need " |
| 424 |
"to perform a set of housekeeping actions. The B<posix_spawn>() and " |
| 425 |
"B<posix_spawnp>() functions support a small, well-defined set of system " |
| 426 |
"tasks that the child process can accomplish before it executes the " |
| 427 |
"executable file. These operations are controlled by the attributes object " |
| 428 |
"pointed to by I<attrp> and the file actions object pointed to by " |
| 429 |
"I<file_actions>. In the child, processing is done in the following sequence:" |
| 430 |
msgstr "" |
| 431 |
"Между B<fork>(2) и B<exec>(3) дочерний процесс может выполнить набор " |
| 432 |
"служебных действий. Функции B<posix_spawn>() и B<posix_spawnp>() " |
| 433 |
"поддерживают маленький, хорошо спроектированный набор системных задач, " |
| 434 |
"которые дочерний процесс может выполнить перед запуском исполняемого файла. " |
| 435 |
"Эти операции управляются объектом атрибутов, на который указывает I<attrp> и " |
| 436 |
"объект файловых действий, на который указывает I<file_actions>. В потомке " |
| 437 |
"обработка выполняются в следующей последовательности:" |
| 438 |
|
| 439 |
#. type: IP |
| 440 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 441 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 442 |
#, no-wrap |
| 443 |
msgid "(1)" |
| 444 |
msgstr "(1)" |
| 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 |
"Process attribute actions: signal mask, signal default handlers, scheduling " |
| 451 |
"algorithm and parameters, process group, and effective user and group IDs " |
| 452 |
"are changed as specified by the attributes object pointed to by I<attrp>." |
| 453 |
msgstr "" |
| 454 |
"Действия с атрибутами процесса: маска сигналов, обработчики сигналов по " |
| 455 |
"умолчанию, алгоритм планирования и параметры, ID группы процесса, " |
| 456 |
"эффективного пользователя и группы изменяются согласно объекту атрибутов, на " |
| 457 |
"который указывает I<attrp>." |
| 458 |
|
| 459 |
#. type: IP |
| 460 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 461 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 462 |
#, no-wrap |
| 463 |
msgid "(2)" |
| 464 |
msgstr "(2)" |
| 465 |
|
| 466 |
#. type: Plain text |
| 467 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 468 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 469 |
msgid "" |
| 470 |
"File actions, as specified in the I<file_actions> argument, are performed in " |
| 471 |
"the order that they were specified using calls to the " |
| 472 |
"B<posix_spawn_file_actions_add*>() functions." |
| 473 |
msgstr "" |
| 474 |
"Файловые действия, указываемые в аргументе I<file_actions>, выполняются в " |
| 475 |
"порядке их определения вызовами функций B<posix_spawn_file_actions_add*>()." |
| 476 |
|
| 477 |
#. type: IP |
| 478 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 479 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 480 |
#, no-wrap |
| 481 |
msgid "(3)" |
| 482 |
msgstr "(3)" |
| 483 |
|
| 484 |
#. type: Plain text |
| 485 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 486 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 487 |
msgid "File descriptors with the B<FD_CLOEXEC> flag set are closed." |
| 488 |
msgstr "Закрываются файловые дескрипторы, имеющие флаг B<FD_CLOEXEC>." |
| 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 |
"All process attributes in the child, other than those affected by attributes " |
| 495 |
"specified in the object pointed to by I<attrp> and the file actions in the " |
| 496 |
"object pointed to by I<file_actions>, will be affected as though the child " |
| 497 |
"was created with B<fork>(2) and it executed the program with B<execve>(2)." |
| 498 |
msgstr "" |
| 499 |
"Все атрибуты процесса-потомка, отличные от атрибутов в объекте, на который " |
| 500 |
"указывает I<attrp> и файловые действия в объекте, на который указывает " |
| 501 |
"I<file_actions>, будут изменены как если бы потомок создавался с помощью " |
| 502 |
"B<fork>(2) и выполнял программу с помощью B<execve>(2)." |
| 503 |
|
| 504 |
#. type: Plain text |
| 505 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 506 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 507 |
msgid "" |
| 508 |
"The process attributes actions are defined by the attributes object pointed " |
| 509 |
"to by I<attrp>. The I<spawn-flags> attribute (set using " |
| 510 |
"B<posix_spawnattr_setflags>(3)) controls the general actions that occur, " |
| 511 |
"and other attributes in the object specify values to be used during those " |
| 512 |
"actions." |
| 513 |
msgstr "" |
| 514 |
"Действия атрибутов процесса определяются атрибутами объекта, на который " |
| 515 |
"указывает I<attrp>. Атрибут I<spawn-flags> (устанавливается с помощью " |
| 516 |
"B<posix_spawnattr_setflags>(3)) управляет общими действиями, а остальные " |
| 517 |
"атрибуты объекта хранят значения, которые будут использованы в этих " |
| 518 |
"действиях." |
| 519 |
|
| 520 |
#. type: Plain text |
| 521 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 522 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 523 |
msgid "" |
| 524 |
"The effects of the flags that may be specified in I<spawn-flags> are as " |
| 525 |
"follows:" |
| 526 |
msgstr "Влияние флагов, которые могут быть указаны в I<spawn-flags>:" |
| 527 |
|
| 528 |
#. type: TP |
| 529 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 530 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 531 |
#, no-wrap |
| 532 |
msgid "B<POSIX_SPAWN_SETSIGMASK>" |
| 533 |
msgstr "B<POSIX_SPAWN_SETSIGMASK>" |
| 534 |
|
| 535 |
#. FIXME . |
| 536 |
#. (see |
| 537 |
#. .BR posix_spawnattr_setsigmask (3)) |
| 538 |
#. type: Plain text |
| 539 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 540 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 541 |
msgid "" |
| 542 |
"Set the signal mask to the signal set specified in the I<spawn-sigmask> " |
| 543 |
"attribute of the object pointed to by I<attrp>. If the " |
| 544 |
"B<POSIX_SPAWN_SETSIGMASK> flag is not set, then the child inherits the " |
| 545 |
"parent's signal mask." |
| 546 |
msgstr "" |
| 547 |
"Назначить маску сигналов равной набору сигналов, определённой в атрибуте " |
| 548 |
"I<spawn-sigmask> объекта, на который указывает I<attrp>. Если не установлен " |
| 549 |
"флаг B<POSIX_SPAWN_SETSIGMASK>, то потомок наследует маску сигналов родителя." |
| 550 |
|
| 551 |
#. type: TP |
| 552 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 553 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 554 |
#, no-wrap |
| 555 |
msgid "B<POSIX_SPAWN_SETSIGDEF>" |
| 556 |
msgstr "B<POSIX_SPAWN_SETSIGDEF>" |
| 557 |
|
| 558 |
#. FIXME . |
| 559 |
#. (see |
| 560 |
#. .BR posix_spawnattr_setsigdefault (3)) |
| 561 |
#. type: Plain text |
| 562 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 563 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 564 |
msgid "" |
| 565 |
"Reset the disposition of all signals in the set specified in the I<spawn-" |
| 566 |
"sigdefault> attribute of the object pointed to by I<attrp> to the default. " |
| 567 |
"For the treatment of the dispositions of signals not specified in the " |
| 568 |
"I<spawn-sigdefault> attribute, or the treatment when " |
| 569 |
"B<POSIX_SPAWN_SETSIGDEF> is not specified, see B<execve>(2)." |
| 570 |
msgstr "" |
| 571 |
"Сбрасывает обработчики всех сигналов в наборе, заданном в атрибуте I<spawn-" |
| 572 |
"sigdefault> объекта, на который указывает I<attrp>, в значения по умолчанию. " |
| 573 |
"О том, что происходит с обработчиками сигналов не указанных в атрибуте " |
| 574 |
"I<spawn-sigdefault> или когда не указан B<POSIX_SPAWN_SETSIGDEF>, смотрите " |
| 575 |
"B<execve>(2)." |
| 576 |
|
| 577 |
#. type: TP |
| 578 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 579 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 580 |
#, no-wrap |
| 581 |
msgid "B<POSIX_SPAWN_SETSCHEDPARAM>" |
| 582 |
msgstr "B<POSIX_SPAWN_SETSCHEDPARAM>" |
| 583 |
|
| 584 |
#. (POSIX_PRIORITY_SCHEDULING only) |
| 585 |
#. FIXME . |
| 586 |
#. (see |
| 587 |
#. .BR posix_spawnattr_setschedparam (3)) |
| 588 |
#. type: Plain text |
| 589 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 590 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 591 |
msgid "" |
| 592 |
"If this flag is set, and the B<POSIX_SPAWN_SETSCHEDULER> flag is not set, " |
| 593 |
"then set the scheduling parameters to the parameters specified in the " |
| 594 |
"I<spawn-schedparam> attribute of the object pointed to by I<attrp>." |
| 595 |
msgstr "" |
| 596 |
"Если этот флаг установлен, а B<POSIX_SPAWN_SETSCHEDULER> нет, то изменяет " |
| 597 |
"параметры планирования на значения, указанные в атрибуте I<spawn-schedparam> " |
| 598 |
"объекта, на который указывает I<attrp>." |
| 599 |
|
| 600 |
#. type: TP |
| 601 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 602 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 603 |
#, no-wrap |
| 604 |
msgid "B<POSIX_SPAWN_SETSCHEDULER>" |
| 605 |
msgstr "B<POSIX_SPAWN_SETSCHEDULER>" |
| 606 |
|
| 607 |
#. type: Plain text |
| 608 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 609 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 610 |
msgid "" |
| 611 |
"Set the scheduling policy algorithm and parameters of the child, as follows:" |
| 612 |
msgstr "Назначает алгоритм планирования и параметры потомка:" |
| 613 |
|
| 614 |
#. FIXME . |
| 615 |
#. (see |
| 616 |
#. .BR posix_spawnattr_setpolicy (3)) |
| 617 |
#. type: Plain text |
| 618 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 619 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 620 |
msgid "" |
| 621 |
"The scheduling policy is set to the value specified in the I<spawn-" |
| 622 |
"schedpolicy> attribute of the object pointed to by I<attrp>." |
| 623 |
msgstr "" |
| 624 |
"Алгоритму планирования присваивается значение, указанное в атрибуте I<spawn-" |
| 625 |
"schedpolicy> объекта, на который указывает I<attrp>." |
| 626 |
|
| 627 |
#. FIXME . |
| 628 |
#. (see |
| 629 |
#. .BR posix_spawnattr_setschedparam (3)) |
| 630 |
#. type: Plain text |
| 631 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 632 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 633 |
msgid "" |
| 634 |
"The scheduling parameters are set to the value specified in the I<spawn-" |
| 635 |
"schedparam> attribute of the object pointed to by I<attrp> (but see BUGS)." |
| 636 |
msgstr "" |
| 637 |
"Параметрам планирования присваивается значение, указанное в атрибуте I<spawn-" |
| 638 |
"schedparam> объекта, на который указывает I<attrp> (но смотрите ДЕФЕКТЫ)." |
| 639 |
|
| 640 |
#. type: Plain text |
| 641 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 642 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 643 |
msgid "" |
| 644 |
"If the B<POSIX_SPAWN_SETSCHEDPARAM> and B<POSIX_SPAWN_SETSCHEDPOLICY> flags " |
| 645 |
"are not specified, the child inherits the corresponding scheduling " |
| 646 |
"attributes from the parent." |
| 647 |
msgstr "" |
| 648 |
"Если не указаны флаги B<POSIX_SPAWN_SETSCHEDPARAM> и " |
| 649 |
"B<POSIX_SPAWN_SETSCHEDPOLICY>, то потомок наследует соответствующие атрибуты " |
| 650 |
"планирования от родителя." |
| 651 |
|
| 652 |
#. type: TP |
| 653 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 654 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 655 |
#, no-wrap |
| 656 |
msgid "B<POSIX_SPAWN_RESETIDS>" |
| 657 |
msgstr "B<POSIX_SPAWN_RESETIDS>" |
| 658 |
|
| 659 |
#. type: Plain text |
| 660 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 661 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 662 |
msgid "" |
| 663 |
"If this flag is set, reset the effective UID and GID to the real UID and GID " |
| 664 |
"of the parent process. If this flag is not set, then the child retains the " |
| 665 |
"effective UID and GID of the parent. In either case, if the set-user-ID and " |
| 666 |
"set-group-ID permission bits are enabled on the executable file, their " |
| 667 |
"effect will override the setting of the effective UID and GID (se " |
| 668 |
"B<execve>(2))." |
| 669 |
msgstr "" |
| 670 |
"Если этот флаг установлен, то сбрасываются эффективный UID и GID в реальный " |
| 671 |
"UID и GID родительского процесса. Если флаг не установлен, то потомок " |
| 672 |
"сохраняет эффективный UID и GID родителя. В любом случае, если биты прав set-" |
| 673 |
"user-ID и set-group-ID включены на исполняемом файле, то это заменяет " |
| 674 |
"значения эффективного UID и GID (смотрите B<execve>(2))." |
| 675 |
|
| 676 |
#. type: TP |
| 677 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 678 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 679 |
#, no-wrap |
| 680 |
msgid "B<POSIX_SPAWN_SETPGROUP>" |
| 681 |
msgstr "B<POSIX_SPAWN_SETPGROUP>" |
| 682 |
|
| 683 |
#. FIXME . |
| 684 |
#. (see |
| 685 |
#. .BR posix_spawnattr_setpgroup (3)) |
| 686 |
#. type: Plain text |
| 687 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 688 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 689 |
msgid "" |
| 690 |
"Set the process group to the value specified in the I<spawn-pgroup> " |
| 691 |
"attribute of the object pointed to by I<attrp>. If the I<spawn-pgroup> " |
| 692 |
"attribute has the value 0, the child's process group ID is made the same as " |
| 693 |
"its process ID. If the B<POSIX_SPAWN_SETPGROUP> flag is not set, the child " |
| 694 |
"inherits the parent's process group ID." |
| 695 |
msgstr "" |
| 696 |
"Назначает группе процесса значение, указанное в атрибуте I<spawn-pgroup> " |
| 697 |
"объекта, на который указывает I<attrp>. Если атрибут I<spawn-pgroup> равен " |
| 698 |
"0, то ID группы потомка становится равным его ID процесса. Если флаг " |
| 699 |
"B<POSIX_SPAWN_SETPGROUP> не установлен, то потомок наследует ID группы " |
| 700 |
"процесса родителя." |
| 701 |
|
| 702 |
#. type: TP |
| 703 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 704 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 705 |
#, fuzzy, no-wrap |
| 706 |
#| msgid "B<POSIX_SPAWN_SETSIGDEF>" |
| 707 |
msgid "B<POSIX_SPAWN_USEVFORK>" |
| 708 |
msgstr "B<POSIX_SPAWN_SETSIGDEF>" |
| 709 |
|
| 710 |
#. type: Plain text |
| 711 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 712 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 713 |
msgid "" |
| 714 |
"Since glibc 2.24, this flag has no effect. On older implementations, " |
| 715 |
"setting this flag forces the B<fork()> step to use B<vfork>(2) instead of " |
| 716 |
"B<fork>(2). The B<_GNU_SOURCE> feature test macro must be defined to obtain " |
| 717 |
"the definition of this constant." |
| 718 |
msgstr "" |
| 719 |
|
| 720 |
#. type: TP |
| 721 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 722 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 723 |
#, fuzzy, no-wrap |
| 724 |
#| msgid "B<POSIX_SPAWN_SETSIGDEF>" |
| 725 |
msgid "B<POSIX_SPAWN_SETSID> (since glibc 2.26)" |
| 726 |
msgstr "B<POSIX_SPAWN_SETSIGDEF>" |
| 727 |
|
| 728 |
#. This flag has been accepted in POSIX, see: |
| 729 |
#. http://austingroupbugs.net/view.php?id=1044 |
| 730 |
#. and has been implemented since glibc 2.26 |
| 731 |
#. commit daeb1fa2e1b33323e719015f5f546988bd4cc73b |
| 732 |
#. type: Plain text |
| 733 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 734 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 735 |
msgid "" |
| 736 |
"If this flag is set, the child process shall create a new session and become " |
| 737 |
"the session leader. The child process shall also become the process group " |
| 738 |
"leader of the new process group in the session (see B<setsid>(2)). The " |
| 739 |
"B<_GNU_SOURCE> feature test macro must be defined to obtain the definition " |
| 740 |
"of this constant." |
| 741 |
msgstr "" |
| 742 |
|
| 743 |
#. mtk: I think we probably don't want to say the following, since it |
| 744 |
#. could lead people to do the wrong thing |
| 745 |
#. The POSIX standard tells you to call |
| 746 |
#. this function to de-initialize the attributes object pointed to by |
| 747 |
#. .I attrp |
| 748 |
#. when you are done with it; |
| 749 |
#. however, on Linux systems this operation is a no-op. |
| 750 |
#. type: Plain text |
| 751 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 752 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 753 |
msgid "" |
| 754 |
"If I<attrp> is NULL, then the default behaviors described above for each " |
| 755 |
"flag apply." |
| 756 |
msgstr "" |
| 757 |
"Если I<attrp> равно NULL, то выполняются действия по умолчанию, которые " |
| 758 |
"описаны выше по каждому флагу." |
| 759 |
|
| 760 |
#. type: Plain text |
| 761 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 762 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 763 |
#, fuzzy |
| 764 |
#| msgid "" |
| 765 |
#| "The I<file_actions> argument specifies a sequence of file operations that " |
| 766 |
#| "are performed in the child process after the general processing described " |
| 767 |
#| "above, and before it performs the B<exec>(3). If I<file_actions> is " |
| 768 |
#| "NULL, then no special action is taken, and standard B<exec>(3) semantics " |
| 769 |
#| "apply--file descriptors open before the exec remain open in the new " |
| 770 |
#| "process, except those for which the B<FD_CLOEXEC> flag has been set. " |
| 771 |
#| "File locks remain in place." |
| 772 |
msgid "" |
| 773 |
"The I<file_actions> argument specifies a sequence of file operations that " |
| 774 |
"are performed in the child process after the general processing described " |
| 775 |
"above, and before it performs the B<exec>(3). If I<file_actions> is NULL, " |
| 776 |
"then no special action is taken, and standard B<exec>(3) semantics apply\\" |
| 777 |
"[em]file descriptors open before the exec remain open in the new process, " |
| 778 |
"except those for which the B<FD_CLOEXEC> flag has been set. File locks " |
| 779 |
"remain in place." |
| 780 |
msgstr "" |
| 781 |
"Аргумент I<file_actions> задаёт последовательность файловых операций, " |
| 782 |
"которые выполняются в дочернем процессе после общей обработки, описанной " |
| 783 |
"выше, и перед выполнением B<exec>(3). Если I<file_actions> равно NULL, то " |
| 784 |
"никаких специальных действий не производится и выполняются стандартные " |
| 785 |
"действия B<exec>(3) — файловые дескрипторы, открытые до выполнения exec, " |
| 786 |
"остаются открытыми и в новом процессе, за исключением тех, у которых " |
| 787 |
"установлен флаг B<FD_CLOEXEC>. Файловые блокировки остаются как были." |
| 788 |
|
| 789 |
#. FIXME . I think the following is best placed in the |
| 790 |
#. posix_spawn_file_actions_adddup2(3) page, and a similar statement is |
| 791 |
#. also needed in posix_spawn_file_actions_addclose(3) |
| 792 |
#. Note that you can specify file descriptors in |
| 793 |
#. .I posix_spawn_file_actions_adddup2 (3) |
| 794 |
#. which would not be usable if you called |
| 795 |
#. .BR dup2 (2) |
| 796 |
#. at that time--i.e., file descriptors that are opened or |
| 797 |
#. closed by the earlier operations |
| 798 |
#. added to |
| 799 |
#. .I file_actions . |
| 800 |
#. type: Plain text |
| 801 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 802 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 803 |
msgid "" |
| 804 |
"If I<file_actions> is not NULL, then it contains an ordered set of requests " |
| 805 |
"to B<open>(2), B<close>(2), and B<dup2>(2) files. These requests are added " |
| 806 |
"to the I<file_actions> by B<posix_spawn_file_actions_addopen>(3), " |
| 807 |
"B<posix_spawn_file_actions_addclose>(3), and " |
| 808 |
"B<posix_spawn_file_actions_adddup2>(3). The requested operations are " |
| 809 |
"performed in the order they were added to I<file_actions>." |
| 810 |
msgstr "" |
| 811 |
"Если I<file_actions> не равно NULL, то в нём содержится упорядоченный набор " |
| 812 |
"запросов B<open>(2), B<close>(2) и B<dup2>(2) на файлы. Эти запросы " |
| 813 |
"добавляются в I<file_actions> с помощью " |
| 814 |
"B<posix_spawn_file_actions_addopen>(3), " |
| 815 |
"B<posix_spawn_file_actions_addclose>(3) и " |
| 816 |
"B<posix_spawn_file_actions_adddup2>(3). Запрашиваемые операции выполняются в " |
| 817 |
"порядке их добавления в I<file_actions>." |
| 818 |
|
| 819 |
#. type: Plain text |
| 820 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 821 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 822 |
msgid "" |
| 823 |
"If any of the housekeeping actions fails (due to bogus values being passed " |
| 824 |
"or other reasons why signal handling, process scheduling, process group ID " |
| 825 |
"functions, and file descriptor operations might fail), the child process " |
| 826 |
"exits with exit value 127." |
| 827 |
msgstr "" |
| 828 |
"Если какая-либо обслуживающая операция завершается с ошибкой, (из-за " |
| 829 |
"переданных некорректных значений или по другим причинам, из-за которых " |
| 830 |
"обработка сигналов, планирование процесса, функции изменения ID группы " |
| 831 |
"процесса и операции с файловыми дескрипторами завершается с ошибкой), " |
| 832 |
"дочерний процесс завершается с кодом выхода 127." |
| 833 |
|
| 834 |
#. type: SS |
| 835 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 836 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 837 |
#, no-wrap |
| 838 |
msgid "exec() step" |
| 839 |
msgstr "Шаг exec()" |
| 840 |
|
| 841 |
#. type: Plain text |
| 842 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 843 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 844 |
msgid "" |
| 845 |
"Once the child has successfully forked and performed all requested pre-exec " |
| 846 |
"steps, the child runs the requested executable." |
| 847 |
msgstr "" |
| 848 |
"После того как потомок создан (fork) и выполнены все запрошенные шаги до " |
| 849 |
"exec, потомок выполняет запуск запрошенного исполняемого файла." |
| 850 |
|
| 851 |
#. type: Plain text |
| 852 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 853 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 854 |
msgid "" |
| 855 |
"The child process takes its environment from the I<envp> argument, which is " |
| 856 |
"interpreted as if it had been passed to B<execve>(2). The arguments to the " |
| 857 |
"created process come from the I<argv> argument, which is processed as for " |
| 858 |
"B<execve>(2)." |
| 859 |
msgstr "" |
| 860 |
"Дочерний процесс берёт своё окружение из аргумента I<envp>, которое " |
| 861 |
"рассматривается также как если бы оно передавалось в B<execve>(2). Аргументы " |
| 862 |
"созданного процесса выбираются из аргумента I<argv>, который обрабатывается " |
| 863 |
"также как для B<execve>(2)." |
| 864 |
|
| 865 |
#. type: SH |
| 866 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 867 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 868 |
#, no-wrap |
| 869 |
msgid "RETURN VALUE" |
| 870 |
msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" |
| 871 |
|
| 872 |
#. type: Plain text |
| 873 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 874 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 875 |
#, fuzzy |
| 876 |
#| msgid "" |
| 877 |
#| "Upon successful completion, B<posix_spawn>() and B<posix_spawnp>() " |
| 878 |
#| "place the PID of the child process in I<pid>, and return 0. If there is " |
| 879 |
#| "an error before or during the B<fork>(2), then no child is created, the " |
| 880 |
#| "contents of I<*pid> are unspecified, and these functions return an error " |
| 881 |
#| "number as described below." |
| 882 |
msgid "" |
| 883 |
"Upon successful completion, B<posix_spawn>() and B<posix_spawnp>() place " |
| 884 |
"the PID of the child process in I<pid>, and return 0. If there is an error " |
| 885 |
"during the B<fork()> step, then no child is created, the contents of I<*pid> " |
| 886 |
"are unspecified, and these functions return an error number as described " |
| 887 |
"below." |
| 888 |
msgstr "" |
| 889 |
"При успешном завершении B<posix_spawn>() и B<posix_spawnp>() помещают PID " |
| 890 |
"дочернего процесса в I<pid> и возвращают 0. Если перед или во время " |
| 891 |
"B<fork>(2) возникла ошибка, то потомок не создаётся, содержимое I<*pid> " |
| 892 |
"неопределенно и функции возвращают номер ошибки (описано далее)." |
| 893 |
|
| 894 |
#. type: Plain text |
| 895 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 896 |
#: opensuse-tumbleweed |
| 897 |
#, fuzzy |
| 898 |
#| msgid "" |
| 899 |
#| "Even when these functions return a success status, the child process may " |
| 900 |
#| "still fail for a plethora of reasons related to its pre-B<exec>() " |
| 901 |
#| "initialization. In addition, the B<exec>(3) may fail. In all of these " |
| 902 |
#| "cases, the child process will exit with the exit value of 127." |
| 903 |
msgid "" |
| 904 |
"Even when these functions return a success status, the child process may " |
| 905 |
"still fail for a plethora of reasons related to its pre-B<exec>() " |
| 906 |
"initialization. In addition, the B<exec>(3) may fail. In all of these " |
| 907 |
"cases, the child process will exit with the exit value of 127." |
| 908 |
msgstr "" |
| 909 |
"Даже когда эти функции выполняются без ошибок, дочерний процесс всё ещё " |
| 910 |
"может завершиться с ошибкой по многим причинам, касающимся инициализации до " |
| 911 |
"B<exec>(). Также, может завершиться ошибкой и B<exec>(3). Во всех этих " |
| 912 |
"случаях дочерний процесс завершается с кодом ошибки 127." |
| 913 |
|
| 914 |
#. type: SH |
| 915 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 916 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 917 |
#, no-wrap |
| 918 |
msgid "ERRORS" |
| 919 |
msgstr "ОШИБКИ" |
| 920 |
|
| 921 |
#. type: Plain text |
| 922 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 923 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 924 |
#, fuzzy |
| 925 |
#| msgid "" |
| 926 |
#| "The B<posix_spawn>() and B<posix_spawnp>() functions fail only in the " |
| 927 |
#| "case where the underlying B<fork>(2) or B<vfork>(2) call fails; in " |
| 928 |
#| "these cases, these functions return an error number, which will be one of " |
| 929 |
#| "the errors described for B<fork>(2) or B<vfork>(2)." |
| 930 |
msgid "" |
| 931 |
"The B<posix_spawn>() and B<posix_spawnp>() functions fail only in the case " |
| 932 |
"where the underlying B<fork>(2), B<vfork>(2), or B<clone>(2) call fails; in " |
| 933 |
"these cases, these functions return an error number, which will be one of " |
| 934 |
"the errors described for B<fork>(2), B<vfork>(2), or B<clone>(2)." |
| 935 |
msgstr "" |
| 936 |
"Функции B<posix_spawn>() и B<posix_spawnp>() завершаются с ошибкой, только " |
| 937 |
"из-за ошибок в используемых вызовах B<fork>(2) и B<vfork>(2); в этих случаях " |
| 938 |
"эти функции возвращают номер ошибки, который может быть одним из описанных в " |
| 939 |
"B<fork>(2) или B<vfork>(2)." |
| 940 |
|
| 941 |
#. type: Plain text |
| 942 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 943 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 944 |
msgid "In addition, these functions fail if:" |
| 945 |
msgstr "Также, эти функции завершаются с ошибкой если:" |
| 946 |
|
| 947 |
#. type: TP |
| 948 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 949 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 950 |
#, no-wrap |
| 951 |
msgid "B<ENOSYS>" |
| 952 |
msgstr "B<ENOSYS>" |
| 953 |
|
| 954 |
#. type: Plain text |
| 955 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 956 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 957 |
msgid "Function not supported on this system." |
| 958 |
msgstr "Функции не поддерживаются в этой системе." |
| 959 |
|
| 960 |
#. type: SH |
| 961 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 962 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 963 |
#, no-wrap |
| 964 |
msgid "STANDARDS" |
| 965 |
msgstr "СТАНДАРТЫ" |
| 966 |
|
| 967 |
#. type: Plain text |
| 968 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 969 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 970 |
msgid "POSIX.1-2008." |
| 971 |
msgstr "POSIX.1-2008." |
| 972 |
|
| 973 |
#. type: SH |
| 974 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 975 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 976 |
#, no-wrap |
| 977 |
msgid "HISTORY" |
| 978 |
msgstr "ИСТОРИЯ" |
| 979 |
|
| 980 |
#. FIXME . This piece belongs in spawnattr_setflags(3) |
| 981 |
#. The |
| 982 |
#. .B POSIX_SPAWN_USEVFORK |
| 983 |
#. flag is a GNU extension; the |
| 984 |
#. .B _GNU_SOURCE |
| 985 |
#. feature test macro must be defined (before including any header files) |
| 986 |
#. to obtain the definition of this constant. |
| 987 |
#. type: Plain text |
| 988 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 989 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 990 |
msgid "glibc 2.2. POSIX.1-2001." |
| 991 |
msgstr "glibc 2.2. POSIX.1-2001." |
| 992 |
|
| 993 |
#. type: SH |
| 994 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 995 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 996 |
#, no-wrap |
| 997 |
msgid "NOTES" |
| 998 |
msgstr "ПРИМЕЧАНИЯ" |
| 999 |
|
| 1000 |
#. type: Plain text |
| 1001 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1002 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1003 |
msgid "" |
| 1004 |
"The housekeeping activities in the child are controlled by the objects " |
| 1005 |
"pointed to by I<attrp> (for non-file actions) and I<file_actions> In POSIX " |
| 1006 |
"parlance, the I<posix_spawnattr_t> and I<posix_spawn_file_actions_t> data " |
| 1007 |
"types are referred to as objects, and their elements are not specified by " |
| 1008 |
"name. Portable programs should initialize these objects using only the " |
| 1009 |
"POSIX-specified functions. (In other words, although these objects may be " |
| 1010 |
"implemented as structures containing fields, portable programs must avoid " |
| 1011 |
"dependence on such implementation details.)" |
| 1012 |
msgstr "" |
| 1013 |
"Обслуживающие действия в потомке управляются объектами, на который указывает " |
| 1014 |
"I<attrp> (для не файловых действий) и I<file_actions>. В описании POSIX типы " |
| 1015 |
"данных I<posix_spawnattr_t> и I<posix_spawn_file_actions_t> указываются как " |
| 1016 |
"объекты, а их элементам не даны имена. Переносимые программы должны " |
| 1017 |
"инициализировать эти объекты с только помощью функций, определённых в POSIX " |
| 1018 |
"(другими словами, хотя эти объекты могут быть реализованы как структуры с " |
| 1019 |
"полями, в переносимых программах нельзя привязываться к такой реализации)." |
| 1020 |
|
| 1021 |
#. Tested on glibc 2.12 |
| 1022 |
#. type: Plain text |
| 1023 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1024 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1025 |
#, fuzzy |
| 1026 |
#| msgid "" |
| 1027 |
#| "According to POSIX, it unspecified whether fork handlers established with " |
| 1028 |
#| "B<pthread_atfork>(3) are called when B<posix_spawn>() is invoked. On " |
| 1029 |
#| "glibc, fork handlers are called only if the child is created using " |
| 1030 |
#| "B<fork>(2)." |
| 1031 |
msgid "" |
| 1032 |
"According to POSIX, it is unspecified whether fork handlers established with " |
| 1033 |
"B<pthread_atfork>(3) are called when B<posix_spawn>() is invoked. Since " |
| 1034 |
"glibc 2.24, the fork handlers are not executed in any case. On older " |
| 1035 |
"implementations, fork handlers are called only if the child is created using " |
| 1036 |
"B<fork>(2)." |
| 1037 |
msgstr "" |
| 1038 |
"В POSIX не определено вызывать ли обработчики fork, установленные с помощью " |
| 1039 |
"B<pthread_atfork>(3), при вызове B<posix_spawn>(). В glibc обработчики fork " |
| 1040 |
"вызываются только, если потомок создан с помощью B<fork>(2)." |
| 1041 |
|
| 1042 |
#. type: Plain text |
| 1043 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1044 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1045 |
msgid "" |
| 1046 |
"There is no \"posix_fspawn\" function (i.e., a function that is to " |
| 1047 |
"B<posix_spawn>() as B<fexecve>(3) is to B<execve>(2)). However, this " |
| 1048 |
"functionality can be obtained by specifying the I<path> argument as one of " |
| 1049 |
"the files in the caller's I</proc/self/fd> directory." |
| 1050 |
msgstr "" |
| 1051 |
"Не существует функции «posix_fspawn» (т. е., функции типа B<posix_spawn>(), " |
| 1052 |
"которая вызывала бы B<fexecve>(3) вместо B<execve>(2)). Однако, подобное " |
| 1053 |
"поведение можно получить указав аргумент I<path> как один из файлов в " |
| 1054 |
"каталоге I</proc/self/fd> вызывающего." |
| 1055 |
|
| 1056 |
#. type: SH |
| 1057 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1058 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1059 |
#, no-wrap |
| 1060 |
msgid "BUGS" |
| 1061 |
msgstr "ПРОГРАММНЫЕ ОШИБКИ" |
| 1062 |
|
| 1063 |
#. http://sourceware.org/bugzilla/show_bug.cgi?id=12052 |
| 1064 |
#. type: Plain text |
| 1065 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1066 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1067 |
msgid "" |
| 1068 |
"POSIX.1 says that when B<POSIX_SPAWN_SETSCHEDULER> is specified in I<spawn-" |
| 1069 |
"flags>, then the B<POSIX_SPAWN_SETSCHEDPARAM> (if present) is ignored. " |
| 1070 |
"However, before glibc 2.14, calls to B<posix_spawn>() failed with an error " |
| 1071 |
"if B<POSIX_SPAWN_SETSCHEDULER> was specified without also specifying " |
| 1072 |
"B<POSIX_SPAWN_SETSCHEDPARAM>." |
| 1073 |
msgstr "" |
| 1074 |
"В POSIX.1 указано, что когда в I<spawn-flags> определён " |
| 1075 |
"B<POSIX_SPAWN_SETSCHEDULER>, флаг B<POSIX_SPAWN_SETSCHEDPARAM> (если есть) " |
| 1076 |
"игнорируется. Однако до glibc 2.14 вызов B<posix_spawn>() завершался с " |
| 1077 |
"ошибкой, если B<POSIX_SPAWN_SETSCHEDULER> был указан, а " |
| 1078 |
"B<POSIX_SPAWN_SETSCHEDPARAM> отсутствовал." |
| 1079 |
|
| 1080 |
#. type: SH |
| 1081 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1082 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1083 |
#, no-wrap |
| 1084 |
msgid "EXAMPLES" |
| 1085 |
msgstr "ПРИМЕРЫ" |
| 1086 |
|
| 1087 |
#. type: Plain text |
| 1088 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1089 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1090 |
msgid "" |
| 1091 |
"The program below demonstrates the use of various functions in the POSIX " |
| 1092 |
"spawn API. The program accepts command-line attributes that can be used to " |
| 1093 |
"create file actions and attributes objects. The remaining command-line " |
| 1094 |
"arguments are used as the executable name and command-line arguments of the " |
| 1095 |
"program that is executed in the child." |
| 1096 |
msgstr "" |
| 1097 |
"Представленная далее программа показывает использование различных функций " |
| 1098 |
"программного интерфейса POSIX для создания процессов. Она принимает атрибуты " |
| 1099 |
"из командной строки, которые позволяют задать файловые действия и атрибуты " |
| 1100 |
"объектов при создании. В остальных аргументах командной строки задаются имя " |
| 1101 |
"исполняемого файла и аргументы командной строки для программы, исполняемой в " |
| 1102 |
"потомке." |
| 1103 |
|
| 1104 |
#. type: Plain text |
| 1105 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1106 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1107 |
msgid "" |
| 1108 |
"In the first run, the B<date>(1) command is executed in the child, and the " |
| 1109 |
"B<posix_spawn>() call employs no file actions or attributes objects." |
| 1110 |
msgstr "" |
| 1111 |
"Здесь для исполнения в потомке указана команда B<date>(1) и вызов " |
| 1112 |
"B<posix_spawn>() не использует каких-либо файловых действий и атрибутов " |
| 1113 |
"объекта." |
| 1114 |
|
| 1115 |
#. type: Plain text |
| 1116 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1117 |
#: opensuse-tumbleweed |
| 1118 |
#, fuzzy, no-wrap |
| 1119 |
#| msgid "" |
| 1120 |
#| "$ B<./a.out date>\n" |
| 1121 |
#| "PID of child: 7634\n" |
| 1122 |
#| "Tue Feb 1 19:47:50 CEST 2011\n" |
| 1123 |
#| "Child status: exited, status=0\n" |
| 1124 |
msgid "" |
| 1125 |
"$B< ./a.out date>;\n" |
| 1126 |
"PID of child: 7634\n" |
| 1127 |
"Tue Feb 1 19:47:50 CEST 2011\n" |
| 1128 |
"Child status: exited, status=0\n" |
| 1129 |
msgstr "" |
| 1130 |
"$ B<./a.out date>\n" |
| 1131 |
"PID потомка: 7634\n" |
| 1132 |
"Tue Feb 1 19:47:50 CEST 2011\n" |
| 1133 |
"Состояние потомка: завершился, состояние=0\n" |
| 1134 |
|
| 1135 |
#. type: Plain text |
| 1136 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1137 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1138 |
msgid "" |
| 1139 |
"In the next run, the I<-c> command-line option is used to create a file " |
| 1140 |
"actions object that closes standard output in the child. Consequently, " |
| 1141 |
"B<date>(1) fails when trying to perform output and exits with a status of 1." |
| 1142 |
msgstr "" |
| 1143 |
"Здесь параметром командной строки I<-c> передаётся объект файловых действий, " |
| 1144 |
"которые закрывают стандартный вывод в потомке. В результате этого B<date>(1) " |
| 1145 |
"завершается с ошибкой, когда пытается выполнить вывод данных и завершается с " |
| 1146 |
"кодом состояния 1." |
| 1147 |
|
| 1148 |
#. type: Plain text |
| 1149 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1150 |
#: opensuse-tumbleweed |
| 1151 |
#, fuzzy, no-wrap |
| 1152 |
#| msgid "" |
| 1153 |
#| "$ B<./a.out -c date>\n" |
| 1154 |
#| "PID of child: 7636\n" |
| 1155 |
#| "date: write error: Bad file descriptor\n" |
| 1156 |
#| "Child status: exited, status=1\n" |
| 1157 |
msgid "" |
| 1158 |
"$B< ./a.out -c date>;\n" |
| 1159 |
"PID of child: 7636\n" |
| 1160 |
"date: write error: Bad file descriptor\n" |
| 1161 |
"Child status: exited, status=1\n" |
| 1162 |
msgstr "" |
| 1163 |
"$ B<./a.out -c date>\n" |
| 1164 |
"PID потомка: 7636\n" |
| 1165 |
"date: write error: Bad file descriptor\n" |
| 1166 |
"Состояние потомка: завершился, состояние=1\n" |
| 1167 |
|
| 1168 |
#. type: Plain text |
| 1169 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1170 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1171 |
msgid "" |
| 1172 |
"In the next run, the I<-s> command-line option is used to create an " |
| 1173 |
"attributes object that specifies that all (blockable) signals in the child " |
| 1174 |
"should be blocked. Consequently, trying to kill child with the default " |
| 1175 |
"signal sent by B<kill>(1) (i.e., B<SIGTERM>) fails, because that signal is " |
| 1176 |
"blocked. Therefore, to kill the child, B<SIGKILL> is necessary (B<SIGKILL> " |
| 1177 |
"can't be blocked)." |
| 1178 |
msgstr "" |
| 1179 |
"Здесь используется параметр командной строки I<-s> для создания объекта " |
| 1180 |
"атрибутов, который используется для блокировки всех сигналов (блокируемых) в " |
| 1181 |
"потомке. В результате этого попытка убить потомка сигналом по умолчанию (т. " |
| 1182 |
"е., B<SIGTERM>) с помощью B<kill>(1) завершается ошибкой, так как этот " |
| 1183 |
"сигнал заблокирован. Теперь, чтобы убить потомка, требуется сигнал " |
| 1184 |
"B<SIGKILL> (B<SIGKILL> невозможно заблокировать)." |
| 1185 |
|
| 1186 |
#. type: Plain text |
| 1187 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1188 |
#: opensuse-tumbleweed |
| 1189 |
#, fuzzy, no-wrap |
| 1190 |
#| msgid "" |
| 1191 |
#| "$ B<./a.out -s sleep 60 &>\n" |
| 1192 |
#| "[1] 7637\n" |
| 1193 |
#| "$ PID of child: 7638\n" |
| 1194 |
msgid "" |
| 1195 |
"$B< ./a.out -s sleep 60 &>\n" |
| 1196 |
"[1] 7637\n" |
| 1197 |
"$ PID of child: 7638\n" |
| 1198 |
msgstr "" |
| 1199 |
"$ B<./a.out -s sleep 60 &>\n" |
| 1200 |
"[1] 7637\n" |
| 1201 |
"$ PID потомка: 7638\n" |
| 1202 |
|
| 1203 |
#. type: Plain text |
| 1204 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1205 |
#: opensuse-tumbleweed |
| 1206 |
#, fuzzy, no-wrap |
| 1207 |
#| msgid "" |
| 1208 |
#| "$ B<kill 7638>\n" |
| 1209 |
#| "$ B<kill -KILL 7638>\n" |
| 1210 |
#| "$ Child status: killed by signal 9\n" |
| 1211 |
#| "[1]+ Done ./a.out -s sleep 60\n" |
| 1212 |
msgid "" |
| 1213 |
"$B< kill 7638>;\n" |
| 1214 |
"$B< kill -KILL 7638>;\n" |
| 1215 |
"$ Child status: killed by signal 9\n" |
| 1216 |
"[1]+ Done ./a.out -s sleep 60\n" |
| 1217 |
msgstr "" |
| 1218 |
"$ B<kill 7638>\n" |
| 1219 |
"$ B<kill -KILL 7638>\n" |
| 1220 |
"$ Состояние потомка: убит по сигналу 9\n" |
| 1221 |
"[1]+ Done ./a.out -s sleep 60\n" |
| 1222 |
|
| 1223 |
#. type: Plain text |
| 1224 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1225 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1226 |
msgid "" |
| 1227 |
"When we try to execute a nonexistent command in the child, the B<exec>(3) " |
| 1228 |
"fails and the child exits with a status of 127." |
| 1229 |
msgstr "" |
| 1230 |
"Когда мы пытаемся выполнить в потомке несуществующую команду, B<exec>(3) " |
| 1231 |
"завершается с ошибкой и потомок завершается с кодом 127." |
| 1232 |
|
| 1233 |
#. type: Plain text |
| 1234 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1235 |
#: opensuse-tumbleweed |
| 1236 |
#, fuzzy, no-wrap |
| 1237 |
#| msgid "" |
| 1238 |
#| "$ B<./a.out xxxxx\n" |
| 1239 |
#| "PID of child: 10190\n" |
| 1240 |
#| "Child status: exited, status=127>\n" |
| 1241 |
msgid "" |
| 1242 |
"$B< ./a.out xxxxx>;\n" |
| 1243 |
"PID of child: 10190\n" |
| 1244 |
"Child status: exited, status=127\n" |
| 1245 |
msgstr "" |
| 1246 |
"$ B<./a.out xxxxx\n" |
| 1247 |
"PID потомка: 10190\n" |
| 1248 |
"Состояние потомка: завершился, состояние=127>\n" |
| 1249 |
|
| 1250 |
#. type: SS |
| 1251 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1252 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1253 |
#, no-wrap |
| 1254 |
msgid "Program source" |
| 1255 |
msgstr "Исходный код программы" |
| 1256 |
|
| 1257 |
#. type: Plain text |
| 1258 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1259 |
#: opensuse-tumbleweed |
| 1260 |
#, no-wrap |
| 1261 |
msgid "" |
| 1262 |
"#include E<lt>err.hE<gt>\n" |
| 1263 |
"#include E<lt>errno.hE<gt>\n" |
| 1264 |
"#include E<lt>spawn.hE<gt>\n" |
| 1265 |
"#include E<lt>stdint.hE<gt>\n" |
| 1266 |
"#include E<lt>stdio.hE<gt>\n" |
| 1267 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1268 |
"#include E<lt>string.hE<gt>\n" |
| 1269 |
"#include E<lt>unistd.hE<gt>\n" |
| 1270 |
"#include E<lt>wait.hE<gt>\n" |
| 1271 |
"\\&\n" |
| 1272 |
"char **environ;\n" |
| 1273 |
"\\&\n" |
| 1274 |
"int\n" |
| 1275 |
"main(int argc, char *argv[])\n" |
| 1276 |
"{\n" |
| 1277 |
" pid_t child_pid;\n" |
| 1278 |
" int s, opt, status;\n" |
| 1279 |
" sigset_t mask;\n" |
| 1280 |
" posix_spawnattr_t attr;\n" |
| 1281 |
" posix_spawnattr_t *attrp;\n" |
| 1282 |
" posix_spawn_file_actions_t file_actions;\n" |
| 1283 |
" posix_spawn_file_actions_t *file_actionsp;\n" |
| 1284 |
"\\&\n" |
| 1285 |
" /* Parse command-line options, which can be used to specify an\n" |
| 1286 |
" attributes object and file actions object for the child. */\n" |
| 1287 |
"\\&\n" |
| 1288 |
" attrp = NULL;\n" |
| 1289 |
" file_actionsp = NULL;\n" |
| 1290 |
"\\&\n" |
| 1291 |
" while ((opt = getopt(argc, argv, \"sc\")) != -1) {\n" |
| 1292 |
" switch (opt) {\n" |
| 1293 |
" case \\[aq]c\\[aq]: /* -c: close standard output in child */\n" |
| 1294 |
"\\&\n" |
| 1295 |
" /* Create a file actions object and add a \"close\"\n" |
| 1296 |
" action to it. */\n" |
| 1297 |
"\\&\n" |
| 1298 |
" s = posix_spawn_file_actions_init(&file_actions);\n" |
| 1299 |
" if (s != 0)\n" |
| 1300 |
" errc(EXIT_FAILURE, s, \"posix_spawn_file_actions_init\");\n" |
| 1301 |
"\\&\n" |
| 1302 |
" s = posix_spawn_file_actions_addclose(&file_actions,\n" |
| 1303 |
" STDOUT_FILENO);\n" |
| 1304 |
" if (s != 0)\n" |
| 1305 |
" errc(EXIT_FAILURE, s, \"posix_spawn_file_actions_addclose\");\n" |
| 1306 |
"\\&\n" |
| 1307 |
" file_actionsp = &file_actions;\n" |
| 1308 |
" break;\n" |
| 1309 |
"\\&\n" |
| 1310 |
" case \\[aq]s\\[aq]: /* -s: block all signals in child */\n" |
| 1311 |
"\\&\n" |
| 1312 |
" /* Create an attributes object and add a \"set signal mask\"\n" |
| 1313 |
" action to it. */\n" |
| 1314 |
"\\&\n" |
| 1315 |
" s = posix_spawnattr_init(&attr);\n" |
| 1316 |
" if (s != 0)\n" |
| 1317 |
" errc(EXIT_FAILURE, s, \"posix_spawnattr_init\");\n" |
| 1318 |
" s = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK);\n" |
| 1319 |
" if (s != 0)\n" |
| 1320 |
" errc(EXIT_FAILURE, s, \"posix_spawnattr_setflags\");\n" |
| 1321 |
"\\&\n" |
| 1322 |
" sigfillset(&mask);\n" |
| 1323 |
" s = posix_spawnattr_setsigmask(&attr, &mask);\n" |
| 1324 |
" if (s != 0)\n" |
| 1325 |
" errc(EXIT_FAILURE, s, \"posix_spawnattr_setsigmask\");\n" |
| 1326 |
"\\&\n" |
| 1327 |
" attrp = &attr;\n" |
| 1328 |
" break;\n" |
| 1329 |
" }\n" |
| 1330 |
" }\n" |
| 1331 |
"\\&\n" |
| 1332 |
" if (argv[optind] == NULL) {\n" |
| 1333 |
" fprintf(stderr, \"Usage: %s [-cs] executable [args]\\[rs]n\", argv[0]);\n" |
| 1334 |
" exit(EXIT_FAILURE);\n" |
| 1335 |
" }\n" |
| 1336 |
"\\&\n" |
| 1337 |
" /* Spawn the child. The name of the program to execute and the\n" |
| 1338 |
" command-line arguments are taken from the command-line arguments\n" |
| 1339 |
" of this program. The environment of the program execed in the\n" |
| 1340 |
" child is made the same as the parent\\[aq]s environment. */\n" |
| 1341 |
"\\&\n" |
| 1342 |
" s = posix_spawnp(&child_pid, argv[optind], file_actionsp, attrp,\n" |
| 1343 |
" &argv[optind], environ);\n" |
| 1344 |
" if (s != 0)\n" |
| 1345 |
" errc(EXIT_FAILURE, s, \"posix_spawn\");\n" |
| 1346 |
"\\&\n" |
| 1347 |
" /* Destroy any objects that we created earlier. */\n" |
| 1348 |
"\\&\n" |
| 1349 |
" if (attrp != NULL) {\n" |
| 1350 |
" s = posix_spawnattr_destroy(attrp);\n" |
| 1351 |
" if (s != 0)\n" |
| 1352 |
" errc(EXIT_FAILURE, s, \"posix_spawnattr_destroy\");\n" |
| 1353 |
" }\n" |
| 1354 |
"\\&\n" |
| 1355 |
" if (file_actionsp != NULL) {\n" |
| 1356 |
" s = posix_spawn_file_actions_destroy(file_actionsp);\n" |
| 1357 |
" if (s != 0)\n" |
| 1358 |
" errc(EXIT_FAILURE, s, \"posix_spawn_file_actions_destroy\");\n" |
| 1359 |
" }\n" |
| 1360 |
"\\&\n" |
| 1361 |
" printf(\"PID of child: %jd\\[rs]n\", (intmax_t) child_pid);\n" |
| 1362 |
"\\&\n" |
| 1363 |
" /* Monitor status of the child until it terminates. */\n" |
| 1364 |
"\\&\n" |
| 1365 |
" do {\n" |
| 1366 |
" s = waitpid(child_pid, &status, WUNTRACED | WCONTINUED);\n" |
| 1367 |
" if (s == -1)\n" |
| 1368 |
" err(EXIT_FAILURE, \"waitpid\");\n" |
| 1369 |
"\\&\n" |
| 1370 |
" printf(\"Child status: \");\n" |
| 1371 |
" if (WIFEXITED(status)) {\n" |
| 1372 |
" printf(\"exited, status=%d\\[rs]n\", WEXITSTATUS(status));\n" |
| 1373 |
" } else if (WIFSIGNALED(status)) {\n" |
| 1374 |
" printf(\"killed by signal %d\\[rs]n\", WTERMSIG(status));\n" |
| 1375 |
" } else if (WIFSTOPPED(status)) {\n" |
| 1376 |
" printf(\"stopped by signal %d\\[rs]n\", WSTOPSIG(status));\n" |
| 1377 |
" } else if (WIFCONTINUED(status)) {\n" |
| 1378 |
" printf(\"continued\\[rs]n\");\n" |
| 1379 |
" }\n" |
| 1380 |
" } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n" |
| 1381 |
"\\&\n" |
| 1382 |
" exit(EXIT_SUCCESS);\n" |
| 1383 |
"}\n" |
| 1384 |
msgstr "" |
| 1385 |
|
| 1386 |
#. SRC END |
| 1387 |
#. type: SH |
| 1388 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1389 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1390 |
#, no-wrap |
| 1391 |
msgid "SEE ALSO" |
| 1392 |
msgstr "СМОТРИТЕ ТАКЖЕ" |
| 1393 |
|
| 1394 |
#. type: Plain text |
| 1395 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1396 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1397 |
msgid "" |
| 1398 |
"B<close>(2), B<dup2>(2), B<execl>(2), B<execlp>(2), B<fork>(2), B<open>(2), " |
| 1399 |
"B<sched_setparam>(2), B<sched_setscheduler>(2), B<setpgid>(2), B<setuid>(2), " |
| 1400 |
"B<sigaction>(2), B<sigprocmask>(2), B<posix_spawn_file_actions_addclose>(3), " |
| 1401 |
"B<posix_spawn_file_actions_adddup2>(3), " |
| 1402 |
"B<posix_spawn_file_actions_addopen>(3), " |
| 1403 |
"B<posix_spawn_file_actions_destroy>(3), B<posix_spawn_file_actions_init>(3), " |
| 1404 |
"B<posix_spawnattr_destroy>(3), B<posix_spawnattr_getflags>(3), " |
| 1405 |
"B<posix_spawnattr_getpgroup>(3), B<posix_spawnattr_getschedparam>(3), " |
| 1406 |
"B<posix_spawnattr_getschedpolicy>(3), B<posix_spawnattr_getsigdefault>(3), " |
| 1407 |
"B<posix_spawnattr_getsigmask>(3), B<posix_spawnattr_init>(3), " |
| 1408 |
"B<posix_spawnattr_setflags>(3), B<posix_spawnattr_setpgroup>(3), " |
| 1409 |
"B<posix_spawnattr_setschedparam>(3), B<posix_spawnattr_setschedpolicy>(3), " |
| 1410 |
"B<posix_spawnattr_setsigdefault>(3), B<posix_spawnattr_setsigmask>(3), " |
| 1411 |
"B<pthread_atfork>(3), I<E<lt>spawn.hE<gt>>, Base Definitions volume of " |
| 1412 |
"POSIX.1-2001, I<http://www.opengroup.org/unix/online.html>" |
| 1413 |
msgstr "" |
| 1414 |
"B<close>(2), B<dup2>(2), B<execl>(2), B<execlp>(2), B<fork>(2), B<open>(2), " |
| 1415 |
"B<sched_setparam>(2), B<sched_setscheduler>(2), B<setpgid>(2), B<setuid>(2), " |
| 1416 |
"B<sigaction>(2), B<sigprocmask>(2), B<posix_spawn_file_actions_addclose>(3), " |
| 1417 |
"B<posix_spawn_file_actions_adddup2>(3), " |
| 1418 |
"B<posix_spawn_file_actions_addopen>(3), " |
| 1419 |
"B<posix_spawn_file_actions_destroy>(3), B<posix_spawn_file_actions_init>(3), " |
| 1420 |
"B<posix_spawnattr_destroy>(3), B<posix_spawnattr_getflags>(3), " |
| 1421 |
"B<posix_spawnattr_getpgroup>(3), B<posix_spawnattr_getschedparam>(3), " |
| 1422 |
"B<posix_spawnattr_getschedpolicy>(3), B<posix_spawnattr_getsigdefault>(3), " |
| 1423 |
"B<posix_spawnattr_getsigmask>(3), B<posix_spawnattr_init>(3), " |
| 1424 |
"B<posix_spawnattr_setflags>(3), B<posix_spawnattr_setpgroup>(3), " |
| 1425 |
"B<posix_spawnattr_setschedparam>(3), B<posix_spawnattr_setschedpolicy>(3), " |
| 1426 |
"B<posix_spawnattr_setsigdefault>(3), B<posix_spawnattr_setsigmask>(3), " |
| 1427 |
"B<pthread_atfork>(3), I<E<lt>spawn.hE<gt>>, Base Definitions volume of " |
| 1428 |
"POSIX.1-2001, I<http://www.opengroup.org/unix/online.html>" |
| 1429 |
|
| 1430 |
#. type: TH |
| 1431 |
#: debian-trixie |
| 1432 |
#, no-wrap |
| 1433 |
msgid "2024-06-15" |
| 1434 |
msgstr "15 июня 2024 г." |
| 1435 |
|
| 1436 |
#. type: TH |
| 1437 |
#: debian-trixie |
| 1438 |
#, no-wrap |
| 1439 |
msgid "Linux man-pages 6.9.1" |
| 1440 |
msgstr "Страницы руководства Linux 6.9.1" |
| 1441 |
|
| 1442 |
#. type: Plain text |
| 1443 |
#: debian-trixie |
| 1444 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 1445 |
msgstr "Стандартная библиотека языка C (I<libc>, I<-lc>)" |
| 1446 |
|
| 1447 |
#. type: Plain text |
| 1448 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1449 |
msgid "" |
| 1450 |
"Even when these functions return a success status, the child process may " |
| 1451 |
"still fail for a plethora of reasons related to its pre-B<exec>() " |
| 1452 |
"initialization. In addition, the B<exec>(3) may fail. In all of these " |
| 1453 |
"cases, the child process will exit with the exit value of 127." |
| 1454 |
msgstr "" |
| 1455 |
"Даже когда эти функции выполняются без ошибок, дочерний процесс всё ещё " |
| 1456 |
"может завершиться с ошибкой по многим причинам, касающимся инициализации до " |
| 1457 |
"B<exec>(). Также, может завершиться ошибкой и B<exec>(3). Во всех этих " |
| 1458 |
"случаях дочерний процесс завершается с кодом ошибки 127." |
| 1459 |
|
| 1460 |
#. type: Plain text |
| 1461 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1462 |
#, no-wrap |
| 1463 |
msgid "" |
| 1464 |
"$ B<./a.out date>\n" |
| 1465 |
"PID of child: 7634\n" |
| 1466 |
"Tue Feb 1 19:47:50 CEST 2011\n" |
| 1467 |
"Child status: exited, status=0\n" |
| 1468 |
msgstr "" |
| 1469 |
"$ B<./a.out date>\n" |
| 1470 |
"PID потомка: 7634\n" |
| 1471 |
"Tue Feb 1 19:47:50 CEST 2011\n" |
| 1472 |
"Состояние потомка: завершился, состояние=0\n" |
| 1473 |
|
| 1474 |
#. type: Plain text |
| 1475 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1476 |
#, no-wrap |
| 1477 |
msgid "" |
| 1478 |
"$ B<./a.out -c date>\n" |
| 1479 |
"PID of child: 7636\n" |
| 1480 |
"date: write error: Bad file descriptor\n" |
| 1481 |
"Child status: exited, status=1\n" |
| 1482 |
msgstr "" |
| 1483 |
"$ B<./a.out -c date>\n" |
| 1484 |
"PID потомка: 7636\n" |
| 1485 |
"date: write error: Bad file descriptor\n" |
| 1486 |
"Состояние потомка: завершился, состояние=1\n" |
| 1487 |
|
| 1488 |
#. type: Plain text |
| 1489 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1490 |
#, no-wrap |
| 1491 |
msgid "" |
| 1492 |
"$ B<./a.out -s sleep 60 &>\n" |
| 1493 |
"[1] 7637\n" |
| 1494 |
"$ PID of child: 7638\n" |
| 1495 |
msgstr "" |
| 1496 |
"$ B<./a.out -s sleep 60 &>\n" |
| 1497 |
"[1] 7637\n" |
| 1498 |
"$ PID потомка: 7638\n" |
| 1499 |
|
| 1500 |
#. type: Plain text |
| 1501 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1502 |
#, no-wrap |
| 1503 |
msgid "" |
| 1504 |
"$ B<kill 7638>\n" |
| 1505 |
"$ B<kill -KILL 7638>\n" |
| 1506 |
"$ Child status: killed by signal 9\n" |
| 1507 |
"[1]+ Done ./a.out -s sleep 60\n" |
| 1508 |
msgstr "" |
| 1509 |
"$ B<kill 7638>\n" |
| 1510 |
"$ B<kill -KILL 7638>\n" |
| 1511 |
"$ Состояние потомка: убит по сигналу 9\n" |
| 1512 |
"[1]+ Done ./a.out -s sleep 60\n" |
| 1513 |
|
| 1514 |
#. type: Plain text |
| 1515 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1516 |
#, no-wrap |
| 1517 |
msgid "" |
| 1518 |
"$ B<./a.out xxxxx\n" |
| 1519 |
"PID of child: 10190\n" |
| 1520 |
"Child status: exited, status=127>\n" |
| 1521 |
msgstr "" |
| 1522 |
"$ B<./a.out xxxxx\n" |
| 1523 |
"PID потомка: 10190\n" |
| 1524 |
"Состояние потомка: завершился, состояние=127>\n" |
| 1525 |
|
| 1526 |
#. type: Plain text |
| 1527 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1528 |
#, no-wrap |
| 1529 |
msgid "" |
| 1530 |
"#include E<lt>errno.hE<gt>\n" |
| 1531 |
"#include E<lt>spawn.hE<gt>\n" |
| 1532 |
"#include E<lt>stdint.hE<gt>\n" |
| 1533 |
"#include E<lt>stdio.hE<gt>\n" |
| 1534 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1535 |
"#include E<lt>string.hE<gt>\n" |
| 1536 |
"#include E<lt>unistd.hE<gt>\n" |
| 1537 |
"#include E<lt>wait.hE<gt>\n" |
| 1538 |
"\\&\n" |
| 1539 |
"#define errExit(msg) do { perror(msg); \\[rs]\n" |
| 1540 |
" exit(EXIT_FAILURE); } while (0)\n" |
| 1541 |
"\\&\n" |
| 1542 |
"#define errExitEN(en, msg) \\[rs]\n" |
| 1543 |
" do { errno = en; perror(msg); \\[rs]\n" |
| 1544 |
" exit(EXIT_FAILURE); } while (0)\n" |
| 1545 |
"\\&\n" |
| 1546 |
"char **environ;\n" |
| 1547 |
"\\&\n" |
| 1548 |
"int\n" |
| 1549 |
"main(int argc, char *argv[])\n" |
| 1550 |
"{\n" |
| 1551 |
" pid_t child_pid;\n" |
| 1552 |
" int s, opt, status;\n" |
| 1553 |
" sigset_t mask;\n" |
| 1554 |
" posix_spawnattr_t attr;\n" |
| 1555 |
" posix_spawnattr_t *attrp;\n" |
| 1556 |
" posix_spawn_file_actions_t file_actions;\n" |
| 1557 |
" posix_spawn_file_actions_t *file_actionsp;\n" |
| 1558 |
"\\&\n" |
| 1559 |
" /* Parse command-line options, which can be used to specify an\n" |
| 1560 |
" attributes object and file actions object for the child. */\n" |
| 1561 |
"\\&\n" |
| 1562 |
" attrp = NULL;\n" |
| 1563 |
" file_actionsp = NULL;\n" |
| 1564 |
"\\&\n" |
| 1565 |
" while ((opt = getopt(argc, argv, \"sc\")) != -1) {\n" |
| 1566 |
" switch (opt) {\n" |
| 1567 |
" case \\[aq]c\\[aq]: /* -c: close standard output in child */\n" |
| 1568 |
"\\&\n" |
| 1569 |
" /* Create a file actions object and add a \"close\"\n" |
| 1570 |
" action to it. */\n" |
| 1571 |
"\\&\n" |
| 1572 |
" s = posix_spawn_file_actions_init(&file_actions);\n" |
| 1573 |
" if (s != 0)\n" |
| 1574 |
" errExitEN(s, \"posix_spawn_file_actions_init\");\n" |
| 1575 |
"\\&\n" |
| 1576 |
" s = posix_spawn_file_actions_addclose(&file_actions,\n" |
| 1577 |
" STDOUT_FILENO);\n" |
| 1578 |
" if (s != 0)\n" |
| 1579 |
" errExitEN(s, \"posix_spawn_file_actions_addclose\");\n" |
| 1580 |
"\\&\n" |
| 1581 |
" file_actionsp = &file_actions;\n" |
| 1582 |
" break;\n" |
| 1583 |
"\\&\n" |
| 1584 |
" case \\[aq]s\\[aq]: /* -s: block all signals in child */\n" |
| 1585 |
"\\&\n" |
| 1586 |
" /* Create an attributes object and add a \"set signal mask\"\n" |
| 1587 |
" action to it. */\n" |
| 1588 |
"\\&\n" |
| 1589 |
" s = posix_spawnattr_init(&attr);\n" |
| 1590 |
" if (s != 0)\n" |
| 1591 |
" errExitEN(s, \"posix_spawnattr_init\");\n" |
| 1592 |
" s = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK);\n" |
| 1593 |
" if (s != 0)\n" |
| 1594 |
" errExitEN(s, \"posix_spawnattr_setflags\");\n" |
| 1595 |
"\\&\n" |
| 1596 |
" sigfillset(&mask);\n" |
| 1597 |
" s = posix_spawnattr_setsigmask(&attr, &mask);\n" |
| 1598 |
" if (s != 0)\n" |
| 1599 |
" errExitEN(s, \"posix_spawnattr_setsigmask\");\n" |
| 1600 |
"\\&\n" |
| 1601 |
" attrp = &attr;\n" |
| 1602 |
" break;\n" |
| 1603 |
" }\n" |
| 1604 |
" }\n" |
| 1605 |
"\\&\n" |
| 1606 |
" /* Spawn the child. The name of the program to execute and the\n" |
| 1607 |
" command-line arguments are taken from the command-line arguments\n" |
| 1608 |
" of this program. The environment of the program execed in the\n" |
| 1609 |
" child is made the same as the parent\\[aq]s environment. */\n" |
| 1610 |
"\\&\n" |
| 1611 |
" s = posix_spawnp(&child_pid, argv[optind], file_actionsp, attrp,\n" |
| 1612 |
" &argv[optind], environ);\n" |
| 1613 |
" if (s != 0)\n" |
| 1614 |
" errExitEN(s, \"posix_spawn\");\n" |
| 1615 |
"\\&\n" |
| 1616 |
" /* Destroy any objects that we created earlier. */\n" |
| 1617 |
"\\&\n" |
| 1618 |
" if (attrp != NULL) {\n" |
| 1619 |
" s = posix_spawnattr_destroy(attrp);\n" |
| 1620 |
" if (s != 0)\n" |
| 1621 |
" errExitEN(s, \"posix_spawnattr_destroy\");\n" |
| 1622 |
" }\n" |
| 1623 |
"\\&\n" |
| 1624 |
" if (file_actionsp != NULL) {\n" |
| 1625 |
" s = posix_spawn_file_actions_destroy(file_actionsp);\n" |
| 1626 |
" if (s != 0)\n" |
| 1627 |
" errExitEN(s, \"posix_spawn_file_actions_destroy\");\n" |
| 1628 |
" }\n" |
| 1629 |
"\\&\n" |
| 1630 |
" printf(\"PID of child: %jd\\[rs]n\", (intmax_t) child_pid);\n" |
| 1631 |
"\\&\n" |
| 1632 |
" /* Monitor status of the child until it terminates. */\n" |
| 1633 |
"\\&\n" |
| 1634 |
" do {\n" |
| 1635 |
" s = waitpid(child_pid, &status, WUNTRACED | WCONTINUED);\n" |
| 1636 |
" if (s == -1)\n" |
| 1637 |
" errExit(\"waitpid\");\n" |
| 1638 |
"\\&\n" |
| 1639 |
" printf(\"Child status: \");\n" |
| 1640 |
" if (WIFEXITED(status)) {\n" |
| 1641 |
" printf(\"exited, status=%d\\[rs]n\", WEXITSTATUS(status));\n" |
| 1642 |
" } else if (WIFSIGNALED(status)) {\n" |
| 1643 |
" printf(\"killed by signal %d\\[rs]n\", WTERMSIG(status));\n" |
| 1644 |
" } else if (WIFSTOPPED(status)) {\n" |
| 1645 |
" printf(\"stopped by signal %d\\[rs]n\", WSTOPSIG(status));\n" |
| 1646 |
" } else if (WIFCONTINUED(status)) {\n" |
| 1647 |
" printf(\"continued\\[rs]n\");\n" |
| 1648 |
" }\n" |
| 1649 |
" } while (!WIFEXITED(status) && !WIFSIGNALED(status));\n" |
| 1650 |
"\\&\n" |
| 1651 |
" exit(EXIT_SUCCESS);\n" |
| 1652 |
"}\n" |
| 1653 |
msgstr "" |
| 1654 |
|
| 1655 |
#. type: TH |
| 1656 |
#: fedora-44 fedora-rawhide |
| 1657 |
#, no-wrap |
| 1658 |
msgid "2024-07-23" |
| 1659 |
msgstr "23 июля 2024 г." |
| 1660 |
|
| 1661 |
#. type: TH |
| 1662 |
#: fedora-44 fedora-rawhide |
| 1663 |
#, no-wrap |
| 1664 |
msgid "Linux man-pages 6.13" |
| 1665 |
msgstr "Страницы руководства Linux 6.13" |
| 1666 |
|
| 1667 |
#. type: TH |
| 1668 |
#: mageia-cauldron |
| 1669 |
#, no-wrap |
| 1670 |
msgid "Linux man-pages 6.17" |
| 1671 |
msgstr "Страницы руководства Linux 6.17" |
| 1672 |
|
| 1673 |
#. type: TH |
| 1674 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1675 |
#, no-wrap |
| 1676 |
msgid "Linux man-pages (unreleased)" |
| 1677 |
msgstr "Страницы руководства Linux (не выпущены)" |