# Spanish translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # Gerardo Aburruzaga García , 1998. # Miguel Pérez Ibars , 2004. msgid "" msgstr "" "Project-Id-Version: manpages-l10n\n" "POT-Creation-Date: 2024-06-01 06:05+0200\n" "PO-Revision-Date: 2004-09-17 19:53+0200\n" "Last-Translator: Miguel Pérez Ibars \n" "Language-Team: Spanish \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Lokalize 20.04.1\n" #. type: TH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "MSGOP" msgstr "MSGOP" #. type: TH #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "2024-05-02" msgstr "2 Mayo 2024" #. type: TH #: archlinux debian-unstable #, no-wrap 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 #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "NOMBRE" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "msgop - message operations" msgid "msgrcv, msgsnd - System V message queue operations" msgstr "msgop - operaciones con mensajes" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "BIBLIOTECA" #. 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 "Biblioteca Estándar C (I, I<-lc>)" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "SINOPSIS" #. 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 Esys/msg.hE>\n" msgstr "B<#include Esys/msg.hE>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "BIB<, const void *>IB<, size_t >IB<, int >IB<);>\n" msgid "" "BIB<, const void >IB<[.>IB<], size_t >IB<,>\n" "B< int >IB<);>\n" msgstr "BIB<, const void *>IB<, size_t >IB<, int >IB<);>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "BIB<, void *>IB<, size_t >IB<, long >IB<,>\n" #| "B< int >IB<);>\n" msgid "" "BIB<, void >IB<[.>IB<], size_t >IB<, long >IB<,>\n" "B< int >IB<);>\n" msgstr "" "BIB<, void *>IB<, size_t >IB<, long >IB<,>\n" "B< 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 "DESCRIPCIÓN" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B() and B() system calls are used to send messages to, " "and receive messages from, a System\\ V message queue. The calling process " "must have write permission on the message queue in order to send a message, " "and read permission to receive a message." 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 asserts none, one or more (or-ing them) of the " #| "following flags:" msgid "" "The I argument is a pointer to a caller-defined structure of the " "following general form:" msgstr "" "El argumento I continene ninguna, una o más (engarzándolas con el " "operador OR) de entre las siguientes opciones:" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "struct msgbuf {\n" " long mtype; /* message type, must be E 0 */\n" " char mtext[1]; /* message data */\n" "};\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The I field is an array (or other structure) whose size is specified " "by I, a nonnegative integer value. Messages of zero length (i.e., no " "I field) are permitted. The I field must have a strictly " "positive integer value. This value can be used by the receiving process for " "message selection (see the description of B() below)." msgstr "" "El campo B es un vector (u otra estructura) cuyo tamaño viene " "determinado por I, un valor entero no negativo. Los mensajes de " "longitud cero (p.e., sin campo I) están permitidos. El campo " "I debe tener un valor entero estrictamente positivo que puede ser " "empleado por el proceso receptor para la selección de mensaje (vea la " "sección sobre B())." #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "msgsnd()" msgstr "msgsnd()" #. 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 appends a copy of the message pointed to by " "I to the message queue whose identifier is specified by I." msgstr "" "La llamada al sistema B() añade una copia del mensaje apuntado por " "I a la cola de mensaje cuyo identificador se especifica por el valor " "de I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "If sufficient space is available on the queue, B succeeds " #| "immediately. (The queue capacity is defined by the I field in " #| "the associated data structure for the message queue. During queue " #| "creation this field is initialised to B bytes, but this limit can " #| "be modified using B.) If insufficient space is available on the " #| "queue, then the default behaviour of B is to block until space " #| "becomes available. If B is asserted in B then the " #| "call instead fails with the error B." msgid "" "If sufficient space is available in the queue, B() succeeds " "immediately. The queue capacity is governed by the I field in " "the associated data structure for the message queue. During queue creation " "this field is initialized to B bytes, but this limit can be modified " "using B(2). A message queue is considered to be full if either of " "the following conditions is true:" msgstr "" "Si hay suficiente espacio disponible en la cola, B termina con éxito " "inmediatamente. (La capacidad de la cola está definida por el campo " "I en la estructura de datos asociada a la cola de mensajes. " "Durante la creación de la cola este campo es inicializado a B bytes, " "pero este límite puede ser modificado usando B.) Si no hay " "suficiente espacio disponible en la cola, el comportamiento por defecto de " "B es bloquearse hasta que se disponga del espacio. Si B " "está contenida en B la llamada falla con el error B." #. type: IP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "\\[bu]" msgstr "\\[bu]" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Adding a new message to the queue would cause the total number of bytes in " "the queue to exceed the queue's maximum size (the I field)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Adding another message to the queue would cause the total number of messages " "in the queue to exceed the queue's maximum size (the I field). " "This check is necessary to prevent an unlimited number of zero-length " "messages being placed on the queue. Although such messages contain no data, " "they nevertheless consume (locked) kernel memory." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If insufficient space is available in the queue, then the default behavior " "of B() is to block until space becomes available. If B " "is specified in I, then the call instead fails with the error " "B." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "A blocked B() call may also fail if:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The message queue is removed from the system. In this case the system " #| "call fails with I set to B." msgid "" "the queue is removed, in which case the system call fails with I set " "to B; or" msgstr "" "La cola de mensajes se borre del sistema. En este caso la llamada al " "sistema falla con el valor B en I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "A blocked B call may also fail if the queue is removed (in which " #| "case the system call fails with I set to B), or a signal is " #| "caught (in which case the system call fails with I set to " #| "B). (B and B are never automatically restarted " #| "after being interrupted by a signal handler, regardless of the setting of " #| "the B flag when establishing a signal handler.)" msgid "" "a signal is caught, in which case the system call fails with I set to " "B;B B(7). (B() is never automatically " "restarted after being interrupted by a signal handler, regardless of the " "setting of the B flag when establishing a signal handler.)" msgstr "" "Una llamada B bloqueada puede fallar también si la cola es eliminada " "(en tal caso la llamada al sistema falla poniendo el valor B en " "I), o si se atrapa una señal (en tal caso la llamada al sistem falla " "poniendo el valor B en I). (B y B no son " "nunca reiniciadas automáticamente después de haber sido interrumpidas por un " "manejador de señales, a pesar de haber especificado la opción B " "cuando se estableció el manejador de señales.)" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Upon successful completion the message queue data structure is updated as " "follows:" msgstr "" "Tras la terminación con éxito de la llamada, la estructura de datos de la " "cola de mensajes se actualiza como sigue:" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I is set to the process ID of the calling process." msgstr "I toma el valor del PID del proceso invocador." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I is incremented by 1." msgstr "I se incrementa en una unidad." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I is set to the current time." msgstr "I toma el valor de la hora actual." #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "msgrcv()" msgstr "msgrcv()" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The system call B reads a message from the message queue " #| "specified by I into the I pointed to by the I " #| "argument, removing the read message from the queue." msgid "" "The B() system call removes a message from the queue specified by " "I and places it in the buffer pointed to by I." msgstr "" "La llamada al sistema B lee un mensaje de la cola de mensajes " "especificada por I y lo guarda en la estructura I apuntada " "por el argumento I, borrando el mensaje leido de la cola." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The argument I specifies the maximum size in bytes for the member " #| "I of the structure pointed to by the I argument. If the " #| "message text has length greater than I, then if the I " #| "argument asserts B, the message text will be truncated (and " #| "the truncated part will be lost), otherwise the message isn't removed " #| "from the queue and the system call fails returning with I set to " #| "B." msgid "" "The argument I specifies the maximum size in bytes for the member " "I of the structure pointed to by the I argument. If the " "message text has length greater than I, then the behavior depends on " "whether B is specified in I. If B is " "specified, then the message text will be truncated (and the truncated part " "will be lost); if B is not specified, then the message isn't " "removed from the queue and the system call fails returning -1 with I " "set to B." msgstr "" "El argumento I especifica el tamaño máximo en bytes para el miembro " "I de la estructura apuntada por el argumento I. Si el texto " "del mensaje tiene una longitud mayor de I, entonces si el argumento " "I contiene B, el texto del mensaje se truncará (y la " "parte truncada se perderá), y si no, el mensaje no se borra de la cola y la " "llamada al sistema falla regresando y poniendo el valor B en I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The argument I specifies the type of message requested as follows:" msgid "" "Unless B is specified in I (see below), the I " "argument specifies the type of message requested, as follows:" msgstr "" "El argumento I especifica el tipo de mensaje pedido como se muestra " "a continuación:" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "If I is 0, then the first message in the queue is read." msgstr "Si I es 0, entonces se lee el primer mensaje de la cola." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "If I is greater than B<0>, then the first message on the queue of " #| "type I is read, unless B was asserted in I, " #| "in which case the first message on the queue of type not equal to " #| "I will be read." msgid "" "If I is greater than 0, then the first message in the queue of type " "I is read, unless B was specified in I, in which " "case the first message in the queue of type not equal to I will be " "read." msgstr "" "Si I es mayor que B<0>, entonces se lee el primer mensaje en la cola " "del tipo I a menos que B estuviera contenido en " "I, en cuyo caso se lee el primer mensaje en la cola de tipo distinto " "a I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If I is less than 0, then the first message in the queue with the " "lowest type less than or equal to the absolute value of I will be " "read." msgstr "" "Si I es menor que 0, entonces se leerá el primer mensaje en la cola " "con el tipo más bajo menor o igual al valor absoluto de I." #. 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 asserts none, one or more (or-ing them) of the " #| "following flags:" msgid "" "The I argument is a bit mask constructed by ORing together zero or " "more of the following flags:" msgstr "" "El argumento I continene ninguna, una o más (engarzándolas con el " "operador OR) de entre las siguientes opciones:" #. 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 "" "Return immediately if no message of the requested type is in the queue. The " "system call fails with I set to B." msgstr "" "Para retorno inmediato si no hay en la cola ningún mensaje del tipo pedido. " "La llamada al sistema falla con el valor B en I." #. 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 3.8)" msgstr "B (desde Linux 3.8)" #. commit 4a674f34ba04a002244edaf891b5da7fc1473ae8 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Nondestructively fetch a copy of the message at the ordinal position in the " "queue specified by I (messages are considered to be numbered " "starting at 0)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This flag must be specified in conjunction with B, with the " "result that, if there is no message available at the given position, the " "call fails immediately with the error B. Because they alter the " "meaning of I in orthogonal ways, B and B may " "not both be specified in I." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B flag was added for the implementation of the kernel " "checkpoint-restore facility and is available only if the kernel was built " "with the B option." 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 "" "Used with I greater than 0 to read the first message in the queue " "with message type that differs from I." msgstr "" "Empleado con I mayor que 0 para leer el primer mensaje en la cola " "con tipo de mensaje diferente de 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 "To truncate the message text if longer than I bytes." msgstr "Para truncar el texto del mensaje si es mayor que I bytes." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "If no message of the requested type is available and B isn't " #| "asserted in I, the calling process is blocked until one of the " #| "following conditions occurs:" msgid "" "If no message of the requested type is available and B isn't " "specified in I, the calling process is blocked until one of the " "following conditions occurs:" msgstr "" "Si no hay disponible un mensaje del tipo pedido e B no está " "contenido en I, el proceso invocador se bloquea hasta que ocurra una " "de las siguientes condiciones:" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "A message of the desired type is placed in the queue." msgstr "Un mensaje del tipo deseado se ponga en la cola." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The message queue is removed from the system. In this case, the system call " "fails with I set to B." msgstr "" "La cola de mensajes se borre del sistema. En este caso la llamada al " "sistema falla con el valor B en I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "A blocked B call may also fail if the queue is removed (in which " #| "case the system call fails with I set to B), or a signal is " #| "caught (in which case the system call fails with I set to " #| "B). (B and B are never automatically restarted " #| "after being interrupted by a signal handler, regardless of the setting of " #| "the B flag when establishing a signal handler.)" msgid "" "The calling process catches a signal. In this case, the system call fails " "with I set to B. (B() is never automatically " "restarted after being interrupted by a signal handler, regardless of the " "setting of the B flag when establishing a signal handler.)" msgstr "" "Una llamada B bloqueada puede fallar también si la cola es eliminada " "(en tal caso la llamada al sistema falla poniendo el valor B en " "I), o si se atrapa una señal (en tal caso la llamada al sistem falla " "poniendo el valor B en I). (B y B no son " "nunca reiniciadas automáticamente después de haber sido interrumpidas por un " "manejador de señales, a pesar de haber especificado la opción B " "cuando se estableció el manejador de señales.)" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I is set to the process ID of the calling process." msgstr "I toma el valor del PID del proceso invocador." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I is decremented by 1." msgstr "I se decrementa en una unidad." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I is set to the current time." msgstr "I toma el valor de la hora actual." #. 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 "VALOR DEVUELTO" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "On failure both functions return -1 with I indicating the error, " #| "otherwise B() returns 0 and B() returns the number of " #| "bytes actually copied into the I array." msgid "" "On success, B() returns 0 and B() returns the number of " "bytes actually copied into the I array. On failure, both functions " "return -1, and set I to indicate the error." msgstr "" "En caso de fallo ambas funciones devuelven -1 con I indicando el " "error, en caso contrario B() devuelve 0 y B() devuelve el " "número de bytes realmente copiados en el vector 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 "ERRORES" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "When B fails, at return I will be set to one among the " #| "following values:" msgid "B() can fail with the following errors:" msgstr "" "Si B falla, cuando la función regresa, I cogerá uno de entre " "los siguientes valores:" #. 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 calling process does not have write permission on the message queue, and " "does not have the B capability in the user namespace that " "governs its IPC namespace." 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 #, fuzzy #| msgid "" #| "The message can't be sent due to the I limit for the queue " #| "and B was asserted in I." msgid "" "The message can't be sent due to the I limit for the queue and " "B was specified in I." msgstr "" "El mensaje no puede ser enviado debido al límite para la cola de " "I bytes, e B estaba contenido en 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 address pointed to by I isn't accessible." msgstr "La dirección apuntada por I no es accesible." #. 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 message queue was removed." msgstr "La cola de mensajes fue borrada." #. 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 "" "Sleeping on a full message queue condition, the process caught a signal." msgstr "" "Durmiendo a la espera de una condición de cola de mensajes llena, el proceso " "capturó una señal." #. 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 "" "Invalid I value, or nonpositive I value, or invalid I " "value (less than 0 or greater than the system value B)." msgstr "" "Valor inválido para I, o valor no positivo de I, o valor " "inválido para I (menor que 0 ó mayor que el valor del sistema " "B)." #. 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 #, fuzzy #| msgid "" #| "The system has not enough memory to make a copy of the supplied I." msgid "" "The system does not have enough memory to make a copy of the message pointed " "to by I." msgstr "" "El sistema no tiene bastante memoria para hacer una copia del I " "suministrado." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "When B fails, at return I will be set to one among the " #| "following values:" msgid "B() can fail with the following errors:" msgstr "" "Si B falla, cuando la función regresa, I tomará uno de entre " "los valores siguientes:" #. 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 #, fuzzy #| msgid "" #| "The message text length is greater than I and B isn't " #| "asserted in I." msgid "" "The message text length is greater than I and B isn't " "specified in I." msgstr "" "La longitud del texto del mensaje es mayor que I y B no " "está contenido en I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The calling process does not have read permission on the message queue, and " "does not have the B capability in the user namespace that " "governs its IPC namespace." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "While the process was sleeping to receive a message, the message queue was " "removed." msgstr "" "Mientras el proceso estaba durmiento en espera de recibir un mensaje, la " "cola de mensajes fue borrada." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "While the process was sleeping to receive a message, the process received " #| "a signal that had to be caught." msgid "" "While the process was sleeping to receive a message, the process caught a " "signal; see B(7)." msgstr "" "Mientras el proceso estaba durmiento en espera de recibir un mensaje, el " "proceso recibió una señal que tuvo que ser capturada." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "Illegal I value, or I less than B<0>." msgid "I was invalid, or I was less than 0." msgstr "Valor ilegal de I, o I menor que B<0>." #. 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 3.14)" msgstr "B (desde Linux 3.14)" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I specified B, but not B." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I specified both B and B." 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 #, fuzzy #| msgid "" #| "B was asserted in I and no message of the requested " #| "type existed on the message queue." msgid "" "B was specified in I and no message of the requested " "type existed on the message queue." msgstr "" "B estaba contenido en I y no existía ningún mensaje del " "tipo requerido en la cola de mensajes." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B and B were specified in I and the queue " "contains less than I messages." msgstr "" #. 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 3.8)" msgstr "B (desde Linux 3.8)" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Both B and B were specified in I, and this " "kernel was configured without B." 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 "ESTÁNDARES" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "POSIX.1-2008." msgstr "POSIX.1-2008." #. MSG_COPY since glibc 2.18 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B and B flags are Linux-specific; their " "definitions can be obtained by defining the B<_GNU_SOURCE> feature test " "macro." msgstr "" #. type: SH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "HISTORIAL" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "POSIX.1-2001, SVr4." msgstr "POSIX.1-2001, SVr4." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The pointer argument is declared as I with libc4, libc5, " #| "glibc 2.0, glibc 2.1. It is declared as I (I for " #| "I) with glibc 2.2, following the SUSv2." msgid "" "The I argument is declared as I in glibc 2.0 and " "2.1. It is declared as I in glibc 2.2 and later, as required by " "SUSv2 and SUSv3." msgstr "" "El argumento de tipo puntero está declarado como I en " "libc4, libc5, glibc 2.0, glibc 2.1. Está declarado como I (I para I) en glibc 2.2, siguiendo el estándar SUSv2." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NOTES" msgstr "NOTAS" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "The followings are system limits affecting a B system call:" msgid "" "The following limits on message queue resources affect the B() call:" msgstr "" "Los siguientes son límites del sistema que afectan a la llamada al sistema " "B:" #. 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 "" "Maximum size of a message text, in bytes (default value: 8192 bytes). On " "Linux, this limit can be read and modified via I." 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 "" "Maximum number of bytes that can be held in a message queue (default value: " "16384 bytes). On Linux, this limit can be read and modified via I. A privileged process (Linux: a process with the " "B capability) can increase the size of a message queue " "beyond B using the B(2) B operation." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The implementation has no intrinsic limits for the system wide maximum " #| "number of message headers (B) and for the system wide maximum " #| "size in bytes of the message pool (B)." msgid "" "The implementation has no intrinsic system-wide limits on the number of " "message headers (B) and the number of bytes in the message pool " "(B)." msgstr "" "La implementación no tiene límites intrínsecos para el número máximo, del " "sistema, de cabeceras de mensaje (B) ni para el tamaño máximo, del " "sistema, en bytes, de la zona común de mensajes (B)." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "BUGS" msgstr "ERRORES" #. http://marc.info/?l=linux-kernel&m=139048542803605&w=2 #. commit 4f87dac386cc43d5525da7a939d4b4e7edbea22c #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "In Linux 3.13 and earlier, if B() was called with the B " "flag, but without B, and the message queue contained less than " "I messages, then the call would block until the next message is " "written to the queue. At that point, the call would return a copy of the " "message, I of whether that message was at the ordinal position " "I. This bug is fixed in Linux 3.14." msgstr "" #. http://marc.info/?l=linux-kernel&m=139048542803605&w=2 #. commit 4f87dac386cc43d5525da7a939d4b4e7edbea22c #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Specifying both B and B in I is a logical " "error (since these flags impose different interpretations on I). In " "Linux 3.13 and earlier, this error was not diagnosed by B(). This " "bug is fixed in Linux 3.14." 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 "EJEMPLOS" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "The program below demonstrates the use of B() and B()." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The example program is first run with the B<-s> option to send a message and " "then run again with the B<-r> option to receive a message." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "The following shell session shows a sample run 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< ./a.out -s>\n" "sent: a message at Wed Mar 4 16:25:45 2015\n" 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< ./a.out -r>\n" "message received: a message at Wed Mar 4 16:25:45 2015\n" 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 "Código fuente" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "" "#include Eerrno.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/ipc.hE\n" "#include Esys/msg.hE\n" "#include Etime.hE\n" "#include Eunistd.hE\n" "\\&\n" "struct msgbuf {\n" " long mtype;\n" " char mtext[80];\n" "};\n" "\\&\n" "static void\n" "usage(char *prog_name, char *msg)\n" "{\n" " if (msg != NULL)\n" " fputs(msg, stderr);\n" "\\&\n" " fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n" " fprintf(stderr, \"Options are:\\en\");\n" " fprintf(stderr, \"-s send message using msgsnd()\\en\");\n" " fprintf(stderr, \"-r read message using msgrcv()\\en\");\n" " fprintf(stderr, \"-t message type (default is 1)\\en\");\n" " fprintf(stderr, \"-k message queue key (default is 1234)\\en\");\n" " exit(EXIT_FAILURE);\n" "}\n" "\\&\n" "static void\n" "send_msg(int qid, int msgtype)\n" "{\n" " time_t t;\n" " struct msgbuf msg;\n" "\\&\n" " msg.mtype = msgtype;\n" "\\&\n" " time(&t);\n" " snprintf(msg.mtext, sizeof(msg.mtext), \"a message at %s\",\n" " ctime(&t));\n" "\\&\n" " if (msgsnd(qid, &msg, sizeof(msg.mtext),\n" " IPC_NOWAIT) == -1)\n" " {\n" " perror(\"msgsnd error\");\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"sent: %s\\en\", msg.mtext);\n" "}\n" "\\&\n" "static void\n" "get_msg(int qid, int msgtype)\n" "{\n" " struct msgbuf msg;\n" "\\&\n" " if (msgrcv(qid, &msg, sizeof(msg.mtext), msgtype,\n" " MSG_NOERROR | IPC_NOWAIT) == -1) {\n" " if (errno != ENOMSG) {\n" " perror(\"msgrcv\");\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"No message available for msgrcv()\\en\");\n" " } else {\n" " printf(\"message received: %s\\en\", msg.mtext);\n" " }\n" "}\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int qid, opt;\n" " int mode = 0; /* 1 = send, 2 = receive */\n" " int msgtype = 1;\n" " int msgkey = 1234;\n" "\\&\n" " while ((opt = getopt(argc, argv, \"srt:k:\")) != -1) {\n" " switch (opt) {\n" " case \\[aq]s\\[aq]:\n" " mode = 1;\n" " break;\n" " case \\[aq]r\\[aq]:\n" " mode = 2;\n" " break;\n" " case \\[aq]t\\[aq]:\n" " msgtype = atoi(optarg);\n" " if (msgtype E= 0)\n" " usage(argv[0], \"-t option must be greater than 0\\en\");\n" " break;\n" " case \\[aq]k\\[aq]:\n" " msgkey = atoi(optarg);\n" " break;\n" " default:\n" " usage(argv[0], \"Unrecognized option\\en\");\n" " }\n" " }\n" "\\&\n" " if (mode == 0)\n" " usage(argv[0], \"must use either -s or -r option\\en\");\n" "\\&\n" " qid = msgget(msgkey, IPC_CREAT | 0666);\n" "\\&\n" " if (qid == -1) {\n" " perror(\"msgget\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (mode == 2)\n" " get_msg(qid, msgtype);\n" " else\n" " send_msg(qid, msgtype);\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 "VÉASE TAMBIÉN" #. 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), B(7), B(7), " "B(7)" msgstr "" "B(2), B(2), B(7), B(7), " "B(7)" #. type: TH #: debian-bookworm #, no-wrap msgid "2023-02-05" msgstr "5 Febrero 2023" #. type: TH #: debian-bookworm #, no-wrap msgid "Linux man-pages 6.03" msgstr "Páginas de Manual de Linux 6.03" #. type: Plain text #: debian-bookworm msgid "POSIX.1-2001, POSIX.1-2008, SVr4." msgstr "POSIX.1-2001, POSIX.1-2008, SVr4." #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| "#include Estdio.hE\n" #| "#include Estdlib.hE\n" #| "#include Estring.hE\n" #| "#include Etime.hE\n" #| "#include Eunistd.hE\n" #| "#include Eerrno.hE\n" #| "#include Esys/types.hE\n" #| "#include Esys/ipc.hE\n" #| "#include Esys/msg.hE\n" msgid "" "#include Eerrno.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/ipc.hE\n" "#include Esys/msg.hE\n" "#include Etime.hE\n" "#include Eunistd.hE\n" msgstr "" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "#include Etime.hE\n" "#include Eunistd.hE\n" "#include Eerrno.hE\n" "#include Esys/types.hE\n" "#include Esys/ipc.hE\n" "#include Esys/msg.hE\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "struct msgbuf {\n" " long mtype;\n" " char mtext[80];\n" "};\n" msgstr "" "struct msgbuf {\n" " long mtype;\n" " char mtext[80];\n" "};\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "static void\n" "usage(char *prog_name, char *msg)\n" "{\n" " if (msg != NULL)\n" " fputs(msg, stderr);\n" msgstr "" "static void\n" "usage(char *prog_name, char *msg)\n" "{\n" " if (msg != NULL)\n" " fputs(msg, stderr);\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n" " fprintf(stderr, \"Options are:\\en\");\n" " fprintf(stderr, \"-s send message using msgsnd()\\en\");\n" " fprintf(stderr, \"-r read message using msgrcv()\\en\");\n" " fprintf(stderr, \"-t message type (default is 1)\\en\");\n" " fprintf(stderr, \"-k message queue key (default is 1234)\\en\");\n" " exit(EXIT_FAILURE);\n" "}\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, fuzzy, no-wrap #| msgid "" #| "static void\n" #| "get_msg(int qid, int msgtype)\n" #| "{\n" #| " struct msgbuf msg;\n" msgid "" "static void\n" "send_msg(int qid, int msgtype)\n" "{\n" " time_t t;\n" " struct msgbuf msg;\n" msgstr "" "static void\n" "get_msg(int qid, int msgtype)\n" "{\n" " struct msgbuf msg;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " msg.mtype = msgtype;\n" msgstr " msg.mtype = msgtype;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " time(&t);\n" " snprintf(msg.mtext, sizeof(msg.mtext), \"a message at %s\",\n" " ctime(&t));\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (msgsnd(qid, &msg, sizeof(msg.mtext),\n" " IPC_NOWAIT) == -1)\n" " {\n" " perror(\"msgsnd error\");\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"sent: %s\\en\", msg.mtext);\n" "}\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "static void\n" "get_msg(int qid, int msgtype)\n" "{\n" " struct msgbuf msg;\n" msgstr "" "static void\n" "get_msg(int qid, int msgtype)\n" "{\n" " struct msgbuf msg;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (msgrcv(qid, &msg, sizeof(msg.mtext), msgtype,\n" " MSG_NOERROR | IPC_NOWAIT) == -1) {\n" " if (errno != ENOMSG) {\n" " perror(\"msgrcv\");\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"No message available for msgrcv()\\en\");\n" " } else {\n" " printf(\"message received: %s\\en\", msg.mtext);\n" " }\n" "}\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "int\n" "main(int argc, char *argv[])\n" "{\n" " int qid, opt;\n" " int mode = 0; /* 1 = send, 2 = receive */\n" " int msgtype = 1;\n" " int msgkey = 1234;\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " while ((opt = getopt(argc, argv, \"srt:k:\")) != -1) {\n" " switch (opt) {\n" " case \\[aq]s\\[aq]:\n" " mode = 1;\n" " break;\n" " case \\[aq]r\\[aq]:\n" " mode = 2;\n" " break;\n" " case \\[aq]t\\[aq]:\n" " msgtype = atoi(optarg);\n" " if (msgtype E= 0)\n" " usage(argv[0], \"-t option must be greater than 0\\en\");\n" " break;\n" " case \\[aq]k\\[aq]:\n" " msgkey = atoi(optarg);\n" " break;\n" " default:\n" " usage(argv[0], \"Unrecognized option\\en\");\n" " }\n" " }\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (mode == 0)\n" " usage(argv[0], \"must use either -s or -r option\\en\");\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " qid = msgget(msgkey, IPC_CREAT | 0666);\n" msgstr " qid = msgget(msgkey, IPC_CREAT | 0666);\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (qid == -1) {\n" " perror(\"msgget\");\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " if (qid == -1) {\n" " perror(\"msgget\");\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (mode == 2)\n" " get_msg(qid, msgtype);\n" " else\n" " send_msg(qid, msgtype);\n" msgstr "" " if (mode == 2)\n" " get_msg(qid, msgtype);\n" " else\n" " send_msg(qid, msgtype);\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 Octubre 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: TH #: fedora-rawhide #, no-wrap msgid "Linux man-pages 6.7" msgstr "Páginas de Manual de Linux 6.7" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "2023-03-30" msgstr "30 Marzo 2023" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "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)"