# Russian translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # Alex Nik , 2013. # Azamat Hackimov , 2017. # Yuri Kozlov , 2011-2019. # Иван Павлов , 2017. msgid "" msgstr "" "Project-Id-Version: manpages-l10n\n" "POT-Creation-Date: 2024-06-01 05:59+0200\n" "PO-Revision-Date: 2019-10-05 08:18+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 "kcmp" msgstr "kcmp" #. 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 msgid "" "kcmp - compare two processes to determine if they share a kernel resource" msgstr "" "kcmp - сравнивает два процесса, определяя используют ли они общий ресурс ядра" #. 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-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "B<#include Elinux/kcmp.hE> /* Definition of B constants */\n" "B<#include Esys/syscall.hE> /* Definition of B constants */\n" "B<#include Eunistd.hE>\n" msgstr "" "B<#include Elinux/kcmp.hE> /* определения констант B */\n" "B<#include Esys/syscall.hE> /* определения констант B */\n" "B<#include Eunistd.hE>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "BIB<, pid_t >IB<, int >IB<,>\n" "B< unsigned long >IB<, unsigned long >IB<);>\n" msgstr "" "BIB<, pid_t >IB<, int >IB<,>\n" "B< unsigned long >IB<, unsigned long >IB<);>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "I: glibc provides no wrapper for B(), necessitating the use of " "B(2)." msgstr "" #. 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 can be used to check whether the two processes " "identified by I and I share a kernel resource such as virtual " "memory, file descriptors, and so on." msgstr "" "Системный вызов B() может использоваться для проверки, используют ли " "два процесса I и I общий ресурс ядра, например виртуальную " "память, файловые дескрипторы и т.д." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Permission to employ B() is governed by ptrace access mode " "B checks against both I and I; see " "B(2)." msgstr "" "Право вызывать B() определяется проверкой режима доступа ptrace " "B вместе с I и I; смотрите " "B(2)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The I argument specifies which resource is to be compared in the two " "processes. It has one of the following values:" msgstr "" "В аргументе I указывается какой ресурс двух процессов нужно " "сравнивать. Допустимы следующие значения:" #. 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 "" "Check whether a file descriptor I in the process I refers to the " "same open file description (see B(2)) as file descriptor I in " "the process I. The existence of two file descriptors that refer to " "the same open file description can occur as a result of B(2) (and " "similar) B(2), or passing file descriptors via a domain socket (see " "B(7))." msgstr "" "Проверить, что файловый дескриптор I в процессе I указывает на " "то же открытое файловое описание (смотрите B(2)) что и файловый " "дескриптор I в процессе I. Существование двух файловых " "дескрипторов, ссылающихся на одно файловое описание, может возникнуть в " "результате вызова B(2) (и подобного) в B(2), или передачи " "файловых дескрипторов через доменный сокет (смотрите B(7))." #. 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 "" "Check whether the processes share the same set of open file descriptors. " "The arguments I and I are ignored. See the discussion of the " "B flag in B(2)." msgstr "" "Проверить, используют ли процессы общий одинаковый набор открытых файловых " "дескрипторов. Аргументы I и I игнорируются. Подробности смотрите " "в описании флага B в B(2)." #. 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 "" "Check whether the processes share the same filesystem information (i.e., " "file mode creation mask, working directory, and filesystem root). The " "arguments I and I are ignored. See the discussion of the " "B flag in B(2)." msgstr "" "Проверить, используют ли процессы общую одинаковую информацию о файловой " "системе (т. е. маску прав создания, рабочий каталог и корень файловой " "системы). Аргументы I и I игнорируются. Подробности смотрите в " "описании флага B в B(2)." #. 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 "" "Check whether the processes share I/O context. The arguments I and " "I are ignored. See the discussion of the B flag in " "B(2)." msgstr "" "Проверить, используют ли процессы общее контекст ввода-вывода. Аргументы " "I и I игнорируются. Подробности смотрите в описании флага " "B в B(2)." #. 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 "" "Check whether the processes share the same table of signal dispositions. " "The arguments I and I are ignored. See the discussion of the " "B flag in B(2)." msgstr "" "Проверить, используют ли процессы общую одинаковую таблицу обработчиков " "сигналов. Аргументы I и I игнорируются. Подробности смотрите в " "описании флага B в B(2)." #. 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 "" "Check whether the processes share the same list of System\\ V semaphore undo " "operations. The arguments I and I are ignored. See the " "discussion of the B flag in B(2)." msgstr "" "Проверить, используют ли процессы общий одинаковый список отмены операций " "семафоров System\\ V. Аргументы I и I игнорируются. Подробности " "смотрите в описании флага B в B(2)." #. 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 "" "Check whether the processes share the same address space. The arguments " "I and I are ignored. See the discussion of the B flag " "in B(2)." msgstr "" "Проверить, используют ли процессы общее адресное пространство. Аргументы " "I и I игнорируются. Подробности смотрите в описании флага " "B в B(2)." #. 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 4.13)" msgstr "B (начиная с Linux 4.13)" #. commit 0791e3644e5ef21646fe565b9061788d05ec71d4 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Check whether the file descriptor I of the process I is present " "in the B(7) instance described by I of the process I. " "The argument I is a pointer to a structure where the target file is " "described. This structure has the form:" msgstr "" "Проверить, есть ли файловый дескриптор I процесса I в экземпляре " "B(7), описанном в I у процесса I. Аргумент I " "является указателем на структуру, которая описывает файл назначения. Формат " "структуры:" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "struct kcmp_epoll_slot {\n" " __u32 efd;\n" " __u32 tfd;\n" " __u64 toff;\n" "};\n" msgstr "" "struct kcmp_epoll_slot {\n" " __u32 efd;\n" " __u32 tfd;\n" " __u64 toff;\n" "};\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Within this structure, I is an epoll file descriptor returned from " "B(2), I is a target file descriptor number, and I " "is a target file offset counted from zero. Several different targets may be " "registered with the same file descriptor number and setting a specific " "offset helps to investigate each of them." msgstr "" "В этой структуре поле I содержит файловый дескриптор epoll, " "возвращаемый B(2), I содержит номер файлового " "дескриптора, а I содержит смещение в файле назначения, начиная с нуля. " "Несколько разных назначений могут быть зарегистрированы с одним номером " "файлового дескриптора, а установка определённого смещения помогает выбрать " "нужный." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Note the B() is not protected against false positives which may occur " "if the processes are currently running. One should stop the processes by " "sending B (see B(7)) prior to inspection with this system " "call to obtain meaningful results." msgstr "" "Заметим, что вызов B() не защищён от ложных срабатываний (false " "positives), которые могут случаться, если процессы в этот момент " "выполняются. То есть для получения достоверных результатов перед выполнением " "данного системного вызова нужно послать процессам сигнал B " "(смотрите B(7))." #. 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 msgid "" "The return value of a successful call to B() is simply the result of " "arithmetic comparison of kernel pointers (when the kernel compares " "resources, it uses their memory addresses)." msgstr "" "При успешном выполнении B() возвращает результат арифметического " "сложения указателей ядра (когда ядро сравнивает ресурсы, оно использует их " "адреса памяти)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The easiest way to explain is to consider an example. Suppose that I " "and I are the addresses of appropriate resources, then the return value " "is one of the following:" msgstr "" "Для простоты объяснения рассмотрим пример. Предположим, что I и I — " "адреса соответствующих ресурсов и возвращается значение:" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<0>" msgstr "B<0>" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "I is equal to I; in other words, the two processes share the " "resource." msgstr "" "I равен I; другими словами, два процесса используют ресурс совместно." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<1>" msgstr "B<1>" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I is less than I." msgstr "I меньше I." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<2>" msgstr "B<2>" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I is greater than I." msgstr "I больше I." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<3>" msgstr "B<3>" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I is not equal to I, but ordering information is unavailable." msgstr "I не равен I, но нужная информация недоступна." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "On error, -1 is returned, and I is set to indicate the error." msgstr "" "В случае ошибки возвращается -1, а I устанавливается в значение " "ошибки." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B() was designed to return values suitable for sorting. This is " "particularly handy if one needs to compare a large number of file " "descriptors." msgstr "" "Значения вызова B() специально выбраны так, чтобы их легко можно было " "упорядочить. В частности, это удобно когда нужно сравнить большое количество " "файловых дескрипторов." #. 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 B and I or I is not an open file descriptor." msgstr "" "Значение I равно B и I или I не являются " "открытыми файловыми дескрипторами." #. 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 epoll slot addressed by I is outside of the user's address space." msgstr "" "Слот epoll, указанный в I, находится за пределами пользовательского " "адресного пространства." #. 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 invalid." msgstr "Значение I неверно." #. 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 target file is not present in B(7) instance." msgstr "Файл назначения отсутствует в экземпляре B(7)." #. 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 permission to inspect process resources. The B " "capability is required to inspect processes that you do not own. Other " "ptrace limitations may also apply, such as B, which, " "when I is 2, limits B() to child " "processes; see B(2)." msgstr "" "Недостаточно прав для просмотра ресурсов процесса. Для проверки процессов " "требуется мандат B, которого у вас нет. Также могут " "действовать другие ограничения ptrace, например B, " "которое при I равном 2, ограничивает " "B() дочерними процессами; смотрите B(2)." #. 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 "Process I or I does not exist." msgstr "Процесс I или I не существует." #. 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 msgid "Linux." msgstr "Linux." #. 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 #, fuzzy #| msgid "Linux" msgid "Linux 3.5." msgstr "Linux" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "This system call is available only if the kernel was configured with " #| "B. The main use of the system call is for the " #| "checkpoint/restore in user space (CRIU) feature. The alternative to this " #| "system call would have been to expose suitable process information via " #| "the B(5) filesystem; this was deemed to be unsuitable for security " #| "reasons." msgid "" "Before Linux 5.12, this system call is available only if the kernel is " "configured with B, since the original purpose of " "the system call was for the checkpoint/restore in user space (CRIU) " "feature. (The alternative to this system call would have been to expose " "suitable process information via the B(5) filesystem; this was deemed " "to be unsuitable for security reasons.) Since Linux 5.12, this system call " "is also available if the kernel is configured with B." msgstr "" "Данный системный вызов доступен только, если ядро собрано с параметром " "B. Основное предназначение вызова — возможность " "засечки/восстановления в пользовательском пространстве (CRIU). Альтернативой " "этому системному вызову было бы выставление соответствующей информации о " "процессе в файловой системе B(5); такой вариант не пригоден по " "причинам безопасности." #. 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: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "See B(2) for some background information on the shared resources " "referred to on this page." msgstr "Дополнительную информацию об общих ресурсах смотрите в B(2)." #. 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 below uses B() to test whether pairs of file descriptors " "refer to the same open file description. The program tests different cases " "for the file descriptor pairs, as described in the program output. An " "example run of the program is as follows:" msgstr "" "Данная программа использует B() про проверки того, что пара файловых " "дескрипторов указывает на одно и тоже открытое файловое описание. Программа " "тестирует различные случаи для пар файловых дескрипторов, описанных в выводе " "программы. Пример работы программы:" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "PID of child of fork() is 1145\n" #| "\tCompare duplicate FDs from different processes:\n" #| "\t\tkcmp(1145, 1144, KCMP_FILE, 3, 3) ==E same\n" #| "Child opened file on FD 4\n" #| "\tCompare FDs from distinct open()s in same process:\n" #| "\t\tkcmp(1145, 1145, KCMP_FILE, 3, 4) ==E different\n" #| "Child duplicated FD 3 to create FD 5\n" #| "\tCompare duplicated FDs in same process:\n" #| "\t\tkcmp(1145, 1145, KCMP_FILE, 3, 5) ==E same\n" msgid "" "$ B<./a.out>\n" "Parent PID is 1144\n" "Parent opened file on FD 3\n" "\\&\n" "PID of child of fork() is 1145\n" "\tCompare duplicate FDs from different processes:\n" "\t\tkcmp(1145, 1144, KCMP_FILE, 3, 3) ==E same\n" "Child opened file on FD 4\n" "\tCompare FDs from distinct open()s in same process:\n" "\t\tkcmp(1145, 1145, KCMP_FILE, 3, 4) ==E different\n" "Child duplicated FD 3 to create FD 5\n" "\tCompare duplicated FDs in same process:\n" "\t\tkcmp(1145, 1145, KCMP_FILE, 3, 5) ==E same\n" msgstr "" "PID потомка после fork() равен 1145\n" "\tСравнение дубликатов FD из других процессов:\n" "\t\tkcmp(1145, 1144, KCMP_FILE, 3, 3) ==E одинаков\n" "Открытый потомком файл на FD 4\n" "\tСравнение FD из различных open() одного процесса:\n" "\t\tkcmp(1145, 1145, KCMP_FILE, 3, 4) ==E отличается\n" "Дубликат FD 3 потомка для создания FD 5\n" "\tСравнение дубликатов FD одного процесса:\n" "\t\tkcmp(1145, 1145, KCMP_FILE, 3, 5) ==E одинаков\n" #. 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 Eerr.hE\n" "#include Efcntl.hE\n" "#include Elinux/kcmp.hE\n" "#include Estdint.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/syscall.hE\n" "#include Esys/types.hE\n" "#include Esys/wait.hE\n" "#include Eunistd.hE\n" "\\&\n" "static int\n" "kcmp(pid_t pid1, pid_t pid2, int type,\n" " unsigned long idx1, unsigned long idx2)\n" "{\n" " return syscall(SYS_kcmp, pid1, pid2, type, idx1, idx2);\n" "}\n" "\\&\n" "static void\n" "test_kcmp(char *msg, pid_t pid1, pid_t pid2, int fd_a, int fd_b)\n" "{\n" " printf(\"\\et%s\\en\", msg);\n" " printf(\"\\et\\etkcmp(%jd, %jd, KCMP_FILE, %d, %d) ==E %s\\en\",\n" " (intmax_t) pid1, (intmax_t) pid2, fd_a, fd_b,\n" " (kcmp(pid1, pid2, KCMP_FILE, fd_a, fd_b) == 0) ?\n" " \"same\" : \"different\");\n" "}\n" "\\&\n" "int\n" "main(void)\n" "{\n" " int fd1, fd2, fd3;\n" " static const char pathname[] = \"/tmp/kcmp.test\";\n" "\\&\n" " fd1 = open(pathname, O_CREAT | O_RDWR, 0600);\n" " if (fd1 == -1)\n" " err(EXIT_FAILURE, \"open\");\n" "\\&\n" " printf(\"Parent PID is %jd\\en\", (intmax_t) getpid());\n" " printf(\"Parent opened file on FD %d\\en\\en\", fd1);\n" "\\&\n" " switch (fork()) {\n" " case -1:\n" " err(EXIT_FAILURE, \"fork\");\n" "\\&\n" " case 0:\n" " printf(\"PID of child of fork() is %jd\\en\", (intmax_t) getpid());\n" "\\&\n" " test_kcmp(\"Compare duplicate FDs from different processes:\",\n" " getpid(), getppid(), fd1, fd1);\n" "\\&\n" " fd2 = open(pathname, O_CREAT | O_RDWR, 0600);\n" " if (fd2 == -1)\n" " err(EXIT_FAILURE, \"open\");\n" " printf(\"Child opened file on FD %d\\en\", fd2);\n" "\\&\n" " test_kcmp(\"Compare FDs from distinct open()s in same process:\",\n" " getpid(), getpid(), fd1, fd2);\n" "\\&\n" " fd3 = dup(fd1);\n" " if (fd3 == -1)\n" " err(EXIT_FAILURE, \"dup\");\n" " printf(\"Child duplicated FD %d to create FD %d\\en\", fd1, fd3);\n" "\\&\n" " test_kcmp(\"Compare duplicated FDs in same process:\",\n" " getpid(), getpid(), fd1, fd3);\n" " break;\n" "\\&\n" " default:\n" " wait(NULL);\n" " }\n" "\\&\n" " exit(EXIT_SUCCESS);\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), B(2)" msgstr "B(2), B(2)" #. type: TH #: debian-bookworm #, no-wrap msgid "2022-10-30" msgstr "30 октября 2022 г." #. type: TH #: debian-bookworm #, no-wrap msgid "Linux man-pages 6.03" msgstr "Linux man-pages 6.03" #. type: SH #: debian-bookworm #, no-wrap msgid "VERSIONS" msgstr "ВЕРСИИ" #. type: Plain text #: debian-bookworm msgid "The B() system call first appeared in Linux 3.5." msgstr "Системный вызов B() впервые появился в Linux 3.5." #. type: Plain text #: debian-bookworm msgid "" "B() is Linux-specific and should not be used in programs intended to " "be portable." msgstr "" "Вызов B() есть только в Linux и не должен использоваться в переносимых " "программах." #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "$ B<./a.out>\n" "Parent PID is 1144\n" "Parent opened file on FD 3\n" msgstr "" "$ B<./a.out>\n" "PID родителя 1144\n" "Открытый родителем файл на FD 3\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "PID of child of fork() is 1145\n" "\tCompare duplicate FDs from different processes:\n" "\t\tkcmp(1145, 1144, KCMP_FILE, 3, 3) ==E same\n" "Child opened file on FD 4\n" "\tCompare FDs from distinct open()s in same process:\n" "\t\tkcmp(1145, 1145, KCMP_FILE, 3, 4) ==E different\n" "Child duplicated FD 3 to create FD 5\n" "\tCompare duplicated FDs in same process:\n" "\t\tkcmp(1145, 1145, KCMP_FILE, 3, 5) ==E same\n" msgstr "" "PID потомка после fork() равен 1145\n" "\tСравнение дубликатов FD из других процессов:\n" "\t\tkcmp(1145, 1144, KCMP_FILE, 3, 3) ==E одинаков\n" "Открытый потомком файл на FD 4\n" "\tСравнение FD из различных open() одного процесса:\n" "\t\tkcmp(1145, 1145, KCMP_FILE, 3, 4) ==E отличается\n" "Дубликат FD 3 потомка для создания FD 5\n" "\tСравнение дубликатов FD одного процесса:\n" "\t\tkcmp(1145, 1145, KCMP_FILE, 3, 5) ==E одинаков\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#define _GNU_SOURCE\n" "#include Eerr.hE\n" "#include Efcntl.hE\n" "#include Elinux/kcmp.hE\n" "#include Estdint.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/syscall.hE\n" "#include Esys/wait.hE\n" "#include Eunistd.hE\n" msgstr "" "#define _GNU_SOURCE\n" "#include Eerr.hE\n" "#include Efcntl.hE\n" "#include Elinux/kcmp.hE\n" "#include Estdint.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/syscall.hE\n" "#include Esys/wait.hE\n" "#include Eunistd.hE\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "static int\n" "kcmp(pid_t pid1, pid_t pid2, int type,\n" " unsigned long idx1, unsigned long idx2)\n" "{\n" " return syscall(SYS_kcmp, pid1, pid2, type, idx1, idx2);\n" "}\n" msgstr "" "static int\n" "kcmp(pid_t pid1, pid_t pid2, int type,\n" " unsigned long idx1, unsigned long idx2)\n" "{\n" " return syscall(SYS_kcmp, pid1, pid2, type, idx1, idx2);\n" "}\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "static void\n" "test_kcmp(char *msg, pid_t pid1, pid_t pid2, int fd_a, int fd_b)\n" "{\n" " printf(\"\\et%s\\en\", msg);\n" " printf(\"\\et\\etkcmp(%jd, %jd, KCMP_FILE, %d, %d) ==E %s\\en\",\n" " (intmax_t) pid1, (intmax_t) pid2, fd_a, fd_b,\n" " (kcmp(pid1, pid2, KCMP_FILE, fd_a, fd_b) == 0) ?\n" " \"same\" : \"different\");\n" "}\n" msgstr "" "static void\n" "test_kcmp(char *msg, pid_t pid1, pid_t pid2, int fd_a, int fd_b)\n" "{\n" " printf(\"\\et%s\\en\", msg);\n" " printf(\"\\et\\etkcmp(%jd, %jd, KCMP_FILE, %d, %d) ==E %s\\en\",\n" " (intmax_t) pid1, (intmax_t) pid2, fd_a, fd_b,\n" " (kcmp(pid1, pid2, KCMP_FILE, fd_a, fd_b) == 0) ?\n" " \"одинаков\" : \"отличается\");\n" "}\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "int\n" "main(void)\n" "{\n" " int fd1, fd2, fd3;\n" " static const char pathname[] = \"/tmp/kcmp.test\";\n" msgstr "" "int\n" "main(void)\n" "{\n" " int fd1, fd2, fd3;\n" " static const char pathname[] = \"/tmp/kcmp.test\";\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " fd1 = open(pathname, O_CREAT | O_RDWR, 0600);\n" " if (fd1 == -1)\n" " err(EXIT_FAILURE, \"open\");\n" msgstr "" " fd1 = open(pathname, O_CREAT | O_RDWR, 0600);\n" " if (fd1 == -1)\n" " err(EXIT_FAILURE, \"open\");\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " printf(\"Parent PID is %jd\\en\", (intmax_t) getpid());\n" " printf(\"Parent opened file on FD %d\\en\\en\", fd1);\n" msgstr "" " printf(\"PID родителя jd\\en\", (intmax_t) getpid());\n" " printf(\"Открытый родителем файл на FD %d\\en\\en\", fd1);\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " switch (fork()) {\n" " case -1:\n" " err(EXIT_FAILURE, \"fork\");\n" msgstr "" " switch (fork()) {\n" " case -1:\n" " err(EXIT_FAILURE, \"fork\");\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " case 0:\n" " printf(\"PID of child of fork() is %jd\\en\", (intmax_t) getpid());\n" msgstr "" " case 0:\n" " printf(\"PID потомка после fork() равен %jd\\en\", (intmax_t) getpid());\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " test_kcmp(\"Compare duplicate FDs from different processes:\",\n" " getpid(), getppid(), fd1, fd1);\n" msgstr "" " test_kcmp(\"Сравнение дубликатов FD из других процессов:\",\n" " getpid(), getppid(), fd1, fd1);\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " fd2 = open(pathname, O_CREAT | O_RDWR, 0600);\n" " if (fd2 == -1)\n" " err(EXIT_FAILURE, \"open\");\n" " printf(\"Child opened file on FD %d\\en\", fd2);\n" msgstr "" " fd2 = open(pathname, O_CREAT | O_RDWR, 0600);\n" " if (fd2 == -1)\n" " err(EXIT_FAILURE, \"open\");\n" " printf(\"Открытый потомком файл на FD %d\\en\", fd2);\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " test_kcmp(\"Compare FDs from distinct open()s in same process:\",\n" " getpid(), getpid(), fd1, fd2);\n" msgstr "" " test_kcmp(\"Сравнение FD из различных open() одного процесса:\",\n" " getpid(), getpid(), fd1, fd2);\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " fd3 = dup(fd1);\n" " if (fd3 == -1)\n" " err(EXIT_FAILURE, \"dup\");\n" " printf(\"Child duplicated FD %d to create FD %d\\en\", fd1, fd3);\n" msgstr "" " fd3 = dup(fd1);\n" " if (fd3 == -1)\n" " err(EXIT_FAILURE, \"dup\");\n" " printf(\"Дубликат FD %d потомка для создания FD %d\\en\", fd1, fd3);\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " test_kcmp(\"Compare duplicated FDs in same process:\",\n" " getpid(), getpid(), fd1, fd3);\n" " break;\n" msgstr "" " test_kcmp(\"Сравнение дубликатов FD одного процесса:\",\n" " getpid(), getpid(), fd1, fd3);\n" " break;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " default:\n" " wait(NULL);\n" " }\n" msgstr "" " default:\n" " wait(NULL);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" " exit(EXIT_SUCCESS);\n" "}\n" #. type: TH #: fedora-40 fedora-rawhide 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 fedora-rawhide mageia-cauldron #, no-wrap msgid "" "#define _GNU_SOURCE\n" "#include Eerr.hE\n" "#include Efcntl.hE\n" "#include Elinux/kcmp.hE\n" "#include Estdint.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/syscall.hE\n" "#include Esys/wait.hE\n" "#include Eunistd.hE\n" "\\&\n" "static int\n" "kcmp(pid_t pid1, pid_t pid2, int type,\n" " unsigned long idx1, unsigned long idx2)\n" "{\n" " return syscall(SYS_kcmp, pid1, pid2, type, idx1, idx2);\n" "}\n" "\\&\n" "static void\n" "test_kcmp(char *msg, pid_t pid1, pid_t pid2, int fd_a, int fd_b)\n" "{\n" " printf(\"\\et%s\\en\", msg);\n" " printf(\"\\et\\etkcmp(%jd, %jd, KCMP_FILE, %d, %d) ==E %s\\en\",\n" " (intmax_t) pid1, (intmax_t) pid2, fd_a, fd_b,\n" " (kcmp(pid1, pid2, KCMP_FILE, fd_a, fd_b) == 0) ?\n" " \"same\" : \"different\");\n" "}\n" "\\&\n" "int\n" "main(void)\n" "{\n" " int fd1, fd2, fd3;\n" " static const char pathname[] = \"/tmp/kcmp.test\";\n" "\\&\n" " fd1 = open(pathname, O_CREAT | O_RDWR, 0600);\n" " if (fd1 == -1)\n" " err(EXIT_FAILURE, \"open\");\n" "\\&\n" " printf(\"Parent PID is %jd\\en\", (intmax_t) getpid());\n" " printf(\"Parent opened file on FD %d\\en\\en\", fd1);\n" "\\&\n" " switch (fork()) {\n" " case -1:\n" " err(EXIT_FAILURE, \"fork\");\n" "\\&\n" " case 0:\n" " printf(\"PID of child of fork() is %jd\\en\", (intmax_t) getpid());\n" "\\&\n" " test_kcmp(\"Compare duplicate FDs from different processes:\",\n" " getpid(), getppid(), fd1, fd1);\n" "\\&\n" " fd2 = open(pathname, O_CREAT | O_RDWR, 0600);\n" " if (fd2 == -1)\n" " err(EXIT_FAILURE, \"open\");\n" " printf(\"Child opened file on FD %d\\en\", fd2);\n" "\\&\n" " test_kcmp(\"Compare FDs from distinct open()s in same process:\",\n" " getpid(), getpid(), fd1, fd2);\n" "\\&\n" " fd3 = dup(fd1);\n" " if (fd3 == -1)\n" " err(EXIT_FAILURE, \"dup\");\n" " printf(\"Child duplicated FD %d to create FD %d\\en\", fd1, fd3);\n" "\\&\n" " test_kcmp(\"Compare duplicated FDs in same process:\",\n" " getpid(), getpid(), fd1, fd3);\n" " break;\n" "\\&\n" " default:\n" " wait(NULL);\n" " }\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" #. type: TH #: fedora-rawhide #, no-wrap msgid "Linux man-pages 6.7" msgstr "Linux man-pages 6.7" #. 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"