summaryrefslogtreecommitdiffstats
path: root/po/ru/man3/shm_open.3.po
diff options
context:
space:
mode:
Diffstat (limited to 'po/ru/man3/shm_open.3.po')
-rw-r--r--po/ru/man3/shm_open.3.po258
1 files changed, 229 insertions, 29 deletions
diff --git a/po/ru/man3/shm_open.3.po b/po/ru/man3/shm_open.3.po
index f3ccafdf..9bb8217a 100644
--- a/po/ru/man3/shm_open.3.po
+++ b/po/ru/man3/shm_open.3.po
@@ -12,7 +12,7 @@
msgid ""
msgstr ""
"Project-Id-Version: manpages-l10n\n"
-"POT-Creation-Date: 2024-03-01 17:08+0100\n"
+"POT-Creation-Date: 2024-06-01 06:21+0200\n"
"PO-Revision-Date: 2019-10-15 18:55+0300\n"
"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
"Language-Team: Russian <man-pages-ru-talks@lists.sourceforge.net>\n"
@@ -20,9 +20,9 @@ msgstr ""
"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"
+"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
@@ -34,16 +34,17 @@ msgid "shm_open"
msgstr "I<shm_perm>"
#. type: TH
-#: archlinux fedora-40 fedora-rawhide mageia-cauldron
+#: archlinux debian-unstable opensuse-tumbleweed
#, no-wrap
-msgid "2023-10-31"
-msgstr "31 октября 2023 г."
+msgid "2024-05-02"
+msgstr "2 мая 2024 г."
#. type: TH
-#: archlinux fedora-40 fedora-rawhide mageia-cauldron
-#, no-wrap
-msgid "Linux man-pages 6.06"
-msgstr "Linux man-pages 6.06"
+#: 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
@@ -702,17 +703,16 @@ msgid ""
msgstr ""
#. type: Plain text
-#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
-#: opensuse-tumbleweed
+#: archlinux debian-unstable opensuse-tumbleweed
#, no-wrap
msgid ""
-"#include E<lt>fcntl.hE<gt>\n"
+"#ifndef PSHM_UCASE_H\n"
+"#define PSHM_UCASE_H\n"
+"\\&\n"
"#include E<lt>semaphore.hE<gt>\n"
+"#include E<lt>stddef.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
-"#include E<lt>sys/mman.hE<gt>\n"
-"#include E<lt>sys/stat.hE<gt>\n"
-"#include E<lt>unistd.hE<gt>\n"
"\\&\n"
"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
" } while (0)\n"
@@ -728,6 +728,8 @@ msgid ""
" size_t cnt; /* Number of bytes used in \\[aq]buf\\[aq] */\n"
" char buf[BUF_SIZE]; /* Data being transferred */\n"
"};\n"
+"\\&\n"
+"#endif // include guard\n"
msgstr ""
#. type: SS
@@ -759,8 +761,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
-#: opensuse-tumbleweed
+#: archlinux debian-unstable opensuse-tumbleweed
#, no-wrap
msgid ""
"/* pshm_ucase_bounce.c\n"
@@ -768,6 +769,11 @@ msgid ""
" Licensed under GNU General Public License v2 or later.\n"
"*/\n"
"#include E<lt>ctype.hE<gt>\n"
+"#include E<lt>fcntl.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>sys/mman.hE<gt>\n"
+"#include E<lt>unistd.hE<gt>\n"
"\\&\n"
"#include \"pshm_ucase.h\"\n"
"\\&\n"
@@ -865,15 +871,20 @@ msgid ""
msgstr ""
#. type: Plain text
-#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
-#: opensuse-tumbleweed
+#: archlinux debian-unstable opensuse-tumbleweed
#, no-wrap
msgid ""
"/* pshm_ucase_send.c\n"
"\\&\n"
" Licensed under GNU General Public License v2 or later.\n"
"*/\n"
+"#include E<lt>fcntl.hE<gt>\n"
+"#include E<lt>stddef.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
"#include E<lt>string.hE<gt>\n"
+"#include E<lt>sys/mman.hE<gt>\n"
+"#include E<lt>unistd.hE<gt>\n"
"\\&\n"
"#include \"pshm_ucase.h\"\n"
"\\&\n"
@@ -941,7 +952,7 @@ msgstr ""
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "SEE ALSO"
-msgstr "СМ. ТАКЖЕ"
+msgstr "СМОТРИТЕ ТАКЖЕ"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
@@ -981,7 +992,7 @@ msgstr "POSIX.1-2001, POSIX.1-2008."
#: debian-bookworm
#, no-wrap
msgid "NOTES"
-msgstr "ЗАМЕЧАНИЯ"
+msgstr "ПРИМЕЧАНИЯ"
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
@@ -1458,16 +1469,198 @@ msgid ""
msgstr ""
#. type: TH
-#: debian-unstable opensuse-tumbleweed
+#: 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 ""
+"#include E<lt>fcntl.hE<gt>\n"
+"#include E<lt>semaphore.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>sys/mman.hE<gt>\n"
+"#include E<lt>sys/stat.hE<gt>\n"
+"#include E<lt>unistd.hE<gt>\n"
+"\\&\n"
+"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
+" } while (0)\n"
+"\\&\n"
+"#define BUF_SIZE 1024 /* Maximum size for exchanged string */\n"
+"\\&\n"
+"/* Define a structure that will be imposed on the shared\n"
+" memory object */\n"
+"\\&\n"
+"struct shmbuf {\n"
+" sem_t sem1; /* POSIX unnamed semaphore */\n"
+" sem_t sem2; /* POSIX unnamed semaphore */\n"
+" size_t cnt; /* Number of bytes used in \\[aq]buf\\[aq] */\n"
+" char buf[BUF_SIZE]; /* Data being transferred */\n"
+"};\n"
+msgstr ""
+
+#. type: Plain text
+#: fedora-40 fedora-rawhide mageia-cauldron
+#, no-wrap
+msgid ""
+"/* pshm_ucase_bounce.c\n"
+"\\&\n"
+" Licensed under GNU General Public License v2 or later.\n"
+"*/\n"
+"#include E<lt>ctype.hE<gt>\n"
+"\\&\n"
+"#include \"pshm_ucase.h\"\n"
+"\\&\n"
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" int fd;\n"
+" char *shmpath;\n"
+" struct shmbuf *shmp;\n"
+"\\&\n"
+" if (argc != 2) {\n"
+" fprintf(stderr, \"Usage: %s /shm-path\\en\", argv[0]);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" shmpath = argv[1];\n"
+"\\&\n"
+" /* Create shared memory object and set its size to the size\n"
+" of our structure. */\n"
+"\\&\n"
+" fd = shm_open(shmpath, O_CREAT | O_EXCL | O_RDWR, 0600);\n"
+" if (fd == -1)\n"
+" errExit(\"shm_open\");\n"
+"\\&\n"
+" if (ftruncate(fd, sizeof(struct shmbuf)) == -1)\n"
+" errExit(\"ftruncate\");\n"
+"\\&\n"
+" /* Map the object into the caller\\[aq]s address space. */\n"
+"\\&\n"
+" shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,\n"
+" MAP_SHARED, fd, 0);\n"
+" if (shmp == MAP_FAILED)\n"
+" errExit(\"mmap\");\n"
+"\\&\n"
+" /* Initialize semaphores as process-shared, with value 0. */\n"
+"\\&\n"
+" if (sem_init(&shmp-E<gt>sem1, 1, 0) == -1)\n"
+" errExit(\"sem_init-sem1\");\n"
+" if (sem_init(&shmp-E<gt>sem2, 1, 0) == -1)\n"
+" errExit(\"sem_init-sem2\");\n"
+"\\&\n"
+" /* Wait for \\[aq]sem1\\[aq] to be posted by peer before touching\n"
+" shared memory. */\n"
+"\\&\n"
+" if (sem_wait(&shmp-E<gt>sem1) == -1)\n"
+" errExit(\"sem_wait\");\n"
+"\\&\n"
+" /* Convert data in shared memory into upper case. */\n"
+"\\&\n"
+" for (size_t j = 0; j E<lt> shmp-E<gt>cnt; j++)\n"
+" shmp-E<gt>buf[j] = toupper((unsigned char) shmp-E<gt>buf[j]);\n"
+"\\&\n"
+" /* Post \\[aq]sem2\\[aq] to tell the peer that it can now\n"
+" access the modified data in shared memory. */\n"
+"\\&\n"
+" if (sem_post(&shmp-E<gt>sem2) == -1)\n"
+" errExit(\"sem_post\");\n"
+"\\&\n"
+" /* Unlink the shared memory object. Even if the peer process\n"
+" is still using the object, this is okay. The object will\n"
+" be removed only after all open references are closed. */\n"
+"\\&\n"
+" shm_unlink(shmpath);\n"
+"\\&\n"
+" exit(EXIT_SUCCESS);\n"
+"}\n"
+msgstr ""
+
+#. type: Plain text
+#: fedora-40 fedora-rawhide mageia-cauldron
#, no-wrap
-msgid "2023-07-20"
-msgstr "20 июля 2023 г."
+msgid ""
+"/* pshm_ucase_send.c\n"
+"\\&\n"
+" Licensed under GNU General Public License v2 or later.\n"
+"*/\n"
+"#include E<lt>string.hE<gt>\n"
+"\\&\n"
+"#include \"pshm_ucase.h\"\n"
+"\\&\n"
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" int fd;\n"
+" char *shmpath, *string;\n"
+" size_t len;\n"
+" struct shmbuf *shmp;\n"
+"\\&\n"
+" if (argc != 3) {\n"
+" fprintf(stderr, \"Usage: %s /shm-path string\\en\", argv[0]);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" shmpath = argv[1];\n"
+" string = argv[2];\n"
+" len = strlen(string);\n"
+"\\&\n"
+" if (len E<gt> BUF_SIZE) {\n"
+" fprintf(stderr, \"String is too long\\en\");\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" /* Open the existing shared memory object and map it\n"
+" into the caller\\[aq]s address space. */\n"
+"\\&\n"
+" fd = shm_open(shmpath, O_RDWR, 0);\n"
+" if (fd == -1)\n"
+" errExit(\"shm_open\");\n"
+"\\&\n"
+" shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,\n"
+" MAP_SHARED, fd, 0);\n"
+" if (shmp == MAP_FAILED)\n"
+" errExit(\"mmap\");\n"
+"\\&\n"
+" /* Copy data into the shared memory object. */\n"
+"\\&\n"
+" shmp-E<gt>cnt = len;\n"
+" memcpy(&shmp-E<gt>buf, string, len);\n"
+"\\&\n"
+" /* Tell peer that it can now access shared memory. */\n"
+"\\&\n"
+" if (sem_post(&shmp-E<gt>sem1) == -1)\n"
+" errExit(\"sem_post\");\n"
+"\\&\n"
+" /* Wait until peer says that it has finished accessing\n"
+" the shared memory. */\n"
+"\\&\n"
+" if (sem_wait(&shmp-E<gt>sem2) == -1)\n"
+" errExit(\"sem_wait\");\n"
+"\\&\n"
+" /* Write modified data in shared memory to standard output. */\n"
+"\\&\n"
+" write(STDOUT_FILENO, &shmp-E<gt>buf, len);\n"
+" write(STDOUT_FILENO, \"\\en\", 1);\n"
+"\\&\n"
+" exit(EXIT_SUCCESS);\n"
+"}\n"
+msgstr ""
#. type: TH
-#: debian-unstable opensuse-tumbleweed
+#: fedora-rawhide
#, no-wrap
-msgid "Linux man-pages 6.05.01"
-msgstr "Linux man-pages 6.05.01"
+msgid "Linux man-pages 6.7"
+msgstr "Linux man-pages 6.7"
#. type: TH
#: opensuse-leap-15-6
@@ -1480,3 +1673,10 @@ msgstr "30 марта 2023 г."
#, 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"