# Russian translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # Azamat Hackimov , 2014. # Dmitriy S. Seregin , 2013. # Dmitry Bolkhovskikh , 2017. # Katrin Kutepova , 2018. # Yuri Kozlov , 2011-2019. # Иван Павлов , 2017. msgid "" msgstr "" "Project-Id-Version: manpages-l10n\n" "POT-Creation-Date: 2024-06-01 05:45+0200\n" "PO-Revision-Date: 2019-10-05 07:56+0300\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" "%100>=11 && n%100<=14)? 2 : 3);\n" "X-Generator: Lokalize 2.0\n" #. type: TH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "close_range" msgstr "close_range" #. type: TH #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "2024-05-02" msgstr "2 мая 2024 г." #. type: TH #: archlinux debian-unstable #, fuzzy, no-wrap #| msgid "Linux man-pages 6.7" msgid "Linux man-pages 6.8" msgstr "Linux man-pages 6.7" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "ИМЯ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "close - close a file descriptor" msgid "close_range - close all file descriptors in a given range" msgstr "close - закрывает файловый дескриптор" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Standard C library (I, I<-lc>)" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "СИНТАКСИС" #. type: Plain text #: archlinux debian-unstable fedora-rawhide opensuse-tumbleweed #, no-wrap msgid "" "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n" "B<#include Eunistd.hE>\n" msgstr "" "B<#define _GNU_SOURCE> /* см. feature_test_macros(7) */\n" "B<#include Eunistd.hE>\n" #. type: Plain text #: archlinux debian-unstable fedora-rawhide opensuse-tumbleweed #, no-wrap msgid "" "B<#include Elinux/close_range.hE> /* Definition of B\n" " constants */\n" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-rawhide opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "BIB<, unsigned int >IB<,>\n" #| "B< unsigned int >IB<);>\n" msgid "BIB<, unsigned int >IB<, int >IB<);>\n" msgstr "" "BIB<, unsigned int >IB<,>\n" "B< unsigned int >IB<);>\n" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "ОПИСАНИЕ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B() system call closes all open file descriptors from " "I to I (included)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "One or more file descriptors are not valid." msgid "Errors closing a given file descriptor are currently ignored." msgstr "Один или оба файловых дескриптора недействительны." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The I argument is a bit mask created by ORing together 0 or more " #| "of the following values;" msgid "I is a bit mask containing 0 or more of the following:" msgstr "" "Аргумент I представляет собой битовую маску, создаваемую побитовым " "сложением (OR) следующих значений;" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 5.11)" msgstr "B (начиная с Linux 5.11)" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Set the close-on-exec flag on the specified file descriptors, rather than " "immediately closing them." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Unshare the specified file descriptors from any other processes before " "closing them, avoiding races with other threads sharing the file descriptor " "table." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "On error, B() returns -1 and I is set to " #| "indicate the error." msgid "" "On success, B() returns 0. On error, -1 is returned and " "I is set to indicate the error." msgstr "" "В случае ошибки B() возвращает -1, а I " "устанавливается в соответствующее значение." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "ERRORS" msgstr "ОШИБКИ" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I is not valid, or I is greater than I." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The following can occur with B (when constructing the " "new descriptor table):" msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The number of open file descriptors exceeds the limit specified in I (see B(5)). This error can occur in situations where " "that limit was lowered before a call to B() where the " "B flag is specified." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Insufficient kernel memory was available." msgstr "Недостаточное количество памяти ядра." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "СТАНДАРТЫ" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "None" msgid "None." msgstr "None" #. type: SH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "ИСТОРИЯ" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "FreeBSD. Linux 5.9, glibc 2.34." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NOTES" msgstr "ПРИМЕЧАНИЯ" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "close - close a file descriptor" msgid "Closing all open file descriptors" msgstr "close - закрывает файловый дескриптор" #. 278a5fbaed89dacd04e9d052f4594ffd0e0585de #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "To avoid blindly closing file descriptors in the range of possible file " "descriptors, this is sometimes implemented (on Linux) by listing open file " "descriptors in I and calling B(2) on each one. " "B() can take care of this without requiring I and " "within a single system call, which provides significant performance benefits." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "a file descriptor becomes ready;" msgid "Closing file descriptors before exec" msgstr "файловый дескриптор не станет готов;" #. 60997c3d45d9a67daf01c56d805ae4fec37e0bd8 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "a file descriptor becomes ready;" msgid "File descriptors can be closed safely using" msgstr "файловый дескриптор не станет готов;" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "/* we don't want anything past stderr here */\n" "close_range(3, \\[ti]0U, CLOSE_RANGE_UNSHARE);\n" "execve(....);\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B is conceptually equivalent to" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "unshare(CLONE_FILES);\n" "close_range(first, last, 0);\n" msgstr "" "unshare(CLONE_FILES);\n" "close_range(first, last, 0);\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "but can be more efficient: if the unshared range extends past the current " "maximum number of file descriptors allocated in the caller's file descriptor " "table (the common case when I is \\[ti]0U), the kernel will unshare a " "new file descriptor table for the caller up to I, copying as few file " "descriptors as possible. This avoids subsequent B(2) calls " "entirely; the whole operation is complete once the table is unshared." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Closing files on exec" msgstr "" #. 582f1fb6b721facf04848d2ca57f34468da1813e #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This is particularly useful in cases where multiple pre-B setup steps " "risk conflicting with each other. For example, setting up a B(2) " "profile can conflict with a B() call: if the file descriptors " "are closed before the B(2) profile is set up, the profile setup " "can't use them itself, or control their closure; if the file descriptors are " "closed afterwards, the seccomp profile can't block the B() " "call or any fallbacks. Using B avoids this: the " "descriptors can be marked before the B(2) profile is set up, and " "the profile can control access to B() without affecting the " "calling process." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "ПРИМЕРЫ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The program shown below opens the files named in its command-line arguments, " "displays the list of files that it has opened (by iterating through the " "entries in I), uses B() to close all file " "descriptors greater than or equal to 3, and then once more displays the " "process's list of open files. The following example demonstrates the use of " "the program:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "$ B\n" "$ B<./a.out /tmp/a /tmp/b /tmp/c>\n" "/tmp/a opened as FD 3\n" "/tmp/b opened as FD 4\n" "/tmp/c opened as FD 5\n" "/proc/self/fd/0 ==E /dev/pts/1\n" "/proc/self/fd/1 ==E /dev/pts/1\n" "/proc/self/fd/2 ==E /dev/pts/1\n" "/proc/self/fd/3 ==E /tmp/a\n" "/proc/self/fd/4 ==E /tmp/b\n" "/proc/self/fd/5 ==E /tmp/b\n" "/proc/self/fd/6 ==E /proc/9005/fd\n" "========= About to call close_range() =======\n" "/proc/self/fd/0 ==E /dev/pts/1\n" "/proc/self/fd/1 ==E /dev/pts/1\n" "/proc/self/fd/2 ==E /dev/pts/1\n" "/proc/self/fd/3 ==E /proc/9005/fd\n" msgstr "" "$ B\n" "$ B<./a.out /tmp/a /tmp/b /tmp/c>\n" "/tmp/a opened as FD 3\n" "/tmp/b opened as FD 4\n" "/tmp/c opened as FD 5\n" "/proc/self/fd/0 ==E /dev/pts/1\n" "/proc/self/fd/1 ==E /dev/pts/1\n" "/proc/self/fd/2 ==E /dev/pts/1\n" "/proc/self/fd/3 ==E /tmp/a\n" "/proc/self/fd/4 ==E /tmp/b\n" "/proc/self/fd/5 ==E /tmp/b\n" "/proc/self/fd/6 ==E /proc/9005/fd\n" "========= About to call close_range() =======\n" "/proc/self/fd/0 ==E /dev/pts/1\n" "/proc/self/fd/1 ==E /dev/pts/1\n" "/proc/self/fd/2 ==E /dev/pts/1\n" "/proc/self/fd/3 ==E /proc/9005/fd\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Note that the lines showing the pathname I result from the " "calls to B(3)." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Program source" msgstr "Исходный код программы" #. type: Plain text #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "" "#define _GNU_SOURCE\n" "#include Edirent.hE\n" "#include Efcntl.hE\n" "#include Elimits.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/types.hE\n" "#include Eunistd.hE\n" "\\&\n" "/* Show the contents of the symbolic links in /proc/self/fd */\n" "\\&\n" "static void\n" "show_fds(void)\n" "{\n" " DIR *dirp;\n" " char path[PATH_MAX], target[PATH_MAX];\n" " ssize_t len;\n" " struct dirent *dp;\n" "\\&\n" " dirp = opendir(\"/proc/self/fd\");\n" " if (dirp == NULL) {\n" " perror(\"opendir\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " for (;;) {\n" " dp = readdir(dirp);\n" " if (dp == NULL)\n" " break;\n" "\\&\n" " if (dp-Ed_type == DT_LNK) {\n" " snprintf(path, sizeof(path), \"/proc/self/fd/%s\",\n" " dp-Ed_name);\n" "\\&\n" " len = readlink(path, target, sizeof(target));\n" " printf(\"%s ==E %.*s\\en\", path, (int) len, target);\n" " }\n" " }\n" "\\&\n" " closedir(dirp);\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int fd;\n" "\\&\n" " for (size_t j = 1; j E argc; j++) {\n" " fd = open(argv[j], O_RDONLY);\n" " if (fd == -1) {\n" " perror(argv[j]);\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"%s opened as FD %d\\en\", argv[j], fd);\n" " }\n" "\\&\n" " show_fds();\n" "\\&\n" " printf(\"========= About to call close_range() =======\\en\");\n" "\\&\n" " if (close_range(3, \\[ti]0U, 0) == -1) {\n" " perror(\"close_range\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " show_fds();\n" " exit(EXIT_FAILURE);\n" "}\n" msgstr "" #. SRC END #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "СМОТРИТЕ ТАКЖЕ" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B(2)" msgstr "B(2)" #. type: TH #: debian-bookworm #, no-wrap msgid "2023-02-10" msgstr "10 февраля 2023 г." #. type: TH #: debian-bookworm #, no-wrap msgid "Linux man-pages 6.03" msgstr "Linux man-pages 6.03" #. type: Plain text #: debian-bookworm fedora-40 mageia-cauldron opensuse-leap-15-6 #, no-wrap msgid "B<#include Elinux/close_range.hE>\n" msgstr "B<#include Elinux/close_range.hE>\n" #. type: Plain text #: debian-bookworm fedora-40 mageia-cauldron opensuse-leap-15-6 #, no-wrap msgid "" "BIB<, unsigned int >IB<,>\n" "B< unsigned int >IB<);>\n" msgstr "" "BIB<, unsigned int >IB<,>\n" "B< unsigned int >IB<);>\n" #. type: SH #: debian-bookworm #, no-wrap msgid "VERSIONS" msgstr "ВЕРСИИ" #. type: Plain text #: debian-bookworm #, fuzzy #| msgid "" #| "B() was added to Linux in kernel 2.6.16; library support was " #| "added to glibc in version 2.4." msgid "" "B() first appeared in Linux 5.9. Library support was added in " "glibc 2.34." msgstr "" "Вызов B() был добавлен в ядро Linux версии 2.6.16; поддержка в " "glibc доступна с версии 2.4." #. type: Plain text #: debian-bookworm msgid "" "B() is a nonstandard function that is also present on FreeBSD." msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#define _GNU_SOURCE\n" "#include Edirent.hE\n" "#include Efcntl.hE\n" "#include Elimits.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/syscall.hE\n" "#include Eunistd.hE\n" msgstr "" "#define _GNU_SOURCE\n" "#include Edirent.hE\n" "#include Efcntl.hE\n" "#include Elimits.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/syscall.hE\n" "#include Eunistd.hE\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "/* Show the contents of the symbolic links in /proc/self/fd */\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "static void\n" "show_fds(void)\n" "{\n" " DIR *dirp;\n" " char path[PATH_MAX], target[PATH_MAX];\n" " ssize_t len;\n" " struct dirent *dp;\n" msgstr "" "static void\n" "show_fds(void)\n" "{\n" " DIR *dirp;\n" " char path[PATH_MAX], target[PATH_MAX];\n" " ssize_t len;\n" " struct dirent *dp;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " dirp = opendir(\"/proc/self/fd\");\n" " if (dirp == NULL) {\n" " perror(\"opendir\");\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " dirp = opendir(\"/proc/self/fd\");\n" " if (dirp == NULL) {\n" " perror(\"opendir\");\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " for (;;) {\n" " dp = readdir(dirp);\n" " if (dp == NULL)\n" " break;\n" msgstr "" " for (;;) {\n" " dp = readdir(dirp);\n" " if (dp == NULL)\n" " break;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (dp-Ed_type == DT_LNK) {\n" " snprintf(path, sizeof(path), \"/proc/self/fd/%s\",\n" " dp-Ed_name);\n" msgstr "" " if (dp-Ed_type == DT_LNK) {\n" " snprintf(path, sizeof(path), \"/proc/self/fd/%s\",\n" " dp-Ed_name);\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " len = readlink(path, target, sizeof(target));\n" " printf(\"%s ==E %.*s\\en\", path, (int) len, target);\n" " }\n" " }\n" msgstr "" " len = readlink(path, target, sizeof(target));\n" " printf(\"%s ==E %.*s\\en\", path, (int) len, target);\n" " }\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " closedir(dirp);\n" "}\n" msgstr "" " closedir(dirp);\n" "}\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "int\n" "main(int argc, char *argv[])\n" "{\n" " int fd;\n" msgstr "" "int\n" "main(int argc, char *argv[])\n" "{\n" " int fd;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " for (size_t j = 1; j E argc; j++) {\n" " fd = open(argv[j], O_RDONLY);\n" " if (fd == -1) {\n" " perror(argv[j]);\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"%s opened as FD %d\\en\", argv[j], fd);\n" " }\n" msgstr "" " for (size_t j = 1; j E argc; j++) {\n" " fd = open(argv[j], O_RDONLY);\n" " if (fd == -1) {\n" " perror(argv[j]);\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"%s opened as FD %d\\en\", argv[j], fd);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " show_fds();\n" msgstr " show_fds();\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " printf(\"========= About to call close_range() =======\\en\");\n" msgstr " printf(\"========= About to call close_range() =======\\en\");\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| " if (syscall(SYS_close_range, 3, \\(ti0U, 0) == -1) {\n" #| " perror(\"close_range\");\n" #| " exit(EXIT_FAILURE);\n" #| " }\n" msgid "" " if (syscall(SYS_close_range, 3, \\[ti]0U, 0) == -1) {\n" " perror(\"close_range\");\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " if (syscall(SYS_close_range, 3, \\(ti0U, 0) == -1) {\n" " perror(\"close_range\");\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " show_fds();\n" " exit(EXIT_FAILURE);\n" "}\n" msgstr "" " show_fds();\n" " exit(EXIT_FAILURE);\n" "}\n" #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "2023-10-31" msgstr "31 октября 2023 г." #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "Linux man-pages 6.06" msgstr "Linux man-pages 6.06" #. type: Plain text #: fedora-40 mageia-cauldron #, no-wrap msgid "" "#define _GNU_SOURCE\n" "#include Edirent.hE\n" "#include Efcntl.hE\n" "#include Elimits.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/syscall.hE\n" "#include Eunistd.hE\n" "\\&\n" "/* Show the contents of the symbolic links in /proc/self/fd */\n" "\\&\n" "static void\n" "show_fds(void)\n" "{\n" " DIR *dirp;\n" " char path[PATH_MAX], target[PATH_MAX];\n" " ssize_t len;\n" " struct dirent *dp;\n" "\\&\n" " dirp = opendir(\"/proc/self/fd\");\n" " if (dirp == NULL) {\n" " perror(\"opendir\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " for (;;) {\n" " dp = readdir(dirp);\n" " if (dp == NULL)\n" " break;\n" "\\&\n" " if (dp-Ed_type == DT_LNK) {\n" " snprintf(path, sizeof(path), \"/proc/self/fd/%s\",\n" " dp-Ed_name);\n" "\\&\n" " len = readlink(path, target, sizeof(target));\n" " printf(\"%s ==E %.*s\\en\", path, (int) len, target);\n" " }\n" " }\n" "\\&\n" " closedir(dirp);\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int fd;\n" "\\&\n" " for (size_t j = 1; j E argc; j++) {\n" " fd = open(argv[j], O_RDONLY);\n" " if (fd == -1) {\n" " perror(argv[j]);\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"%s opened as FD %d\\en\", argv[j], fd);\n" " }\n" "\\&\n" " show_fds();\n" "\\&\n" " printf(\"========= About to call close_range() =======\\en\");\n" "\\&\n" " if (syscall(SYS_close_range, 3, \\[ti]0U, 0) == -1) {\n" " perror(\"close_range\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " show_fds();\n" " exit(EXIT_FAILURE);\n" "}\n" msgstr "" #. type: TH #: fedora-rawhide #, no-wrap msgid "2024-02-25" msgstr "25 февраля 2024 г." #. type: TH #: fedora-rawhide #, no-wrap msgid "Linux man-pages 6.7" msgstr "Linux man-pages 6.7" #. type: Plain text #: fedora-rawhide #, no-wrap msgid "" "#define _GNU_SOURCE\n" "#include Edirent.hE\n" "#include Efcntl.hE\n" "#include Elimits.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" "\\&\n" "/* Show the contents of the symbolic links in /proc/self/fd */\n" "\\&\n" "static void\n" "show_fds(void)\n" "{\n" " DIR *dirp;\n" " char path[PATH_MAX], target[PATH_MAX];\n" " ssize_t len;\n" " struct dirent *dp;\n" "\\&\n" " dirp = opendir(\"/proc/self/fd\");\n" " if (dirp == NULL) {\n" " perror(\"opendir\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " for (;;) {\n" " dp = readdir(dirp);\n" " if (dp == NULL)\n" " break;\n" "\\&\n" " if (dp-Ed_type == DT_LNK) {\n" " snprintf(path, sizeof(path), \"/proc/self/fd/%s\",\n" " dp-Ed_name);\n" "\\&\n" " len = readlink(path, target, sizeof(target));\n" " printf(\"%s ==E %.*s\\en\", path, (int) len, target);\n" " }\n" " }\n" "\\&\n" " closedir(dirp);\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int fd;\n" "\\&\n" " for (size_t j = 1; j E argc; j++) {\n" " fd = open(argv[j], O_RDONLY);\n" " if (fd == -1) {\n" " perror(argv[j]);\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"%s opened as FD %d\\en\", argv[j], fd);\n" " }\n" "\\&\n" " show_fds();\n" "\\&\n" " printf(\"========= About to call close_range() =======\\en\");\n" "\\&\n" " if (close_range(3, \\[ti]0U, 0) == -1) {\n" " perror(\"close_range\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " show_fds();\n" " exit(EXIT_FAILURE);\n" "}\n" msgstr "" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "2023-03-30" msgstr "30 марта 2023 г." #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "Linux man-pages 6.04" msgstr "Linux man-pages 6.04" #. type: TH #: opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "Linux man-pages 6.7" msgid "Linux man-pages (unreleased)" msgstr "Linux man-pages 6.7"