# French translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # Christophe Blaess , 1996-2003. # Stéphan Rafin , 2002. # Thierry Vignaud , 1999, 2002. # François Micaux, 2002. # Alain Portal , 2003-2008. # Jean-Philippe Guérard , 2005-2006. # Jean-Luc Coulon (f5ibh) , 2006-2007. # Julien Cristau , 2006-2007. # Thomas Huriaux , 2006-2008. # Nicolas François , 2006-2008. # Florentin Duneau , 2006-2010. # Simon Paillard , 2006, 2014. # Denis Barbier , 2006, 2010. # David Prévot , 2010, 2012-2014. # Jean-Philippe MENGUAL , 2020-2023. msgid "" msgstr "" "Project-Id-Version: perkamon\n" "POT-Creation-Date: 2024-06-01 06:05+0200\n" "PO-Revision-Date: 2024-03-09 17:06+0100\n" "Last-Translator: Jean-Philippe MENGUAL \n" "Language-Team: French \n" "Language: fr\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: Weblate 3.1.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 mai 2024" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.8" msgstr "Pages du manuel 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 "NOM" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "msgrcv, msgsnd - System V message queue operations" msgstr "msgrcv, msgsnd - Opérations sur les files de messages System V" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "BIBLIOTHÈQUE" #. 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 "Bibliothèque C standard (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 "SYNOPSIS" #. 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 #, no-wrap msgid "" "BIB<, const void >IB<[.>IB<], size_t >IB<,>\n" "B< int >IB<);>\n" msgstr "" "BIB<, const void >IB<[.>IB<], size_t >IB<,>\n" "B< int >IB<);>\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<, void >IB<[.>IB<], size_t >IB<, long >IB<,>\n" "B< int >IB<);>\n" msgstr "" "BIB<, void >IB<[.>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 "DESCRIPTION" #. 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 "" "Les appels système B() et B() servent respectivement à " "envoyer et à recevoir des messages d'une file de messages System V. Le " "processus appelant doit avoir une permission d'écriture sur la file pour " "envoyer un message, et une permission de lecture pour en recevoir un." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The I argument is a pointer to a caller-defined structure of the " "following general form:" msgstr "" "L'argument I est un pointeur vers une structure définie par l'appelant " "de la forme générale suivante\\ :" #. 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 "" "struct msgbuf {\n" " long mtype; /* type de message, doit être E 0 */\n" " char mtext[1]; /* contenu du message */\n" "};\n" #. 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 "" "Le champ I est un tableau (ou une autre structure) de taille " "I, valeur entière positive ou nulle. Les messages de taille nulle " "(sans champ I) sont autorisés. Le membre I doit avoir une " "valeur strictement positive qui puisse être utilisée par le processus " "lecteur pour la sélection de messages (voir la description de B() " "ci\\(hydessous)." #. 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 "" "L'appel système B() insère une copie du message pointé par " "l'argument I dans la file dont l'identifiant est indiqué par la valeur " "de l'argument I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 "" "S'il y a assez de place dans la file, B() réussit immédiatement. La " "capacité de la file est régie par le champ I de la structure " "associée à la file de messages. Durant la création de la file, ce champ est " "initialisé à B octets, mais cette limite peut être modifiée avec " "B(2). Une file de message est considérée pleine si une de ces " "conditions est remplie :" #. type: IP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "\\[bu]" msgstr "-" #. 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 "" "Après l'ajout d'un message à la file, le nombre total d'octets dans la file " "aurait dépassé la taille maximale de la file (champ I)." #. 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 "" "Après l'ajout d'un message à la file, le nombre total de messages dans la " "file aurait dépassé la taille maximale de la file (champ I)." "Cette vérification permet d'éviter qu'un nombre illimité de messages de " "taille nulle soit ajouté à la file. Bien que tels messages ne contiennent " "pas de données, ils consomment néanmoins de la mémoire du noyau, sujette à " "un verrou." #. 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 "" "S'il n'y a pas assez de place, alors le comportement par défaut de " "B() est de bloquer jusqu'à obtenir suffisamment d'espace. En " "indiquant B dans l'argument I, le message ne sera pas " "envoyé et l'appel système échouera en retournant B dans B." #. 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 "Un appel à B() bloqué peut échouer si\\ :" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "the queue is removed, in which case the system call fails with I set " "to B; or" msgstr "" "la file est supprimée, auquel cas l'appel système échoue avec I " "valant B ; ou" # NOTE: Formatting: B #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 "" "un signal a été intercepté, auquel cas l'appel système échoue avec I " "valant B ; consultez B(7). (B() n'est jamais relancé " "automatiquement après interruption par un gestionnaire de signal, quelle que " "soit la configuration de B lors de l'installation du " "gestionnaire.)" #. 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 "" "Si l'appel système réussit, la structure décrivant la file de messages est " "mise à jour comme suit." #. 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 contient le PID du processus appelant." #. 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 est incrémenté de 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 set to the current time." msgstr "I est rempli avec l'heure actuelle." #. 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 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 "" "L'appel système B() supprime un message depuis la file indiquée par " "I et le place dans le tampon pointé par I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 "" "L'argument I indique la taille maximale en octets du membre I " "de la structure pointée par l'argument I. Si le contenu du message est " "plus long que I octets, le comportement dépend de la présence ou non " "de B dans I. Si B est spécifié, alors le " "message sera tronqué (et la partie tronquée sera perdue)\\ ; si " "B n'est pas spécifié, le message ne sera pas extrait de la " "file, et l'appel système échouera en renvoyant B<-1> et en indiquant " "B dans I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Unless B is specified in I (see below), the I " "argument specifies the type of message requested, as follows:" msgstr "" "À moins que B ne soit indiqué dans I (voir ci-dessous), " "l’argument I indique le type de message désiré." #. 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 vaut B<0>, le premier message est lu." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 est supérieur à B<0>, alors le premier message de type " "I est extrait de la file. Si I contient B " "l'inverse est effectué, le premier message de type différent de I " "est extrait de la file." #. 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 est inférieur à B<0>, le premier message de la file avec un " "type le plus proche inférieur ou égal à la valeur absolue de I est " "extrait." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The I argument is a bit mask constructed by ORing together zero or " "more of the following flags:" msgstr "" "L'argument I est composé d'un I binaire «\\ |\\ » avec les " "attributs suivants." #. 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 "" "S’arrêter immédiatement si aucun message du type désiré n'est présent dans " "la file. L'appel système échoue et I est configuré à B." #. 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 (depuis 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 "" "Récupérer une copie de façon non destructive du message dans la file à la " "position ordinale indiquée par I (les messages sont considérées " "numérotés à partir de B<0>)." #. 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 "" "Cet attribut doit être indiqué en conjonction avec B, de telle " "sorte que si aucun message n’est disponible à la position donnée, l’appel " "échoue immédiatement avec l’erreur B. Parce qu'ils modifient le sens " "de I de manière opposée, B et B ne peuvent " "être définis simultanément dans I." #. 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 "" "L'attribut B a été ajouté pour l’implémentation du point de " "restauration du noyau et n’est disponible que si le noyau a été compilé avec " "l’option 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 "" "Used with I greater than 0 to read the first message in the queue " "with message type that differs from I." msgstr "" "Utilisé avec I supérieur à B<0> pour lire les messages de type " "différent 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 "Tronquer silencieusement les messages plus longs que I octets." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 aucun message du type requis n'est disponible et si on n'a pas demandé " "B dans I, le processus appelant est bloqué jusqu'à " "l'occurrence d'un des événements suivants:" #. 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 message du type désiré arrive dans la file." #. 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 file de messages est supprimée. L'appel système échoue et I " "contient 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 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 "" "Le processus appelant intercepte un signal. Dans ce cas l'appel système " "échoue avec I valant B. (B() n'est jamais relancé " "automatiquement après interruption par un gestionnaire de signal, quelle que " "soit la configuration de B lors de l'installation du " "gestionnaire.)" #. 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 est rempli avec le PID du processus appelant." #. 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 est décrémenté de 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 set to the current time." msgstr "I est rempli avec l'heure actuelle." #. 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 "VALEUR RENVOYÉE" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 cas de succès, B() renvoie B<0> et B() renvoie le nombre " "d'octets vraiment copiés dans la table I. En cas d'échec les deux " "appels système renvoient B<-1> et définissent I pour indiquer " "l'erreur." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "ERRORS" msgstr "ERREURS" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B() can fail with the following errors:" msgstr "B() peut échouer avec les valeurs suivantes :" #. 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 "" "Le processus appelant n'a pas de permission de lecture dans la file et n'a " "pas la capacité B dans l'espace de noms qui gère son espace " "de noms IPC." #. 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 can't be sent due to the I limit for the queue and " "B was specified in I." msgstr "" "Le message n'a pas pu être envoyé à cause de la limite I pour la " "file et de la requête B dans 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 "I pointe en dehors de l'espace d'adressage accessible." #. 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 file de messages a été supprimée." #. 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 "Un signal est arrivé avant d'avoir pu écrire quoi que ce soit." #. 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 "" "I est n'est pas valable, ou bien I n'est pas positif, ou bien " "I est non valable (négatif ou supérieur à la valeur B du " "système)." #. 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 system does not have enough memory to make a copy of the message pointed " "to by I." msgstr "" "Le système n'a pas assez de mémoire pour copier le message pointé par " "I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B() can fail with the following errors:" msgstr "B() peut échouer avec les valeurs suivantes :" #. 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 text length is greater than I and B isn't " "specified in I." msgstr "" "Le message est plus long que I, et B n'a pas été indiqué " "dans 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 "" "Le processus appelant n'a pas de permission de lecture dans la file et n'a " "pas la capacité B dans l'espace de noms qui gère son espace " "de noms IPC." #. 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 "" "La file de messages a été supprimée alors que le processus attendait un " "message." #. 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 process caught a " "signal; see B(7)." msgstr "" "Un signal est arrivé avant d'avoir pu lire quoi que ce soit ; consultez " "B(7)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "I was invalid, or I was less than 0." msgstr "I n'était pas valable ou I valait moins de 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 (depuis 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 "I définit B sans définir B." #. 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 "I définit à la fois B et 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 "" "B was specified in I and no message of the requested " "type existed on the message queue." msgstr "" "B a été indiqué dans I et aucun message du type réclamé " "n'existe dans la file." #. 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 "" "B et B ont été indiqués dans I et la file " "contient moins de I messages." #. 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 (depuis 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 "" "B et B ont été indiqués dans I et le noyau a " "été configuré sans B." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "STANDARDS" #. 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 "" "Les attributs B et B sont spécifiques à Linux. Leur " "définition peut être obtenue en définissant la macro de test de " "fonctionnalités B<_GNU_SOURCE>." #. type: SH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "HISTORIQUE" #. 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 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 "" "L'argument I est déclaré comme un I avec les " "bibliothèques glibc 2.0 et glibc 2.1. Il est déclaré comme un I avec " "la bibliothèque glibc 2.2, suivant ainsi les spécifications SUSv2 et SUSv3." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NOTES" msgstr "NOTES" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The following limits on message queue resources affect the B() call:" msgstr "" "Les limites suivantes concernent les files de messages et affectent l’appel " "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 "" "Taille maximale d'un message texte, en octets (valeur par défaut\\ : 8192 " "octets). Sous Linux, cette limite peut être lue et modifiée grâce au fichier " "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 "" "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 "" "Nombre maximal d'octets d'une file de messages (valeur par défaut\\ : 16384 " "octets. Sous Linux, elle peut être lue et modifiée grâce au fichier I). Un processus privilégié (sous Linux : avec la capacité " "B) peut augmenter la taille d'une file de messages au-delà " "de B en utilisant l’opération B de B(2)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 "" "L'implémentation des files de messages sous Linux n'a pas de limites système " "intrinsèques ni pour le nombre d'en\\(hytêtes de messages (B) ni " "pour la taille, en octets, de l'ensemble de tous les messages (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 "BOGUES" #. 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 "" "Jusqu'à la version Linux 3.13, si B() était appelé avec l’attribut " "B, mais sans B, et que la file de messages contenait " "moins de B messages, alors l’appel bloquait jusqu’à ce que le " "message suivant soit écrit dans la file. À ce moment là, l’appel renvoyait " "une copie du message, I la position ordinale I de " "ce message. Ce bogue est corrigé depuis Linux 3.14." #. 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 "" "Indiquer à la fois B et B dans I est une " "erreur de logique (puisque ces attributs imposent des interprétations " "différentes de I). Jusqu'à Linux 3.13, cette erreur n’était pas " "diagnostiquée par I(). Ce bogue est corrigé depuis Linux 3.14." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "EXEMPLES" #. 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 "" "Le programme ci-dessous montre l'utilisation de B() et de " "B()." #. 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 "" "Le programme d'exemple est d'abord exécuté avec l'option B<-s> pour envoyer " "un message, puis réexécuté avec l'option B<-r> pour recevoir un message." #. 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 "" "La session d'interpréteur suivant montre un échantillon d'exécution du " "programme :" #. 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 "" "$B< ./a.out -s>\n" "envoi : un message le mercredi 4 mars 2015 à 16:25:45\n" #. 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 "" "$B< ./a.out -r>\n" "message reçu : un message le mercredi 4 mars 2015 à 16:25:45\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 "Source du programme" #. 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 "" "#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, \"Utilisation : %s [options]\\en\", prog_name);\n" " fprintf(stderr, \"Les options sont :\\en\");\n" " fprintf(stderr, \"-s envoyer un message en utilisant msgsnd()\\en\");\n" " fprintf(stderr, \"-r lire un message en utilisant msgrcv()\\en\");\n" " fprintf(stderr, \"-t type de message (1 par défaut)\\en\");\n" " fprintf(stderr, \"-k clé de mise en attente du message (1234 par défaut)\\en\");\n" " exit(EXIT_FAILURE);\n" "}\n" "\\&\n" "static void\n" "send_msg(int qid, int msgtype)\n" "{\n" " time_t t;\\n\"\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(\"envoyé : %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(\"Aucun message disponible pour msgrcv()\\en\");\n" " } else {\n" " printf(\"message reçu : %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\"\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 doit être supérieur à 0\\en\");\n" " break;\n" " case \\[aq]k\\[aq]:\n" " msgkey = atoi(optarg);\n" " break;\n" " default:\n" " usage(argv[0], \"Option non reconnue\\en\");\n" " }\n" " }\n" "\\&\n" " if (mode == 0)\n" " usage(argv[0], \"doit être l'option -s ou -r\\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" #. 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 "VOIR AUSSI" #. 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 février 2023" #. type: TH #: debian-bookworm #, no-wrap msgid "Linux man-pages 6.03" msgstr "Pages du manuel 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 #, 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" msgstr "" "#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" #. 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 "" " fprintf(stderr, \"Utilisation : %s [options]\\en\", nom_prog);\n" " fprintf(stderr, \"Les options sont :\\en\");\n" " fprintf(stderr, \"-s envoyer un message en utilisant msgsnd()\\en\");\n" " fprintf(stderr, \"-r lire un message en utilisant msgrcv()\\en\");\n" " fprintf(stderr, \"-t type de message (1 par défaut)\\en\");\n" " fprintf(stderr, \"-k clé de la file de messages (1234 par défaut)\\en\");\n" " exit(EXIT_FAILURE);\n" "}\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "static void\n" "send_msg(int qid, int msgtype)\n" "{\n" " time_t t;\n" " struct msgbuf msg;\n" msgstr "" "static void\n" "send_msg(int qid, int msgtype)\n" "{\n" " time_t t;\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 "" " time(&t);\n" " snprintf(msg.mtext, sizeof(msg.mtext), \"un message à %s\",\n" " ctime(&t));\n" #. 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 "" " if (msgsnd(qid, &msg, sizeof(msg.mtext),\n" " IPC_NOWAIT) == -1)\n" " {\n" " perror(\"msgsnd error\");\n" " exit(EXIT_FAILURE);\n" " }\n" " printf(\"envoyé : %s\\en\", msg.mtext);\n" "}\n" #. 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 "" " 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(\"Aucun message disponible pour msgrcv()\\en\");\n" " } else\n" " printf(\"message reçu : %s\\en\", msg.mtext);\n" " }\n" "}\n" #. 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 "" "int\n" "main(int argc, char *argv[])\n" "{\n" " int qid, opt;\n" " int mode = 0; /* 1 = envoyé, 2 = reçu */\n" " int msgtype = 1;\n" " int msgkey = 1234;\n" #. 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 "" " while ((opt = getopt(argc, argv, \"srt:k:\")) != -1) {\n" " switch (opt) {\n" " case \\(aqs\\(aq:\n" " mode = 1;\n" " break;\n" " case \\(aqr\\(aq:\n" " mode = 2;\n" " break;\n" " case \\(aqt\\(aq:\n" " msgtype = atoi(optarg);\n" " if (msgtype E= 0)\n" " usage(argv[0], \"l'option -t doit être plus grande que 0\\en\");\n" " break;\n" " case \\(aqk\\(aq:\n" " msgkey = atoi(optarg);\n" " break;\n" " default:\n" " usage(argv[0], \"option non reconnue\\en\");\n" " }\n" " }\n" #. 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 "" " if (mode == 0)\n" " usage(argv[0], \"doit être l'option -s ou -r \\en\");\n" #. 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 octobre 2023" #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "Linux man-pages 6.06" msgstr "Pages du manuel de Linux 6.06" #. type: TH #: fedora-rawhide #, no-wrap msgid "Linux man-pages 6.7" msgstr "Pages du manuel de Linux 6.7" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "2023-03-30" msgstr "30 mars 2023" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "Linux man-pages 6.04" msgstr "Pages du manuel de Linux 6.04" #. type: TH #: opensuse-tumbleweed #, no-wrap msgid "Linux man-pages (unreleased)" msgstr "Pages du manuel de Linux (non publiées)"