diff options
Diffstat (limited to 'po/es/man7/unix.7.po')
-rw-r--r-- | po/es/man7/unix.7.po | 668 |
1 files changed, 616 insertions, 52 deletions
diff --git a/po/es/man7/unix.7.po b/po/es/man7/unix.7.po index 7c1de992..2236e38f 100644 --- a/po/es/man7/unix.7.po +++ b/po/es/man7/unix.7.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: manpages-l10n\n" -"POT-Creation-Date: 2024-03-01 17:12+0100\n" +"POT-Creation-Date: 2024-06-01 06:33+0200\n" "PO-Revision-Date: 2005-06-26 19:53+0200\n" "Last-Translator: Miguel Pérez Ibars <mpi79470@alu.um.es>\n" "Language-Team: Spanish <debian-l10n-spanish@lists.debian.org>\n" @@ -25,16 +25,16 @@ msgid "UNIX" msgstr "UNIX" #. type: TH -#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#: archlinux debian-unstable opensuse-tumbleweed #, no-wrap -msgid "2023-12-21" -msgstr "21 Diciembre 2023" +msgid "2024-05-02" +msgstr "2 Mayo 2024" #. type: TH -#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#: archlinux debian-unstable #, no-wrap -msgid "Linux man-pages 6.06" -msgstr "Páginas de manual de Linux 6.06" +msgid "Linux man-pages 6.8" +msgstr "Páginas de Manual de Linux 6.8" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide @@ -176,10 +176,9 @@ msgid "" msgstr "" #. type: Plain text -#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide -#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#: archlinux debian-unstable fedora-rawhide opensuse-tumbleweed msgid "" -"Various systems calls (for example, B<bind>(2), B<connect>(2), and " +"Various system calls (for example, B<bind>(2), B<connect>(2), and " "B<sendto>(2)) take a I<sockaddr_un> argument as input. Some other system " "calls (for example, B<getsockname>(2), B<getpeername>(2), B<recvfrom>(2), " "and B<accept>(2)) return an argument of this type." @@ -557,7 +556,8 @@ msgid "B<SO_PEERCRED>" msgstr "B<SO_PEERCRED>" #. type: Plain text -#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed msgid "" "This read-only socket option returns the credentials of the peer process " "connected to this socket. The returned credentials are those that were in " @@ -1550,11 +1550,10 @@ msgstr "ERRORES" #. The behavior on Solaris is quite similar. #. type: Plain text -#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide -#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#: archlinux debian-unstable fedora-rawhide opensuse-tumbleweed msgid "" "When binding a socket to an address, Linux is one of the implementations " -"that appends a null terminator if none is supplied in I<sun_path>. In most " +"that append a null terminator if none is supplied in I<sun_path>. In most " "cases this is unproblematic: when the socket address is retrieved, it will " "be one byte longer than that supplied when the socket was bound. However, " "there is one case where confusing behavior can result: if 108 non-null bytes " @@ -1697,17 +1696,30 @@ msgid "Program source" msgstr "Código fuente" #. type: Plain text -#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron -#: opensuse-tumbleweed -#, no-wrap +#: archlinux debian-unstable opensuse-tumbleweed +#, fuzzy, no-wrap +#| msgid "" +#| "#define SOCKET_NAME \"/tmp/9Lq7BNBnBycd6nxy.socket\"\n" +#| "#define BUFFER_SIZE 12\n" msgid "" "/*\n" " * File connection.h\n" " */\n" +"#ifndef CONNECTION_H\n" +"#define CONNECTION_H\n" "\\&\n" "#define SOCKET_NAME \"/tmp/9Lq7BNBnBycd6nxy.socket\"\n" "#define BUFFER_SIZE 12\n" "\\&\n" +"#endif // include guard\n" +msgstr "" +"#define SOCKET_NAME \"/tmp/9Lq7BNBnBycd6nxy.socket\"\n" +"#define BUFFER_SIZE 12\n" + +#. type: Plain text +#: archlinux debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "" "/*\n" " * File server.c\n" " */\n" @@ -1716,20 +1728,23 @@ msgid "" "#include E<lt>stdlib.hE<gt>\n" "#include E<lt>string.hE<gt>\n" "#include E<lt>sys/socket.hE<gt>\n" +"#include E<lt>sys/types.hE<gt>\n" "#include E<lt>sys/un.hE<gt>\n" "#include E<lt>unistd.hE<gt>\n" +"\\&\n" "#include \"connection.h\"\n" "\\&\n" "int\n" -"main(int argc, char *argv[])\n" +"main(void)\n" "{\n" -" struct sockaddr_un name;\n" -" int down_flag = 0;\n" -" int ret;\n" -" int connection_socket;\n" -" int data_socket;\n" -" int result;\n" -" char buffer[BUFFER_SIZE];\n" +" int down_flag = 0;\n" +" int ret;\n" +" int connection_socket;\n" +" int data_socket;\n" +" int result;\n" +" ssize_t r, w;\n" +" struct sockaddr_un name;\n" +" char buffer[BUFFER_SIZE];\n" "\\&\n" " /* Create local socket. */\n" "\\&\n" @@ -1788,8 +1803,8 @@ msgid "" "\\&\n" " /* Wait for next data packet. */\n" "\\&\n" -" ret = read(data_socket, buffer, sizeof(buffer));\n" -" if (ret == -1) {\n" +" r = read(data_socket, buffer, sizeof(buffer));\n" +" if (r == -1) {\n" " perror(\"read\");\n" " exit(EXIT_FAILURE);\n" " }\n" @@ -1802,13 +1817,17 @@ msgid "" "\\&\n" " if (!strncmp(buffer, \"DOWN\", sizeof(buffer))) {\n" " down_flag = 1;\n" -" break;\n" +" continue;\n" " }\n" "\\&\n" " if (!strncmp(buffer, \"END\", sizeof(buffer))) {\n" " break;\n" " }\n" "\\&\n" +" if (down_flag) {\n" +" continue;\n" +" }\n" +"\\&\n" " /* Add received summand. */\n" "\\&\n" " result += atoi(buffer);\n" @@ -1817,8 +1836,8 @@ msgid "" " /* Send result. */\n" "\\&\n" " sprintf(buffer, \"%d\", result);\n" -" ret = write(data_socket, buffer, sizeof(buffer));\n" -" if (ret == -1) {\n" +" w = write(data_socket, buffer, sizeof(buffer));\n" +" if (w == -1) {\n" " perror(\"write\");\n" " exit(EXIT_FAILURE);\n" " }\n" @@ -1842,27 +1861,34 @@ msgid "" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" -"\\&\n" +msgstr "" + +#. type: Plain text +#: archlinux debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "" "/*\n" " * File client.c\n" " */\n" "\\&\n" -"#include E<lt>errno.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/socket.hE<gt>\n" +"#include E<lt>sys/types.hE<gt>\n" "#include E<lt>sys/un.hE<gt>\n" "#include E<lt>unistd.hE<gt>\n" +"\\&\n" "#include \"connection.h\"\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" -" struct sockaddr_un addr;\n" -" int ret;\n" -" int data_socket;\n" -" char buffer[BUFFER_SIZE];\n" +" int ret;\n" +" int data_socket;\n" +" ssize_t r, w;\n" +" struct sockaddr_un addr;\n" +" char buffer[BUFFER_SIZE];\n" "\\&\n" " /* Create local socket. */\n" "\\&\n" @@ -1894,9 +1920,9 @@ msgid "" "\\&\n" " /* Send arguments. */\n" "\\&\n" -" for (size_t i = 1; i E<lt> argc; ++i) {\n" -" ret = write(data_socket, argv[i], strlen(argv[i]) + 1);\n" -" if (ret == -1) {\n" +" for (int i = 1; i E<lt> argc; ++i) {\n" +" w = write(data_socket, argv[i], strlen(argv[i]) + 1);\n" +" if (w == -1) {\n" " perror(\"write\");\n" " break;\n" " }\n" @@ -1905,16 +1931,16 @@ msgid "" " /* Request result. */\n" "\\&\n" " strcpy(buffer, \"END\");\n" -" ret = write(data_socket, buffer, strlen(buffer) + 1);\n" -" if (ret == -1) {\n" +" w = write(data_socket, buffer, strlen(buffer) + 1);\n" +" if (w == -1) {\n" " perror(\"write\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Receive result. */\n" "\\&\n" -" ret = read(data_socket, buffer, sizeof(buffer));\n" -" if (ret == -1) {\n" +" r = read(data_socket, buffer, sizeof(buffer));\n" +" if (r == -1) {\n" " perror(\"read\");\n" " exit(EXIT_FAILURE);\n" " }\n" @@ -1968,16 +1994,42 @@ msgstr "10 Febrero 2023" #: debian-bookworm #, no-wrap msgid "Linux man-pages 6.03" -msgstr "Páginas de manual de Linux 6.03" +msgstr "Páginas de Manual de Linux 6.03" #. type: Plain text -#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#: debian-bookworm fedora-40 mageia-cauldron opensuse-leap-15-6 +msgid "" +"Various systems calls (for example, B<bind>(2), B<connect>(2), and " +"B<sendto>(2)) take a I<sockaddr_un> argument as input. Some other system " +"calls (for example, B<getsockname>(2), B<getpeername>(2), B<recvfrom>(2), " +"and B<accept>(2)) return an argument of this type." +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 msgid "" "This read-only socket option returns the credentials of the peer process " "connected to this socket. The returned credentials are those that were in " "effect at the time of the call to B<connect>(2) or B<socketpair>(2)." msgstr "" +#. The behavior on Solaris is quite similar. +#. type: Plain text +#: debian-bookworm fedora-40 mageia-cauldron opensuse-leap-15-6 +msgid "" +"When binding a socket to an address, Linux is one of the implementations " +"that appends a null terminator if none is supplied in I<sun_path>. In most " +"cases this is unproblematic: when the socket address is retrieved, it will " +"be one byte longer than that supplied when the socket was bound. However, " +"there is one case where confusing behavior can result: if 108 non-null bytes " +"are supplied when a socket is bound, then the addition of the null " +"terminator takes the length of the pathname beyond I<sizeof(sun_path)>. " +"Consequently, when retrieving the socket address (for example, via " +"B<accept>(2)), if the input I<addrlen> argument for the retrieving call is " +"specified as I<sizeof(struct sockaddr_un)>, then the returned address " +"structure I<won't> have a null terminator in I<sun_path>." +msgstr "" + #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap @@ -2674,16 +2726,522 @@ msgid " close(data_socket);\n" msgstr " close(data_socket);\n" #. type: TH -#: debian-unstable opensuse-tumbleweed +#: fedora-40 mageia-cauldron +#, no-wrap +msgid "2023-12-21" +msgstr "21 Diciembre 2023" + +#. type: TH +#: fedora-40 mageia-cauldron +#, no-wrap +msgid "Linux man-pages 6.06" +msgstr "Páginas de Manual de Linux 6.06" + +#. type: Plain text +#: fedora-40 mageia-cauldron +#, no-wrap +msgid "" +"/*\n" +" * File connection.h\n" +" */\n" +"\\&\n" +"#define SOCKET_NAME \"/tmp/9Lq7BNBnBycd6nxy.socket\"\n" +"#define BUFFER_SIZE 12\n" +"\\&\n" +"/*\n" +" * File server.c\n" +" */\n" +"\\&\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/socket.hE<gt>\n" +"#include E<lt>sys/un.hE<gt>\n" +"#include E<lt>unistd.hE<gt>\n" +"#include \"connection.h\"\n" +"\\&\n" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" struct sockaddr_un name;\n" +" int down_flag = 0;\n" +" int ret;\n" +" int connection_socket;\n" +" int data_socket;\n" +" int result;\n" +" char buffer[BUFFER_SIZE];\n" +"\\&\n" +" /* Create local socket. */\n" +"\\&\n" +" connection_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0);\n" +" if (connection_socket == -1) {\n" +" perror(\"socket\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /*\n" +" * For portability clear the whole structure, since some\n" +" * implementations have additional (nonstandard) fields in\n" +" * the structure.\n" +" */\n" +"\\&\n" +" memset(&name, 0, sizeof(name));\n" +"\\&\n" +" /* Bind socket to socket name. */\n" +"\\&\n" +" name.sun_family = AF_UNIX;\n" +" strncpy(name.sun_path, SOCKET_NAME, sizeof(name.sun_path) - 1);\n" +"\\&\n" +" ret = bind(connection_socket, (const struct sockaddr *) &name,\n" +" sizeof(name));\n" +" if (ret == -1) {\n" +" perror(\"bind\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /*\n" +" * Prepare for accepting connections. The backlog size is set\n" +" * to 20. So while one request is being processed other requests\n" +" * can be waiting.\n" +" */\n" +"\\&\n" +" ret = listen(connection_socket, 20);\n" +" if (ret == -1) {\n" +" perror(\"listen\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /* This is the main loop for handling connections. */\n" +"\\&\n" +" for (;;) {\n" +"\\&\n" +" /* Wait for incoming connection. */\n" +"\\&\n" +" data_socket = accept(connection_socket, NULL, NULL);\n" +" if (data_socket == -1) {\n" +" perror(\"accept\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" result = 0;\n" +" for (;;) {\n" +"\\&\n" +" /* Wait for next data packet. */\n" +"\\&\n" +" ret = read(data_socket, buffer, sizeof(buffer));\n" +" if (ret == -1) {\n" +" perror(\"read\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /* Ensure buffer is 0-terminated. */\n" +"\\&\n" +" buffer[sizeof(buffer) - 1] = 0;\n" +"\\&\n" +" /* Handle commands. */\n" +"\\&\n" +" if (!strncmp(buffer, \"DOWN\", sizeof(buffer))) {\n" +" down_flag = 1;\n" +" break;\n" +" }\n" +"\\&\n" +" if (!strncmp(buffer, \"END\", sizeof(buffer))) {\n" +" break;\n" +" }\n" +"\\&\n" +" /* Add received summand. */\n" +"\\&\n" +" result += atoi(buffer);\n" +" }\n" +"\\&\n" +" /* Send result. */\n" +"\\&\n" +" sprintf(buffer, \"%d\", result);\n" +" ret = write(data_socket, buffer, sizeof(buffer));\n" +" if (ret == -1) {\n" +" perror(\"write\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /* Close socket. */\n" +"\\&\n" +" close(data_socket);\n" +"\\&\n" +" /* Quit on DOWN command. */\n" +"\\&\n" +" if (down_flag) {\n" +" break;\n" +" }\n" +" }\n" +"\\&\n" +" close(connection_socket);\n" +"\\&\n" +" /* Unlink the socket. */\n" +"\\&\n" +" unlink(SOCKET_NAME);\n" +"\\&\n" +" exit(EXIT_SUCCESS);\n" +"}\n" +"\\&\n" +"/*\n" +" * File client.c\n" +" */\n" +"\\&\n" +"#include E<lt>errno.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/socket.hE<gt>\n" +"#include E<lt>sys/un.hE<gt>\n" +"#include E<lt>unistd.hE<gt>\n" +"#include \"connection.h\"\n" +"\\&\n" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" struct sockaddr_un addr;\n" +" int ret;\n" +" int data_socket;\n" +" char buffer[BUFFER_SIZE];\n" +"\\&\n" +" /* Create local socket. */\n" +"\\&\n" +" data_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0);\n" +" if (data_socket == -1) {\n" +" perror(\"socket\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /*\n" +" * For portability clear the whole structure, since some\n" +" * implementations have additional (nonstandard) fields in\n" +" * the structure.\n" +" */\n" +"\\&\n" +" memset(&addr, 0, sizeof(addr));\n" +"\\&\n" +" /* Connect socket to socket address. */\n" +"\\&\n" +" addr.sun_family = AF_UNIX;\n" +" strncpy(addr.sun_path, SOCKET_NAME, sizeof(addr.sun_path) - 1);\n" +"\\&\n" +" ret = connect(data_socket, (const struct sockaddr *) &addr,\n" +" sizeof(addr));\n" +" if (ret == -1) {\n" +" fprintf(stderr, \"The server is down.\\en\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /* Send arguments. */\n" +"\\&\n" +" for (size_t i = 1; i E<lt> argc; ++i) {\n" +" ret = write(data_socket, argv[i], strlen(argv[i]) + 1);\n" +" if (ret == -1) {\n" +" perror(\"write\");\n" +" break;\n" +" }\n" +" }\n" +"\\&\n" +" /* Request result. */\n" +"\\&\n" +" strcpy(buffer, \"END\");\n" +" ret = write(data_socket, buffer, strlen(buffer) + 1);\n" +" if (ret == -1) {\n" +" perror(\"write\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /* Receive result. */\n" +"\\&\n" +" ret = read(data_socket, buffer, sizeof(buffer));\n" +" if (ret == -1) {\n" +" perror(\"read\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /* Ensure buffer is 0-terminated. */\n" +"\\&\n" +" buffer[sizeof(buffer) - 1] = 0;\n" +"\\&\n" +" printf(\"Result = %s\\en\", buffer);\n" +"\\&\n" +" /* Close socket. */\n" +"\\&\n" +" close(data_socket);\n" +"\\&\n" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" + +#. type: TH +#: fedora-rawhide #, no-wrap -msgid "2023-07-15" -msgstr "15 Julio 2023" +msgid "2024-03-16" +msgstr "16 Marzo 2024" #. type: TH -#: debian-unstable opensuse-tumbleweed +#: fedora-rawhide +#, no-wrap +msgid "Linux man-pages 6.7" +msgstr "Páginas de Manual de Linux 6.7" + +#. type: Plain text +#: fedora-rawhide +#, fuzzy, no-wrap +#| msgid "" +#| "#define SOCKET_NAME \"/tmp/9Lq7BNBnBycd6nxy.socket\"\n" +#| "#define BUFFER_SIZE 12\n" +msgid "" +"/*\n" +" * File connection.h\n" +" */\n" +"\\&\n" +"#define SOCKET_NAME \"/tmp/9Lq7BNBnBycd6nxy.socket\"\n" +"#define BUFFER_SIZE 12\n" +msgstr "" +"#define SOCKET_NAME \"/tmp/9Lq7BNBnBycd6nxy.socket\"\n" +"#define BUFFER_SIZE 12\n" + +#. type: Plain text +#: fedora-rawhide +#, no-wrap +msgid "" +"/*\n" +" * File server.c\n" +" */\n" +"\\&\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/socket.hE<gt>\n" +"#include E<lt>sys/un.hE<gt>\n" +"#include E<lt>unistd.hE<gt>\n" +"\\&\n" +"#include \"connection.h\"\n" +"\\&\n" +"int\n" +"main(void)\n" +"{\n" +" int down_flag = 0;\n" +" int ret;\n" +" int connection_socket;\n" +" int data_socket;\n" +" int result;\n" +" ssize_t r, w;\n" +" struct sockaddr_un name;\n" +" char buffer[BUFFER_SIZE];\n" +"\\&\n" +" /* Create local socket. */\n" +"\\&\n" +" connection_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0);\n" +" if (connection_socket == -1) {\n" +" perror(\"socket\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /*\n" +" * For portability clear the whole structure, since some\n" +" * implementations have additional (nonstandard) fields in\n" +" * the structure.\n" +" */\n" +"\\&\n" +" memset(&name, 0, sizeof(name));\n" +"\\&\n" +" /* Bind socket to socket name. */\n" +"\\&\n" +" name.sun_family = AF_UNIX;\n" +" strncpy(name.sun_path, SOCKET_NAME, sizeof(name.sun_path) - 1);\n" +"\\&\n" +" ret = bind(connection_socket, (const struct sockaddr *) &name,\n" +" sizeof(name));\n" +" if (ret == -1) {\n" +" perror(\"bind\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /*\n" +" * Prepare for accepting connections. The backlog size is set\n" +" * to 20. So while one request is being processed other requests\n" +" * can be waiting.\n" +" */\n" +"\\&\n" +" ret = listen(connection_socket, 20);\n" +" if (ret == -1) {\n" +" perror(\"listen\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /* This is the main loop for handling connections. */\n" +"\\&\n" +" for (;;) {\n" +"\\&\n" +" /* Wait for incoming connection. */\n" +"\\&\n" +" data_socket = accept(connection_socket, NULL, NULL);\n" +" if (data_socket == -1) {\n" +" perror(\"accept\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" result = 0;\n" +" for (;;) {\n" +"\\&\n" +" /* Wait for next data packet. */\n" +"\\&\n" +" r = read(data_socket, buffer, sizeof(buffer));\n" +" if (r == -1) {\n" +" perror(\"read\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /* Ensure buffer is 0-terminated. */\n" +"\\&\n" +" buffer[sizeof(buffer) - 1] = 0;\n" +"\\&\n" +" /* Handle commands. */\n" +"\\&\n" +" if (!strncmp(buffer, \"DOWN\", sizeof(buffer))) {\n" +" down_flag = 1;\n" +" continue;\n" +" }\n" +"\\&\n" +" if (!strncmp(buffer, \"END\", sizeof(buffer))) {\n" +" break;\n" +" }\n" +"\\&\n" +" if (down_flag) {\n" +" continue;\n" +" }\n" +"\\&\n" +" /* Add received summand. */\n" +"\\&\n" +" result += atoi(buffer);\n" +" }\n" +"\\&\n" +" /* Send result. */\n" +"\\&\n" +" sprintf(buffer, \"%d\", result);\n" +" w = write(data_socket, buffer, sizeof(buffer));\n" +" if (w == -1) {\n" +" perror(\"write\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /* Close socket. */\n" +"\\&\n" +" close(data_socket);\n" +"\\&\n" +" /* Quit on DOWN command. */\n" +"\\&\n" +" if (down_flag) {\n" +" break;\n" +" }\n" +" }\n" +"\\&\n" +" close(connection_socket);\n" +"\\&\n" +" /* Unlink the socket. */\n" +"\\&\n" +" unlink(SOCKET_NAME);\n" +"\\&\n" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" + +#. type: Plain text +#: fedora-rawhide #, no-wrap -msgid "Linux man-pages 6.05.01" -msgstr "Páginas de manual de Linux 6.05.01" +msgid "" +"/*\n" +" * File client.c\n" +" */\n" +"\\&\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/socket.hE<gt>\n" +"#include E<lt>sys/un.hE<gt>\n" +"#include E<lt>unistd.hE<gt>\n" +"\\&\n" +"#include \"connection.h\"\n" +"\\&\n" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" int ret;\n" +" int data_socket;\n" +" ssize_t r, w;\n" +" struct sockaddr_un addr;\n" +" char buffer[BUFFER_SIZE];\n" +"\\&\n" +" /* Create local socket. */\n" +"\\&\n" +" data_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0);\n" +" if (data_socket == -1) {\n" +" perror(\"socket\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /*\n" +" * For portability clear the whole structure, since some\n" +" * implementations have additional (nonstandard) fields in\n" +" * the structure.\n" +" */\n" +"\\&\n" +" memset(&addr, 0, sizeof(addr));\n" +"\\&\n" +" /* Connect socket to socket address. */\n" +"\\&\n" +" addr.sun_family = AF_UNIX;\n" +" strncpy(addr.sun_path, SOCKET_NAME, sizeof(addr.sun_path) - 1);\n" +"\\&\n" +" ret = connect(data_socket, (const struct sockaddr *) &addr,\n" +" sizeof(addr));\n" +" if (ret == -1) {\n" +" fprintf(stderr, \"The server is down.\\en\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /* Send arguments. */\n" +"\\&\n" +" for (int i = 1; i E<lt> argc; ++i) {\n" +" w = write(data_socket, argv[i], strlen(argv[i]) + 1);\n" +" if (w == -1) {\n" +" perror(\"write\");\n" +" break;\n" +" }\n" +" }\n" +"\\&\n" +" /* Request result. */\n" +"\\&\n" +" strcpy(buffer, \"END\");\n" +" w = write(data_socket, buffer, strlen(buffer) + 1);\n" +" if (w == -1) {\n" +" perror(\"write\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /* Receive result. */\n" +"\\&\n" +" r = read(data_socket, buffer, sizeof(buffer));\n" +" if (r == -1) {\n" +" perror(\"read\");\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /* Ensure buffer is 0-terminated. */\n" +"\\&\n" +" buffer[sizeof(buffer) - 1] = 0;\n" +"\\&\n" +" printf(\"Result = %s\\en\", buffer);\n" +"\\&\n" +" /* Close socket. */\n" +"\\&\n" +" close(data_socket);\n" +"\\&\n" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" #. type: TH #: opensuse-leap-15-6 @@ -2695,4 +3253,10 @@ msgstr "21 Marzo 2023" #: opensuse-leap-15-6 #, no-wrap msgid "Linux man-pages 6.04" -msgstr "Linux man-pages 6.04" +msgstr "Páginas de Manual de Linux 6.04" + +#. type: TH +#: opensuse-tumbleweed +#, no-wrap +msgid "Linux man-pages (unreleased)" +msgstr "Páginas de Manual de Linux (no publicadas)" |