| 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 |
# Azamat Hackimov <[email protected]>, 2014. |
| 5 |
# Dmitriy S. Seregin <[email protected]>, 2013. |
| 6 |
# Dmitry Bolkhovskikh <[email protected]>, 2017. |
| 7 |
# Katrin Kutepova <[email protected]>, 2018. |
| 8 |
# Yuri Kozlov <[email protected]>, 2011-2019. |
| 9 |
# Иван Павлов <[email protected]>, 2017. |
| 10 |
msgid "" |
| 11 |
msgstr "" |
| 12 |
"Project-Id-Version: manpages-l10n\n" |
| 13 |
"POT-Creation-Date: 2026-06-05 06:20+0200\n" |
| 14 |
"PO-Revision-Date: 2024-12-21 19:49+0300\n" |
| 15 |
"Last-Translator: Yuri Kozlov <[email protected]>\n" |
| 16 |
"Language-Team: Russian <[email protected]>\n" |
| 17 |
"Language: ru\n" |
| 18 |
"MIME-Version: 1.0\n" |
| 19 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 20 |
"Content-Transfer-Encoding: 8bit\n" |
| 21 |
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " |
| 22 |
"n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || " |
| 23 |
"(n%100>=11 && n%100<=14)? 2 : 3);\n" |
| 24 |
"X-Generator: Lokalize 2.0\n" |
| 25 |
|
| 26 |
#. type: TH |
| 27 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 28 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 29 |
#, no-wrap |
| 30 |
msgid "close_range" |
| 31 |
msgstr "close_range" |
| 32 |
|
| 33 |
#. type: TH |
| 34 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 35 |
#: opensuse-tumbleweed |
| 36 |
#, no-wrap |
| 37 |
msgid "2026-02-08" |
| 38 |
msgstr "8 февраля 2026 г." |
| 39 |
|
| 40 |
#. type: TH |
| 41 |
#: archlinux debian-unstable |
| 42 |
#, fuzzy, no-wrap |
| 43 |
#| msgid "Linux man-pages 6.17" |
| 44 |
msgid "Linux man-pages 6.18" |
| 45 |
msgstr "Справочные страницы Linux 6.17" |
| 46 |
|
| 47 |
#. type: SH |
| 48 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 49 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 50 |
#, no-wrap |
| 51 |
msgid "NAME" |
| 52 |
msgstr "НАИМЕНОВАНИЕ" |
| 53 |
|
| 54 |
#. type: Plain text |
| 55 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 56 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 57 |
msgid "close_range - close all file descriptors in a given range" |
| 58 |
msgstr "close_range - закрыть все файловые дескрипторы в указанном диапазоне" |
| 59 |
|
| 60 |
#. type: SH |
| 61 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 62 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 63 |
#, no-wrap |
| 64 |
msgid "LIBRARY" |
| 65 |
msgstr "БИБЛИОТЕКА" |
| 66 |
|
| 67 |
#. type: Plain text |
| 68 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 69 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 70 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 71 |
msgstr "Стандартная библиотека языка C (I<libc>,\\ I<-lc>)" |
| 72 |
|
| 73 |
#. type: SH |
| 74 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 75 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 76 |
#, no-wrap |
| 77 |
msgid "SYNOPSIS" |
| 78 |
msgstr "СИНТАКСИС" |
| 79 |
|
| 80 |
#. type: Plain text |
| 81 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 82 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 83 |
#, no-wrap |
| 84 |
msgid "" |
| 85 |
"B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n" |
| 86 |
"B<#include E<lt>unistd.hE<gt>>\n" |
| 87 |
msgstr "" |
| 88 |
"B<#define _GNU_SOURCE> /* см. feature_test_macros(7) */\n" |
| 89 |
"B<#include E<lt>unistd.hE<gt>>\n" |
| 90 |
|
| 91 |
#. type: Plain text |
| 92 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 93 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 94 |
#, no-wrap |
| 95 |
msgid "" |
| 96 |
"B<#include E<lt>linux/close_range.hE<gt>> /* Definition of B<CLOSE_RANGE_*>\n" |
| 97 |
" constants */\n" |
| 98 |
msgstr "" |
| 99 |
"B<#include E<lt>linux/close_range.hE<gt>> /* Definition of B<CLOSE_RANGE_*>\n" |
| 100 |
" constants */\n" |
| 101 |
|
| 102 |
#. type: Plain text |
| 103 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 104 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 105 |
#, no-wrap |
| 106 |
msgid "B<int close_range(unsigned int >I<first>B<, unsigned int >I<last>B<, int >I<flags>B<);>\n" |
| 107 |
msgstr "B<int close_range(unsigned int >I<first>B<, unsigned int >I<last>B<, int >I<flags>B<);>\n" |
| 108 |
|
| 109 |
#. type: SH |
| 110 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 111 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 112 |
#, no-wrap |
| 113 |
msgid "DESCRIPTION" |
| 114 |
msgstr "ОПИСАНИЕ" |
| 115 |
|
| 116 |
#. type: Plain text |
| 117 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 118 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 119 |
msgid "" |
| 120 |
"The B<close_range>() system call closes all open file descriptors from " |
| 121 |
"I<first> to I<last> (included)." |
| 122 |
msgstr "" |
| 123 |
"Системный вызов B<close_range>() закрывает все открытые файловые дескрипторы " |
| 124 |
"от I<first> до I<last> (включительно)." |
| 125 |
|
| 126 |
#. type: Plain text |
| 127 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 128 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 129 |
msgid "Errors closing a given file descriptor are currently ignored." |
| 130 |
msgstr "" |
| 131 |
"Ошибки закрытия указанного файлового дескриптора в настоящее время " |
| 132 |
"игнорируются." |
| 133 |
|
| 134 |
#. type: Plain text |
| 135 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 136 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 137 |
msgid "I<flags> is a bit mask containing 0 or more of the following:" |
| 138 |
msgstr "I<flags> - это битовая маска, содержащая 0 или более из следующих:" |
| 139 |
|
| 140 |
#. type: TP |
| 141 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 142 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 143 |
#, no-wrap |
| 144 |
msgid "B<CLOSE_RANGE_CLOEXEC> (since Linux 5.11)" |
| 145 |
msgstr "B<CLOSE_RANGE_CLOEXEC> (начиная с Linux 5.11)" |
| 146 |
|
| 147 |
#. type: Plain text |
| 148 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 149 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 150 |
msgid "" |
| 151 |
"Set the close-on-exec flag on the specified file descriptors, rather than " |
| 152 |
"immediately closing them." |
| 153 |
msgstr "" |
| 154 |
"Установить флаг close-on-exec для указанных файловых дескрипторов, вместо " |
| 155 |
"того, чтобы немедленно их закрыть." |
| 156 |
|
| 157 |
#. type: TP |
| 158 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 159 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 160 |
#, no-wrap |
| 161 |
msgid "B<CLOSE_RANGE_UNSHARE>" |
| 162 |
msgstr "B<CLOSE_RANGE_UNSHARE>" |
| 163 |
|
| 164 |
#. type: Plain text |
| 165 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 166 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 167 |
msgid "" |
| 168 |
"Unshare the specified file descriptors from any other processes before " |
| 169 |
"closing them, avoiding races with other threads sharing the file descriptor " |
| 170 |
"table." |
| 171 |
msgstr "" |
| 172 |
|
| 173 |
#. type: SH |
| 174 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 175 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 176 |
#, no-wrap |
| 177 |
msgid "RETURN VALUE" |
| 178 |
msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" |
| 179 |
|
| 180 |
#. type: Plain text |
| 181 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 182 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 183 |
msgid "" |
| 184 |
"On success, B<close_range>() returns 0. On error, -1 is returned and " |
| 185 |
"I<errno> is set to indicate the error." |
| 186 |
msgstr "" |
| 187 |
"В случае успеха B<close_range>() возвращает 0. В случае ошибки возвращается " |
| 188 |
"-1 и I<errno> устанавливается для указания ошибки." |
| 189 |
|
| 190 |
#. type: SH |
| 191 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 192 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 193 |
#, no-wrap |
| 194 |
msgid "ERRORS" |
| 195 |
msgstr "ОШИБКИ" |
| 196 |
|
| 197 |
#. type: TP |
| 198 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 199 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 200 |
#, no-wrap |
| 201 |
msgid "B<EINVAL>" |
| 202 |
msgstr "B<EINVAL>" |
| 203 |
|
| 204 |
#. type: Plain text |
| 205 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 206 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 207 |
msgid "I<flags> is not valid, or I<first> is greater than I<last>." |
| 208 |
msgstr "I<flags> недействителен, или I<first> больше, чем I<last>." |
| 209 |
|
| 210 |
#. type: Plain text |
| 211 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 212 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 213 |
msgid "" |
| 214 |
"The following can occur with B<CLOSE_RANGE_UNSHARE> (when constructing the " |
| 215 |
"new descriptor table):" |
| 216 |
msgstr "" |
| 217 |
"Следующее может произойти с B<CLOSE_RANGE_UNSHARE> (при построении новой " |
| 218 |
"таблицы дескрипторов):" |
| 219 |
|
| 220 |
#. type: TP |
| 221 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 222 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 223 |
#, no-wrap |
| 224 |
msgid "B<EMFILE>" |
| 225 |
msgstr "B<EMFILE>" |
| 226 |
|
| 227 |
#. type: Plain text |
| 228 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 229 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 230 |
msgid "" |
| 231 |
"The number of open file descriptors exceeds the limit specified in I</proc/" |
| 232 |
"sys/fs/nr_open> (see B<proc>(5)). This error can occur in situations where " |
| 233 |
"that limit was lowered before a call to B<close_range>() where the " |
| 234 |
"B<CLOSE_RANGE_UNSHARE> flag is specified." |
| 235 |
msgstr "" |
| 236 |
|
| 237 |
#. type: TP |
| 238 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 239 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 240 |
#, no-wrap |
| 241 |
msgid "B<ENOMEM>" |
| 242 |
msgstr "B<ENOMEM>" |
| 243 |
|
| 244 |
#. type: Plain text |
| 245 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 246 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 247 |
msgid "Insufficient kernel memory was available." |
| 248 |
msgstr "Недостаточное количество памяти ядра." |
| 249 |
|
| 250 |
#. type: SH |
| 251 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 252 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 253 |
#, no-wrap |
| 254 |
msgid "STANDARDS" |
| 255 |
msgstr "СТАНДАРТЫ" |
| 256 |
|
| 257 |
#. type: Plain text |
| 258 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 259 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 260 |
msgid "None." |
| 261 |
msgstr "Отсутствуют." |
| 262 |
|
| 263 |
#. type: SH |
| 264 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 265 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 266 |
#, no-wrap |
| 267 |
msgid "HISTORY" |
| 268 |
msgstr "ИСТОРИЯ" |
| 269 |
|
| 270 |
#. type: Plain text |
| 271 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 272 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 273 |
msgid "FreeBSD. Linux 5.9, glibc 2.34." |
| 274 |
msgstr "FreeBSD. Linux 5.9, glibc 2.34." |
| 275 |
|
| 276 |
#. type: SH |
| 277 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 278 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 279 |
#, no-wrap |
| 280 |
msgid "NOTES" |
| 281 |
msgstr "ПРИМЕЧАНИЯ" |
| 282 |
|
| 283 |
#. type: SS |
| 284 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 285 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 286 |
#, no-wrap |
| 287 |
msgid "Closing all open file descriptors" |
| 288 |
msgstr "Закрытие всех открытых файловых дескрипторов" |
| 289 |
|
| 290 |
#. 278a5fbaed89dacd04e9d052f4594ffd0e0585de |
| 291 |
#. type: Plain text |
| 292 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 293 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 294 |
msgid "" |
| 295 |
"To avoid blindly closing file descriptors in the range of possible file " |
| 296 |
"descriptors, this is sometimes implemented (on Linux) by listing open file " |
| 297 |
"descriptors in I</proc/self/fd/> and calling B<close>(2) on each one. " |
| 298 |
"B<close_range>() can take care of this without requiring I</proc> and " |
| 299 |
"within a single system call, which provides significant performance benefits." |
| 300 |
msgstr "" |
| 301 |
|
| 302 |
#. type: SS |
| 303 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 304 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 305 |
#, no-wrap |
| 306 |
msgid "Closing file descriptors before exec" |
| 307 |
msgstr "Закрытие дескрипторов файлов перед выполнением" |
| 308 |
|
| 309 |
#. 60997c3d45d9a67daf01c56d805ae4fec37e0bd8 |
| 310 |
#. type: Plain text |
| 311 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 312 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 313 |
msgid "File descriptors can be closed safely using" |
| 314 |
msgstr "Дескрипторы файлов можно безопасно закрыть с помощью" |
| 315 |
|
| 316 |
#. type: Plain text |
| 317 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 318 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 319 |
#, no-wrap |
| 320 |
msgid "" |
| 321 |
"/* we don't want anything past stderr here */\n" |
| 322 |
"close_range(3, \\[ti]0U, CLOSE_RANGE_UNSHARE);\n" |
| 323 |
"execve(....);\n" |
| 324 |
msgstr "" |
| 325 |
"/* нам не нужно ничего после stderr */\n" |
| 326 |
"close_range(3, \\[ti]0U, CLOSE_RANGE_UNSHARE);\n" |
| 327 |
"execve(....);\n" |
| 328 |
|
| 329 |
#. type: Plain text |
| 330 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 331 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 332 |
msgid "B<CLOSE_RANGE_UNSHARE> is conceptually equivalent to" |
| 333 |
msgstr "B<CLOSE_RANGE_UNSHARE> концептуально эквивалентен" |
| 334 |
|
| 335 |
#. type: Plain text |
| 336 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 337 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 338 |
#, no-wrap |
| 339 |
msgid "" |
| 340 |
"unshare(CLONE_FILES);\n" |
| 341 |
"close_range(first, last, 0);\n" |
| 342 |
msgstr "" |
| 343 |
"unshare(CLONE_FILES);\n" |
| 344 |
"close_range(first, last, 0);\n" |
| 345 |
|
| 346 |
#. type: Plain text |
| 347 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 348 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 349 |
msgid "" |
| 350 |
"but can be more efficient: if the unshared range extends past the current " |
| 351 |
"maximum number of file descriptors allocated in the caller's file descriptor " |
| 352 |
"table (the common case when I<last> is \\[ti]0U), the kernel will unshare a " |
| 353 |
"new file descriptor table for the caller up to I<first>, copying as few file " |
| 354 |
"descriptors as possible. This avoids subsequent B<close>(2) calls " |
| 355 |
"entirely; the whole operation is complete once the table is unshared." |
| 356 |
msgstr "" |
| 357 |
|
| 358 |
#. type: SS |
| 359 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 360 |
#: opensuse-tumbleweed |
| 361 |
#, fuzzy, no-wrap |
| 362 |
#| msgid "Closing files on exec" |
| 363 |
msgid "Closing files on \\f[I]exec\\fB" |
| 364 |
msgstr "Закрытие файлов при выполнении" |
| 365 |
|
| 366 |
#. 582f1fb6b721facf04848d2ca57f34468da1813e |
| 367 |
#. type: Plain text |
| 368 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 369 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 370 |
msgid "" |
| 371 |
"This is particularly useful in cases where multiple pre-B<exec> setup steps " |
| 372 |
"risk conflicting with each other. For example, setting up a B<seccomp>(2) " |
| 373 |
"profile can conflict with a B<close_range>() call: if the file descriptors " |
| 374 |
"are closed before the B<seccomp>(2) profile is set up, the profile setup " |
| 375 |
"can't use them itself, or control their closure; if the file descriptors are " |
| 376 |
"closed afterwards, the seccomp profile can't block the B<close_range>() " |
| 377 |
"call or any fallbacks. Using B<CLOSE_RANGE_CLOEXEC> avoids this: the " |
| 378 |
"descriptors can be marked before the B<seccomp>(2) profile is set up, and " |
| 379 |
"the profile can control access to B<close_range>() without affecting the " |
| 380 |
"calling process." |
| 381 |
msgstr "" |
| 382 |
|
| 383 |
#. type: SH |
| 384 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 385 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 386 |
#, no-wrap |
| 387 |
msgid "EXAMPLES" |
| 388 |
msgstr "ПРИМЕРЫ" |
| 389 |
|
| 390 |
#. type: Plain text |
| 391 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 392 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 393 |
msgid "" |
| 394 |
"The program shown below opens the files named in its command-line arguments, " |
| 395 |
"displays the list of files that it has opened (by iterating through the " |
| 396 |
"entries in I</proc/PID/fd>), uses B<close_range>() to close all file " |
| 397 |
"descriptors greater than or equal to 3, and then once more displays the " |
| 398 |
"process's list of open files. The following example demonstrates the use of " |
| 399 |
"the program:" |
| 400 |
msgstr "" |
| 401 |
|
| 402 |
#. type: Plain text |
| 403 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 404 |
#: opensuse-tumbleweed |
| 405 |
#, fuzzy, no-wrap |
| 406 |
#| msgid "" |
| 407 |
#| "$ B<touch /tmp/a /tmp/b /tmp/c>\n" |
| 408 |
#| "$ B<./a.out /tmp/a /tmp/b /tmp/c>\n" |
| 409 |
#| "/tmp/a opened as FD 3\n" |
| 410 |
#| "/tmp/b opened as FD 4\n" |
| 411 |
#| "/tmp/c opened as FD 5\n" |
| 412 |
#| "/proc/self/fd/0 ==E<gt> /dev/pts/1\n" |
| 413 |
#| "/proc/self/fd/1 ==E<gt> /dev/pts/1\n" |
| 414 |
#| "/proc/self/fd/2 ==E<gt> /dev/pts/1\n" |
| 415 |
#| "/proc/self/fd/3 ==E<gt> /tmp/a\n" |
| 416 |
#| "/proc/self/fd/4 ==E<gt> /tmp/b\n" |
| 417 |
#| "/proc/self/fd/5 ==E<gt> /tmp/b\n" |
| 418 |
#| "/proc/self/fd/6 ==E<gt> /proc/9005/fd\n" |
| 419 |
#| "========= About to call close_range() =======\n" |
| 420 |
#| "/proc/self/fd/0 ==E<gt> /dev/pts/1\n" |
| 421 |
#| "/proc/self/fd/1 ==E<gt> /dev/pts/1\n" |
| 422 |
#| "/proc/self/fd/2 ==E<gt> /dev/pts/1\n" |
| 423 |
#| "/proc/self/fd/3 ==E<gt> /proc/9005/fd\n" |
| 424 |
msgid "" |
| 425 |
"$B< touch /tmp/a /tmp/b /tmp/c>;\n" |
| 426 |
"$B< ./a.out /tmp/a /tmp/b /tmp/c>;\n" |
| 427 |
"/tmp/a opened as FD 3\n" |
| 428 |
"/tmp/b opened as FD 4\n" |
| 429 |
"/tmp/c opened as FD 5\n" |
| 430 |
"/proc/self/fd/0 ==E<gt> /dev/pts/1\n" |
| 431 |
"/proc/self/fd/1 ==E<gt> /dev/pts/1\n" |
| 432 |
"/proc/self/fd/2 ==E<gt> /dev/pts/1\n" |
| 433 |
"/proc/self/fd/3 ==E<gt> /tmp/a\n" |
| 434 |
"/proc/self/fd/4 ==E<gt> /tmp/b\n" |
| 435 |
"/proc/self/fd/5 ==E<gt> /tmp/c\n" |
| 436 |
"/proc/self/fd/6 ==E<gt> /proc/9005/fd\n" |
| 437 |
"========= About to call close_range() =======\n" |
| 438 |
"/proc/self/fd/0 ==E<gt> /dev/pts/1\n" |
| 439 |
"/proc/self/fd/1 ==E<gt> /dev/pts/1\n" |
| 440 |
"/proc/self/fd/2 ==E<gt> /dev/pts/1\n" |
| 441 |
"/proc/self/fd/3 ==E<gt> /proc/9005/fd\n" |
| 442 |
msgstr "" |
| 443 |
"$ B<touch /tmp/a /tmp/b /tmp/c>\n" |
| 444 |
"$ B<./a.out /tmp/a /tmp/b /tmp/c>\n" |
| 445 |
"/tmp/a opened as FD 3\n" |
| 446 |
"/tmp/b opened as FD 4\n" |
| 447 |
"/tmp/c opened as FD 5\n" |
| 448 |
"/proc/self/fd/0 ==E<gt> /dev/pts/1\n" |
| 449 |
"/proc/self/fd/1 ==E<gt> /dev/pts/1\n" |
| 450 |
"/proc/self/fd/2 ==E<gt> /dev/pts/1\n" |
| 451 |
"/proc/self/fd/3 ==E<gt> /tmp/a\n" |
| 452 |
"/proc/self/fd/4 ==E<gt> /tmp/b\n" |
| 453 |
"/proc/self/fd/5 ==E<gt> /tmp/b\n" |
| 454 |
"/proc/self/fd/6 ==E<gt> /proc/9005/fd\n" |
| 455 |
"========= About to call close_range() =======\n" |
| 456 |
"/proc/self/fd/0 ==E<gt> /dev/pts/1\n" |
| 457 |
"/proc/self/fd/1 ==E<gt> /dev/pts/1\n" |
| 458 |
"/proc/self/fd/2 ==E<gt> /dev/pts/1\n" |
| 459 |
"/proc/self/fd/3 ==E<gt> /proc/9005/fd\n" |
| 460 |
|
| 461 |
#. type: Plain text |
| 462 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 463 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 464 |
msgid "" |
| 465 |
"Note that the lines showing the pathname I</proc/9005/fd> result from the " |
| 466 |
"calls to B<opendir>(3)." |
| 467 |
msgstr "" |
| 468 |
"Обратите внимание, что строки, показывающие имя пути I</proc/9005/fd>, " |
| 469 |
"являются результатом вызовов B<opendir>(3)." |
| 470 |
|
| 471 |
#. type: SS |
| 472 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 473 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 474 |
#, no-wrap |
| 475 |
msgid "Program source" |
| 476 |
msgstr "Исходный код программы" |
| 477 |
|
| 478 |
#. type: Plain text |
| 479 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 480 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 481 |
#, no-wrap |
| 482 |
msgid "" |
| 483 |
"#define _GNU_SOURCE\n" |
| 484 |
"#include E<lt>dirent.hE<gt>\n" |
| 485 |
"#include E<lt>fcntl.hE<gt>\n" |
| 486 |
"#include E<lt>limits.hE<gt>\n" |
| 487 |
"#include E<lt>stdio.hE<gt>\n" |
| 488 |
"#include E<lt>stdlib.hE<gt>\n" |
| 489 |
"#include E<lt>sys/types.hE<gt>\n" |
| 490 |
"#include E<lt>unistd.hE<gt>\n" |
| 491 |
"\\&\n" |
| 492 |
"/* Show the contents of the symbolic links in /proc/self/fd */\n" |
| 493 |
"\\&\n" |
| 494 |
"static void\n" |
| 495 |
"show_fds(void)\n" |
| 496 |
"{\n" |
| 497 |
" DIR *dirp;\n" |
| 498 |
" char path[PATH_MAX], target[PATH_MAX];\n" |
| 499 |
" ssize_t len;\n" |
| 500 |
" struct dirent *dp;\n" |
| 501 |
"\\&\n" |
| 502 |
" dirp = opendir(\"/proc/self/fd\");\n" |
| 503 |
" if (dirp == NULL) {\n" |
| 504 |
" perror(\"opendir\");\n" |
| 505 |
" exit(EXIT_FAILURE);\n" |
| 506 |
" }\n" |
| 507 |
"\\&\n" |
| 508 |
" for (;;) {\n" |
| 509 |
" dp = readdir(dirp);\n" |
| 510 |
" if (dp == NULL)\n" |
| 511 |
" break;\n" |
| 512 |
"\\&\n" |
| 513 |
" if (dp-E<gt>d_type == DT_LNK) {\n" |
| 514 |
" snprintf(path, sizeof(path), \"/proc/self/fd/%s\",\n" |
| 515 |
" dp-E<gt>d_name);\n" |
| 516 |
"\\&\n" |
| 517 |
" len = readlink(path, target, sizeof(target));\n" |
| 518 |
" printf(\"%s ==E<gt> %.*s\\[rs]n\", path, (int) len, target);\n" |
| 519 |
" }\n" |
| 520 |
" }\n" |
| 521 |
"\\&\n" |
| 522 |
" closedir(dirp);\n" |
| 523 |
"}\n" |
| 524 |
"\\&\n" |
| 525 |
"int\n" |
| 526 |
"main(int argc, char *argv[])\n" |
| 527 |
"{\n" |
| 528 |
" int fd;\n" |
| 529 |
"\\&\n" |
| 530 |
" for (size_t j = 1; j E<lt> argc; j++) {\n" |
| 531 |
" fd = open(argv[j], O_RDONLY);\n" |
| 532 |
" if (fd == -1) {\n" |
| 533 |
" perror(argv[j]);\n" |
| 534 |
" exit(EXIT_FAILURE);\n" |
| 535 |
" }\n" |
| 536 |
" printf(\"%s opened as FD %d\\[rs]n\", argv[j], fd);\n" |
| 537 |
" }\n" |
| 538 |
"\\&\n" |
| 539 |
" show_fds();\n" |
| 540 |
"\\&\n" |
| 541 |
" printf(\"========= About to call close_range() =======\\[rs]n\");\n" |
| 542 |
"\\&\n" |
| 543 |
" if (close_range(3, \\[ti]0U, 0) == -1) {\n" |
| 544 |
" perror(\"close_range\");\n" |
| 545 |
" exit(EXIT_FAILURE);\n" |
| 546 |
" }\n" |
| 547 |
"\\&\n" |
| 548 |
" show_fds();\n" |
| 549 |
" exit(EXIT_FAILURE);\n" |
| 550 |
"}\n" |
| 551 |
msgstr "" |
| 552 |
|
| 553 |
#. SRC END |
| 554 |
#. type: SH |
| 555 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 556 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 557 |
#, no-wrap |
| 558 |
msgid "SEE ALSO" |
| 559 |
msgstr "СМОТРИТЕ ТАКЖЕ" |
| 560 |
|
| 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 "B<close>(2)" |
| 565 |
msgstr "B<close>(2)" |
| 566 |
|
| 567 |
#. type: TH |
| 568 |
#: debian-trixie |
| 569 |
#, no-wrap |
| 570 |
msgid "2024-06-15" |
| 571 |
msgstr "15 июня 2024 г." |
| 572 |
|
| 573 |
#. type: TH |
| 574 |
#: debian-trixie |
| 575 |
#, no-wrap |
| 576 |
msgid "Linux man-pages 6.9.1" |
| 577 |
msgstr "Страницы руководства Linux 6.9.1" |
| 578 |
|
| 579 |
#. type: Plain text |
| 580 |
#: debian-trixie |
| 581 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 582 |
msgstr "Стандартная библиотека языка C (I<libc>, I<-lc>)" |
| 583 |
|
| 584 |
#. type: SS |
| 585 |
#: debian-trixie fedora-44 fedora-rawhide |
| 586 |
#, no-wrap |
| 587 |
msgid "Closing files on exec" |
| 588 |
msgstr "Закрытие файлов при выполнении" |
| 589 |
|
| 590 |
#. type: Plain text |
| 591 |
#: debian-trixie fedora-44 fedora-rawhide |
| 592 |
#, no-wrap |
| 593 |
msgid "" |
| 594 |
"$ B<touch /tmp/a /tmp/b /tmp/c>\n" |
| 595 |
"$ B<./a.out /tmp/a /tmp/b /tmp/c>\n" |
| 596 |
"/tmp/a opened as FD 3\n" |
| 597 |
"/tmp/b opened as FD 4\n" |
| 598 |
"/tmp/c opened as FD 5\n" |
| 599 |
"/proc/self/fd/0 ==E<gt> /dev/pts/1\n" |
| 600 |
"/proc/self/fd/1 ==E<gt> /dev/pts/1\n" |
| 601 |
"/proc/self/fd/2 ==E<gt> /dev/pts/1\n" |
| 602 |
"/proc/self/fd/3 ==E<gt> /tmp/a\n" |
| 603 |
"/proc/self/fd/4 ==E<gt> /tmp/b\n" |
| 604 |
"/proc/self/fd/5 ==E<gt> /tmp/b\n" |
| 605 |
"/proc/self/fd/6 ==E<gt> /proc/9005/fd\n" |
| 606 |
"========= About to call close_range() =======\n" |
| 607 |
"/proc/self/fd/0 ==E<gt> /dev/pts/1\n" |
| 608 |
"/proc/self/fd/1 ==E<gt> /dev/pts/1\n" |
| 609 |
"/proc/self/fd/2 ==E<gt> /dev/pts/1\n" |
| 610 |
"/proc/self/fd/3 ==E<gt> /proc/9005/fd\n" |
| 611 |
msgstr "" |
| 612 |
"$ B<touch /tmp/a /tmp/b /tmp/c>\n" |
| 613 |
"$ B<./a.out /tmp/a /tmp/b /tmp/c>\n" |
| 614 |
"/tmp/a opened as FD 3\n" |
| 615 |
"/tmp/b opened as FD 4\n" |
| 616 |
"/tmp/c opened as FD 5\n" |
| 617 |
"/proc/self/fd/0 ==E<gt> /dev/pts/1\n" |
| 618 |
"/proc/self/fd/1 ==E<gt> /dev/pts/1\n" |
| 619 |
"/proc/self/fd/2 ==E<gt> /dev/pts/1\n" |
| 620 |
"/proc/self/fd/3 ==E<gt> /tmp/a\n" |
| 621 |
"/proc/self/fd/4 ==E<gt> /tmp/b\n" |
| 622 |
"/proc/self/fd/5 ==E<gt> /tmp/b\n" |
| 623 |
"/proc/self/fd/6 ==E<gt> /proc/9005/fd\n" |
| 624 |
"========= About to call close_range() =======\n" |
| 625 |
"/proc/self/fd/0 ==E<gt> /dev/pts/1\n" |
| 626 |
"/proc/self/fd/1 ==E<gt> /dev/pts/1\n" |
| 627 |
"/proc/self/fd/2 ==E<gt> /dev/pts/1\n" |
| 628 |
"/proc/self/fd/3 ==E<gt> /proc/9005/fd\n" |
| 629 |
|
| 630 |
#. type: TH |
| 631 |
#: fedora-44 fedora-rawhide |
| 632 |
#, no-wrap |
| 633 |
msgid "2024-07-23" |
| 634 |
msgstr "23 июля 2024 г." |
| 635 |
|
| 636 |
#. type: TH |
| 637 |
#: fedora-44 fedora-rawhide |
| 638 |
#, no-wrap |
| 639 |
msgid "Linux man-pages 6.13" |
| 640 |
msgstr "Страницы руководства Linux 6.13" |
| 641 |
|
| 642 |
#. type: TH |
| 643 |
#: mageia-cauldron |
| 644 |
#, no-wrap |
| 645 |
msgid "Linux man-pages 6.17" |
| 646 |
msgstr "Страницы руководства Linux 6.17" |
| 647 |
|
| 648 |
#. type: TH |
| 649 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 650 |
#, no-wrap |
| 651 |
msgid "Linux man-pages (unreleased)" |
| 652 |
msgstr "Страницы руководства Linux (не выпущены)" |