# 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. # Denis Barbier , 2006, 2010. # David Prévot , 2010, 2012-2014. # Thomas Vincent , 2018. # Jean-Pierre Giraud , 2024. msgid "" msgstr "" "Project-Id-Version: manpages-l10n 4.21.0\n" "POT-Creation-Date: 2024-06-01 05:56+0200\n" "PO-Revision-Date: 2024-02-25 19:15+0100\n" "Last-Translator: Jean-Pierre Giraud \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: Poedit 1.8.11\n" #. type: TH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "inotify" msgstr "inotify" #. 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 "inotify - monitoring filesystem events" msgstr "inotify - Surveiller les événements des systèmes de fichiers" #. 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 I API provides a mechanism for monitoring filesystem events. " "Inotify can be used to monitor individual files, or to monitor directories. " "When a directory is monitored, inotify will return events for the directory " "itself, and for files inside the directory." msgstr "" "L'API I fournit un mécanisme pour surveiller les événements au " "niveau des systèmes de fichiers. Inotify peut être utilisé pour surveiller " "des fichiers individuels ou des répertoires. Quand un répertoire est " "surveillé, inotify va signaler des événements pour le répertoire lui-même et " "pour les fichiers de ce répertoire." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "The following system calls are used with this API:" msgstr "" "Les appels système suivants sont utilisés avec cette interface de " "programmation :" #. 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 "" "B(2) creates an inotify instance and returns a file " "descriptor referring to the inotify instance. The more recent " "B(2) is like B(2), but has a I argument " "that provides access to some extra functionality." msgstr "" "B(2) crée une instance inotify et renvoie un descripteur de " "fichier se référant à cette instance inotify. L'appel système plus récent " "B(2) est comme B(2), mais a un argument " "I qui fournit un accès à des fonctionnalités supplémentaires." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B(2) manipulates the \"watch list\" associated with an " "inotify instance. Each item (\"watch\") in the watch list specifies the " "pathname of a file or directory, along with some set of events that the " "kernel should monitor for the file referred to by that pathname. " "B(2) either creates a new watch item, or modifies an " "existing watch. Each watch has a unique \"watch descriptor\", an integer " "returned by B(2) when the watch is created." msgstr "" "B(2) manipule la «\\ liste de surveillance\\ » associée à " "une instance inotify. Chaque élément («\\ watch\\ ») de la liste de " "surveillance indique le chemin d'un fichier ou d'un répertoire, avec un " "ensemble d'événements que le noyau doit surveiller pour le fichier indiqué " "par ce chemin. B(2) crée un nouvel élément de " "surveillance ou modifie un élément existant. Chaque élément a un unique «\\ " "descripteur de surveillance\\ », un entier renvoyé par " "B(2) lorsque cet élément est créé." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "When events occur for monitored files and directories, those events are made " "available to the application as structured data that can be read from the " "inotify file descriptor using B(2) (see below)." msgstr "" "Quand les événements ont lieu pour des fichiers et répertoires surveillés, " "ces événements sont rendus disponibles à l’application comme des données " "structurées qui peuvent être lues depuis le descripteur de fichier inotify " "en utilisant B(2) (voir plus bas)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B(2) removes an item from an inotify watch list." msgstr "" "B(2) retire un élément d'une liste de surveillance inotify." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "When all file descriptors referring to an inotify instance have been closed " "(using B(2)), the underlying object and its resources are freed for " "reuse by the kernel; all associated watches are automatically freed." msgstr "" "Quand tous les descripteurs de fichier se référant à une instance inotify " "ont été fermés (en utilisant B(2)), l'objet sous-jacent et ses " "ressources sont libérés pour être réutilisés par le noyau\\ ; tous les " "éléments de surveillance associés sont automatiquement libérés." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "With careful programming, an application can use inotify to efficiently " "monitor and cache the state of a set of filesystem objects. However, robust " "applications should allow for the fact that bugs in the monitoring logic or " "races of the kind described below may leave the cache inconsistent with the " "filesystem state. It is probably wise to do some consistency checking, and " "rebuild the cache when inconsistencies are detected." msgstr "" "Avec une programmation prudente, une application peut utiliser inotify pour " "surveiller et mettre en cache efficacement l’état d’un ensemble d’objets de " "système de fichiers. Cependant, les applications robustes devraient prendre " "en compte que des bogues dans la logique de surveillance ou des situations " "de compétition du type décrit ci-dessous pourraient laisser le cache " "incohérent avec l’état du système de fichiers. Réaliser des vérifications de " "cohérence et reconstruire le cache en cas de détection d’incohérences serait " "sans doute sage." #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Reading events from an inotify file descriptor" msgstr "Lecture d’événements d’un descripteur de fichier inotify" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "To determine what events have occurred, an application B(2)s from the " "inotify file descriptor. If no events have so far occurred, then, assuming " "a blocking file descriptor, B(2) will block until at least one event " "occurs (unless interrupted by a signal, in which case the call fails with " "the error B; see B(7))." msgstr "" "Pour déterminer quels événements ont eu lieu, une application va lire avec " "B(2) le descripteur de fichier inotify. Si aucun événement n'a eu " "lieu, alors, en supposant qu'il s'agisse d'un descripteur de fichier " "bloquant, B(2) se bloquera jusqu'à ce qu'au moins un événement ait " "lieu (à moins qu'elle ne soit interrompue par un signal, auquel cas l'appel " "échouera avec l'erreur B ; consultez B(7))." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Each successful B(2) returns a buffer containing one or more of the " "following structures:" msgstr "" "Chaque lecture (avec B(2)) réussie renvoie un tampon contenant une ou " "plusieurs des structures suivantes\\ :" #. #-#-#-#-# archlinux: inotify.7.pot (PACKAGE VERSION) #-#-#-#-# #. FIXME . The type of the 'wd' field should probably be "int32_t". #. I submitted a patch to fix this. See the LKML thread #. "[patch] Fix type errors in inotify interfaces", 18 Nov 2008 #. glibc bug filed: https://www.sourceware.org/bugzilla/show_bug.cgi?id=7040 #. type: Plain text #. #-#-#-#-# debian-bookworm: inotify.7.pot (PACKAGE VERSION) #-#-#-#-# #. FIXME . The type of the 'wd' field should probably be "int32_t". #. I submitted a patch to fix this. See the LKML thread #. "[patch] Fix type errors in inotify interfaces", 18 Nov 2008 #. glibc bug filed: http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040 #. type: Plain text #. #-#-#-#-# debian-unstable: inotify.7.pot (PACKAGE VERSION) #-#-#-#-# #. FIXME . The type of the 'wd' field should probably be "int32_t". #. I submitted a patch to fix this. See the LKML thread #. "[patch] Fix type errors in inotify interfaces", 18 Nov 2008 #. glibc bug filed: https://www.sourceware.org/bugzilla/show_bug.cgi?id=7040 #. type: Plain text #. #-#-#-#-# fedora-40: inotify.7.pot (PACKAGE VERSION) #-#-#-#-# #. FIXME . The type of the 'wd' field should probably be "int32_t". #. I submitted a patch to fix this. See the LKML thread #. "[patch] Fix type errors in inotify interfaces", 18 Nov 2008 #. glibc bug filed: https://www.sourceware.org/bugzilla/show_bug.cgi?id=7040 #. type: Plain text #. #-#-#-#-# fedora-rawhide: inotify.7.pot (PACKAGE VERSION) #-#-#-#-# #. FIXME . The type of the 'wd' field should probably be "int32_t". #. I submitted a patch to fix this. See the LKML thread #. "[patch] Fix type errors in inotify interfaces", 18 Nov 2008 #. glibc bug filed: https://www.sourceware.org/bugzilla/show_bug.cgi?id=7040 #. type: Plain text #. #-#-#-#-# mageia-cauldron: inotify.7.pot (PACKAGE VERSION) #-#-#-#-# #. FIXME . The type of the 'wd' field should probably be "int32_t". #. I submitted a patch to fix this. See the LKML thread #. "[patch] Fix type errors in inotify interfaces", 18 Nov 2008 #. glibc bug filed: https://www.sourceware.org/bugzilla/show_bug.cgi?id=7040 #. type: Plain text #. #-#-#-#-# opensuse-leap-15-6: inotify.7.pot (PACKAGE VERSION) #-#-#-#-# #. FIXME . The type of the 'wd' field should probably be "int32_t". #. I submitted a patch to fix this. See the LKML thread #. "[patch] Fix type errors in inotify interfaces", 18 Nov 2008 #. glibc bug filed: https://www.sourceware.org/bugzilla/show_bug.cgi?id=7040 #. type: Plain text #. #-#-#-#-# opensuse-tumbleweed: inotify.7.pot (PACKAGE VERSION) #-#-#-#-# #. FIXME . The type of the 'wd' field should probably be "int32_t". #. I submitted a patch to fix this. See the LKML thread #. "[patch] Fix type errors in inotify interfaces", 18 Nov 2008 #. glibc bug filed: https://www.sourceware.org/bugzilla/show_bug.cgi?id=7040 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "struct inotify_event {\n" " int wd; /* Watch descriptor */\n" " uint32_t mask; /* Mask describing event */\n" " uint32_t cookie; /* Unique cookie associating related\n" " events (for rename(2)) */\n" " uint32_t len; /* Size of I field */\n" " char name[]; /* Optional null-terminated name */\n" "};\n" msgstr "" "struct inotify_event {\n" " int wd; /* Descripteur de surveillance */\n" " uint32_t mask; /* Masque décrivant l’événement */\n" " uint32_t cookie; /* Cookie unique d'association des\n" " événements (pour rename(2)) */\n" " uint32_t len; /* Taille du champ I */\n" " char name[]; /* Nom optionnel terminé par un nul */\n" "};\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "I identifies the watch for which this event occurs. It is one of the " "watch descriptors returned by a previous call to B(2)." msgstr "" "I identifie l'élément de surveillance pour lequel cet événement a lieu. " "Il s'agit de l'un des descripteurs de surveillance renvoyés par un précédent " "appel à B(2)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "I contains bits that describe the event that occurred (see below)." msgstr "" "I contient des bits qui décrivent l'événement qui a eu lieu (voir ci-" "dessous)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "I is a unique integer that connects related events. Currently, this " "is used only for rename events, and allows the resulting pair of " "B and B events to be connected by the " "application. For all other event types, I is set to 0." msgstr "" "I est un entier unique qui relie les événements. Ce n'est " "actuellement utilisé que pour les événements de renommage, et permet à la " "paire d'événements B et B en résultant d'être " "associée par l'application. Pour tous les autres types d'événements, " "I est mis à 0." #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The I field is present only when an event is returned for a file " "inside a watched directory; it identifies the filename within the watched " "directory. This filename is null-terminated, and may include further null " "bytes (\\[aq]\\e0\\[aq]) to align subsequent reads to a suitable address " "boundary." msgstr "" "Le champ I n'est présent que lorsqu'un événement est renvoyé pour un " "fichier au sein d'un répertoire surveillé. Il identifie le chemin du fichier " "dans le répertoire surveillé. Ce chemin est terminé par un caractère NULL et " "peut inclure d'autres octets nuls («\\ \\e0\\ ») pour ajuster des lectures " "successives à une limite d'adressage convenable." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The I field counts all of the bytes in I, including the null " "bytes; the length of each I structure is thus I." msgstr "" "Le champ I compte tous les octets de I, incluant les caractères " "nuls. La longueur de chaque structure I vaut donc " "I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The behavior when the buffer given to B(2) is too small to return " "information about the next event depends on the kernel version: before Linux " "2.6.21, B(2) returns 0; since Linux 2.6.21, B(2) fails with " "the error B. Specifying a buffer of size" msgstr "" "Le comportement, lorsque le tampon donné à B(2) est trop petit pour " "renvoyer l'information sur le prochain événement, dépend de la version du " "noyau\\ : avant Linux 2.6.21, B(2) renvoie B<0> ; depuis Linux 2.6.21, " "B(2) échoue avec l'erreur B. Indiquer un tampon de taille" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "sizeof(struct inotify_event) + NAME_MAX + 1\n" msgstr "sizeof(struct inotify_event) + NAME_MAX + 1\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "will be sufficient to read at least one event." msgstr "est suffisant pour lire au moins un événement." #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "inotify events" msgstr "Événements inotify" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B(2) I argument and the I field of the " "I structure returned when B(2)ing an inotify file " "descriptor are both bit masks identifying inotify events. The following " "bits can be specified in I when calling B(2) and " "may be returned in the I field returned by B(2):" msgstr "" "L'argument I passé à B(2) et le champ I de la " "structure I renvoyés lors de la lecture avec B(2) d'un " "descripteur de fichier inotify sont tous deux des masques binaires " "identifiant les événements inotify. Les bits suivants peuvent être définis " "dans l'argument I lors de l'appel à B(2) et peuvent " "être renvoyés dans le champ I renvoyé par B(2)." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B (+)" msgstr "B (+)" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "File was accessed (e.g., B(2), B(2))." msgstr "Accès au fichier (par exemple B(2), B(2))." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B (*)" msgstr "B (*)" #. FIXME . #. Events do not occur for link count changes on a file inside a monitored #. directory. This differs from other metadata changes for files inside #. a monitored directory. #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Metadata changed\\[em]for example, permissions (e.g., B(2)), " "timestamps (e.g., B(2)), extended attributes (B(2)), " "link count (since Linux 2.6.25; e.g., for the target of B(2) and for " "B(2)), and user/group ID (e.g., B(2))." msgstr "" "Modification des métadonnées, par exemple, les permissions (par exemple " "B(2)), les horodatages (par exemple B(2)), les attributs " "étendus (B(2)), le compteur de liens (depuis Linux 2.6.25 ; par " "exemple pour la cible de B(2) et B(2)) et les UID ou GID (par " "exemple B(2))." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B (+)" msgstr "B (+)" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "File opened for writing was closed." msgstr "Fichier ouvert en écriture fermé." #. 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 "File or directory not opened for writing was closed." msgstr "Fichier ou répertoire non ouverts en écriture fermés." #. 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 "" "File/directory created in watched directory (e.g., B(2) B, " "B(2), B(2), B(2), B(2) on a UNIX domain socket)." msgstr "" "Fichier ou répertoire créés dans le répertoire surveillé (par exemple " "B(2) B, B(2), B(2), B(2), B(2) " "sur un socket de domaine UNIX)." #. 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 "File/directory deleted from watched directory." msgstr "Fichier ou répertoire supprimés dans le répertoire surveillé." #. 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 "" "Watched file/directory was itself deleted. (This event also occurs if an " "object is moved to another filesystem, since B(1) in effect copies the " "file to the other filesystem and then deletes it from the original " "filesystem.) In addition, an B event will subsequently be " "generated for the watch descriptor." msgstr "" "Fichier ou répertoire surveillés supprimés (cet événement se produit " "également si un objet est déplacé vers un autre système de fichiers, puisque " "B(1) copie effectivement le fichier vers l’autre système de fichiers " "puis le supprime du système de fichiers d’origine). De plus, un événement " "B sera ensuite généré pour le descripteur de surveillance." #. 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 "File was modified (e.g., B(2), B(2))." msgstr "Fichier modifié (par exemple B(2), B(2))." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Watched file/directory was itself moved." msgstr "Fichier ou répertoire surveillés déplacés." #. 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 "" "Generated for the directory containing the old filename when a file is " "renamed." msgstr "" "Généré pour le répertoire contenant l'ancien nom quand un fichier est " "renommé." #. 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 "" "Generated for the directory containing the new filename when a file is " "renamed." msgstr "" "Généré pour le répertoire contenant le nouveau nom quand un fichier est " "renommé." #. 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 "File or directory was opened." msgstr "Fichier ou répertoire ouvert." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Inotify monitoring is inode-based: when monitoring a file (but not when " "monitoring the directory containing a file), an event can be generated for " "activity on any link to the file (in the same or a different directory)." msgstr "" "La surveillance par Inotify est basée sur les inodes : lorsqu'un fichier est " "surveillé (mais pas lors de la surveillance d'un répertoire contenant un " "fichier), un événement peut être créé sur tout lien vers le fichier (dans le " "même répertoire ou dans un répertoire différent)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "When monitoring a directory:" msgstr "Lors de la surveillance d'un répertoire :" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "the events marked above with an asterisk (*) can occur both for the " "directory itself and for objects inside the directory; and" msgstr "" "les événements marqués précédemment par un astérisque (*) peuvent avoir lieu " "à la fois pour le répertoire et pour les objets à l’intérieur du répertoire ;" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "the events marked with a plus sign (+) occur only for objects inside the " "directory (not for the directory itself)." msgstr "" "les événements marqués par un signe plus (+) n’ont lieu que pour les objets " "à l’intérieur du répertoire (et non pour le répertoire lui-même)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "I: when monitoring a directory, events are not generated for the files " "inside the directory when the events are performed via a pathname (i.e., a " "link) that lies outside the monitored directory." msgstr "" "I : lorsqu'un répertoire est surveillé, les événements ne sont pas " "créés pour les fichiers contenus dans le répertoire quand des événements " "sont exécutés avec un nom de chemin (par exemple, un lien) qui se trouve " "hors du répertoire surveillé." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "When events are generated for objects inside a watched directory, the " "I field in the returned I structure identifies the name " "of the file within the directory." msgstr "" "Lorsque les événements sont créés pour les objets dans un répertoire " "surveillé, le champ I dans la structure I renvoyée " "identifie le nom du fichier dans ce répertoire." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B macro is defined as a bit mask of all of the above " "events. This macro can be used as the I argument when calling " "B(2)." msgstr "" "La macro B est définie comme un masque binaire de tous les " "événements décrits ci-dessus. Cette macro peut être utilisée comme " "l'argument I lors de l'appel à B(2)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Two additional convenience macros are defined:" msgstr "Deux macros supplémentaires de convenance sont définies :" #. 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 "Equates to B." msgstr "Équivalent à 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 "Equates to B." msgstr "Équivalent à B." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The following further bits can be specified in I when calling " "B(2):" msgstr "" "Les bits supplémentaires suivants peuvent être indiqués dans l'argument " "I lors de l'appel à B(2)\\ :" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 2.6.15)" msgstr "B (depuis Linux 2.6.15)" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Don't dereference I if it is a symbolic link." msgstr "Ne pas déréférencer I s'il s'agit d'un lien symbolique." #. 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 2.6.36)" msgstr "B (depuis Linux 2.6.36)" #. commit 8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "By default, when watching events on the children of a directory, events are " "generated for children even after they have been unlinked from the " "directory. This can result in large numbers of uninteresting events for " "some applications (e.g., if watching I, in which many applications " "create temporary files whose names are immediately unlinked). Specifying " "B changes the default behavior, so that events are not " "generated for children after they have been unlinked from the watched " "directory." msgstr "" "Par défaut, lors de la surveillance d'événements sur les entrées d'un " "répertoire, des événements sont créés pour ces entrées même après leur " "suppression du répertoire. De nombreux événements inintéressants pour " "certaines applications peuvent ainsi être créés (par exemple, lors de la " "surveillance de I, où de nombreuses applications créent des fichiers " "temporaires donc les noms sont immédiatement supprimés). Indiquer " "B modifie le comportement par défaut, de telle sorte " "qu'aucun événement n'est créé pour ces entrées après leur suppression du " "répertoire surveillé." #. 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 "" "If a watch instance already exists for the filesystem object corresponding " "to I, add (OR) the events in I to the watch mask (instead of " "replacing the mask); the error B results if B is " "also specified." msgstr "" "Si une instance de surveillance existe déjà pour l’objet de système de " "fichiers correspondant à I, ajouter (avec un OU binaire) les " "événements de I au masque de surveillance (au lieu de remplacer le " "masque) ; il résulte une erreur B si B est aussi " "spécifié." #. 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 "" "Monitor the filesystem object corresponding to I for one event, " "then remove from watch list." msgstr "" "Surveiller l’objet de système de fichiers correspondant à I jusqu'au " "premier événement, puis le supprimer de la liste de surveillance." #. 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 2.6.15)" msgstr "B (depuis Linux 2.6.15)" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Watch I only if it is a directory; the error B results if " "I is not a directory. Using this flag provides an application " "with a race-free way of ensuring that the monitored object is a directory." msgstr "" "Surveiller I seulement s'il s'agit d'un répertoire ; il résulte une " "erreur B si I n'est pas un répertoire. Utiliser cet " "attribut fournit à une application un moyen sans problème de concurrence de " "s'assurer qu'un objet surveillé est un répertoire." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 4.18)" msgstr "B (depuis Linux 4.18)" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Watch I only if it does not already have a watch associated with " "it; the error B results if I is already being watched." msgstr "" "Surveiller I seulement s'il n'y a pas déjà une surveillance qui lui " "est associée ; il résulte une erreur B si I est déjà " "surveillé." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Using this flag provides an application with a way of ensuring that new " "watches do not modify existing ones. This is useful because multiple paths " "may refer to the same inode, and multiple calls to B(2) " "without this flag may clobber existing watch masks." msgstr "" "Utiliser cet attribut fournit à une application un moyen de s'assurer que de " "nouveaux éléments de surveillance ne modifient pas ceux qui existent déjà. " "C'est utile parce que plusieurs chemins peuvent faire référence au même " "inœud et plusieurs appels à B(2) sans cet attribut " "peuvent écraser des masques de surveillance existants." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The following bits may be set in the I field returned by B(2):" msgstr "" "Les bits suivants peuvent avoir été définis dans le champ I renvoyé " "par B(2)\\ :" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Watch was removed explicitly (B(2)) or automatically " "(file was deleted, or filesystem was unmounted). See also BUGS." msgstr "" "Le surveillant a été retiré explicitement (B(2)) ou " "automatiquement (le fichier a été effacé, ou le système de fichiers a été " "démonté). Consultez également 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 "Subject of this event is a directory." msgstr "Le sujet de cet événement est un répertoire." #. 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 "Event queue overflowed (I is -1 for this event)." msgstr "Queue des événements surchargée (I vaut alors -1)." #. 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 "" "Filesystem containing watched object was unmounted. In addition, an " "B event will subsequently be generated for the watch descriptor." msgstr "" "Le système de fichiers contenant l'objet surveillé a été démonté. De plus, " "un événement B sera ensuite généré pour le descripteur de " "surveillance." #. type: SS #: 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 "" "Suppose an application is watching the directory I and the file I for all events. The examples below show some events that will be " "generated for these two objects." msgstr "" "Soit une application surveillant le répertoire I et le fichier I pour tous les événements. Les exemples ci-dessous montrent " "quelques événements qui seront générés pour ces deux objets." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "fd = open(\"dir/myfile\", O_RDWR);" msgstr "fd = open(\"rép/monfichier\", O_RDWR);" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Generates B events for both I and I." msgstr "" "Génère des événements B à la fois pour I et I." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "read(fd, buf, count);" msgstr "read(fd, buf, count);" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Generates B events for both I and I." msgstr "" "Génère des événements B à la fois pour I et I." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "write(fd, buf, count);" msgstr "write(fd, buf, count);" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Generates B events for both I and I." msgstr "" "Génère des événements B à la fois pour I et I." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "fchmod(fd, mode);" msgstr "fchmod(fd, mode);" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Generates B events for both I and I." msgstr "" "Génère des événements B à la fois pour I et I." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "close(fd);" msgstr "close(fd);" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Generates B events for both I and I." msgstr "" "Génère des événements B à la fois pour I et I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Suppose an application is watching the directories I and I, and " "the file I. The following examples show some events that may " "be generated." msgstr "" "Soit une application surveillant les répertoires I et I, et le " "fichier I. Les exemples suivants montrent quelques " "événements qui pourraient être générés." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "link(\"dir1/myfile\", \"dir2/new\");" msgstr "link(\"rép1/monfichier\", \"rép2/nouveau\");" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Generates an B event for I and an B event for " "I." msgstr "" "Génère un événement B pour I et un événement " "B pour I." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "rename(\"dir1/myfile\", \"dir2/myfile\");" msgstr "rename(\"rép1/monfichier\", \"rép2/monfichier\");" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Generates an B event for I, an B event for " "I, and an B event for I. The B " "and B events will have the same I value." msgstr "" "Génère un événement B pour I, un événement " "B pour I et un événement B pour " "I. Les événements B et B auront la " "même valeur I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Suppose that I and I are (the only) links to the same " "file, and an application is watching I, I, I, and " "I. Executing the following calls in the order given below will " "generate the following events:" msgstr "" "Soient I et I les (seuls) liens vers le même ficher, et " "une application surveillant I, I, I et I. " "L’exécution des appels suivants dans l’ordre donné ci-dessous générera les " "événements suivants :" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "unlink(\"dir2/yy\");" msgstr "unlink(\"rép2/yy\");" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Generates an B event for I (because its link count changes) " "and an B event for I." msgstr "" "Génère un événement B pour I (à cause du changement de son " "compteur de liens) et un événement B pour I." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "unlink(\"dir1/xx\");" msgstr "unlink(\"rép1/xx\");" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Generates B, B, and B events for " "I, and an B event for I." msgstr "" "Génère des événements B, B et B pour " "I et un événement B pour I." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Suppose an application is watching the directory I and (the empty) " "directory I. The following examples show some events that may " "be generated." msgstr "" "Soit une application surveillant le répertoire I et le répertoire " "(vide) I. Les exemples suivants montrent quelques événements " "qui pourraient être générés." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "mkdir(\"dir/new\", mode);" msgstr "mkdir(\"rép/nouveau\", mode);" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Generates an B event for I." msgstr "Génère un événement B pour I." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "rmdir(\"dir/subdir\");" msgstr "rmdir(\"rép/sousrép\");" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Generates B and B events for I, and an " "B event for I." msgstr "" "Génère des événements B et B pour I et " "un événement B pour I." #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "/proc interfaces" msgstr "/proc interfaces" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The following interfaces can be used to limit the amount of kernel memory " "consumed by inotify:" msgstr "" "Les interfaces suivantes peuvent être utilisées pour limiter la quantité de " "mémoire du noyau utilisée par inotify\\ :" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The value in this file is used when an application calls B(2) " "to set an upper limit on the number of events that can be queued to the " "corresponding inotify instance. Events in excess of this limit are dropped, " "but an B event is always generated." msgstr "" "La valeur dans ce fichier est utilisée lorsqu'une application appelle " "B(2) pour définir la limite maximale du nombre des événements " "qui peuvent entrer dans la file d'attente de l'instance inotify " "correspondante. Les événements au-delà de cette limite sont annulés, mais un " "événement B est systématiquement généré." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This specifies an upper limit on the number of inotify instances that can be " "created per real user ID." msgstr "" "Cela indique la limite maximale du nombre d'instances inotify qui peuvent " "être créées par identifiant utilisateur réel." #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This specifies an upper limit on the number of watches that can be created " "per real user ID." msgstr "" "Cela indique la limite maximale du nombre de « watch » qui peuvent être " "créés par identifiant utilisateur réel." #. 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 "Linux." msgstr "Linux." #. type: SH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "HISTORIQUE" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Inotify was merged into Linux 2.6.13. The required library interfaces were " "added in glibc 2.4. (B, B, and B " "were added in glibc 2.5.)" msgstr "" "Inotify a été inclus dans Linux 2.6.13. Les interfaces bibliothèque " "nécessaires ont été ajoutées dans la glibc 2.4 (B, " "B et B ont été ajoutées dans la glibc 2.5)." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NOTES" msgstr "NOTES" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Inotify file descriptors can be monitored using B(2), B(2) et B(7). Lorsqu'un événement est disponible, " "le descripteur de fichier indique qu'il est accessible en lecture." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Since Linux 2.6.25, signal-driven I/O notification is available for inotify " "file descriptors; see the discussion of B (for setting the " "B flag), B, and B in B(2). The " "I structure (described in B(2)) that is passed to the " "signal handler has the following fields set: I is set to the inotify " "file descriptor number; I is set to the signal number; I " "is set to B; and B is set in I." msgstr "" "Depuis Linux 2.6.25, il est possible d'être notifié par des signaux pour des " "entrées-sorties des descripteurs de fichier inotify ; consultez la " "discussion de B (pour la configuration de l'attribut B), " "B, et B dans B(2). La structure I " "(décrite dans B(2)) qui est passée au gestionnaire de signal a " "les champs suivants définis : I est défini avec le numéro de " "descripteur de fichiers inotify ; I est défini avec le numéro du " "signal ; I est défini avec B ; et I est défini " "avec B." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If successive output inotify events produced on the inotify file descriptor " "are identical (same I, I, I, and I), then they are " "coalesced into a single event if the older event has not yet been read (but " "see BUGS). This reduces the amount of kernel memory required for the event " "queue, but also means that an application can't use inotify to reliably " "count file events." msgstr "" "Si deux événements inotify de sortie successifs produits sur le descripteur " "de fichier inotify sont identiques (I, I, I, et I " "identiques), alors ils sont fusionnés en un seul événement si l'événement le " "plus ancien n'a toujours pas été lu (mais consultez la section BOGUES). Cela " "permet de réduire la quantité de mémoire en espace noyau nécessaire à la " "file d'événements, mais signifie également qu'une application ne peut " "utiliser inotify pour compter de manière fiable les événements liés à un " "fichier." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The events returned by reading from an inotify file descriptor form an " "ordered queue. Thus, for example, it is guaranteed that when renaming from " "one directory to another, events will be produced in the correct order on " "the inotify file descriptor." msgstr "" "Les événements renvoyés lors de la lecture d'un descripteur de fichier " "inotify forment une file ordonnée. Ainsi, par exemple, il est garanti que " "lors du renommage d'un répertoire, les événements seront produits dans " "l'ordre convenable sur le descripteur de fichier inotify." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The set of watch descriptors that is being monitored via an inotify file " "descriptor can be viewed via the entry for the inotify file descriptor in " "the process's IpidI directory. See B(5) for further " "details. The B B(2) returns the number of bytes available " "to read from an inotify file descriptor." msgstr "" "L'ensemble des descripteurs surveillés grâce à un descripteur de fichier " "inotify peut être vu dans l'entrée du descripteur de fichier inotify dans le " "répertoire IpidI du processus. Consultez B(5) pour de " "plus amples détails. B B(2) renvoie le nombre d'octets " "disponibles à la lecture dans un descripteur de fichier inotify." #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Limitations and caveats" msgstr "Limites et réserves" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The inotify API provides no information about the user or process that " "triggered the inotify event. In particular, there is no easy way for a " "process that is monitoring events via inotify to distinguish events that it " "triggers itself from those that are triggered by other processes." msgstr "" "L'interface inotify ne fournit aucun renseignement sur l'utilisateur ou le " "processus qui a déclenché l'événement inotify. En particulier, un processus " "en train de surveiller des événements à l'aide d'inotify ne dispose d'aucun " "moyen facile pour distinguer les événements qu'il déclenche lui-même de ceux " "qui ont été déclenchés par d'autres processus." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Inotify reports only events that a user-space program triggers through the " "filesystem API. As a result, it does not catch remote events that occur on " "network filesystems. (Applications must fall back to polling the filesystem " "to catch such events.) Furthermore, various pseudo-filesystems such as I, I, and I are not monitorable with inotify." msgstr "" "Inotify ne signale que les événements déclenchés par un programme en espace " "utilisateur à l’aide de l’interface de programmation de système de fichiers. " "Par conséquent, elle n’intercepte pas les événements qui surviennent sur les " "systèmes de fichiers en réseau (les applications doivent avoir recours à la " "scrutation (polling) pour intercepter ce type d’événements). De plus, divers " "pseudo-systèmes de fichiers comme I, I et I ne sont " "pas surveillables avec inotify." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The inotify API does not report file accesses and modifications that may " "occur because of B(2), B(2), and B(2)." msgstr "" "L'interface inotify ne signale pas les accès ni les modifications de fichier " "qui pourraient survenir à cause de B(2), B(2) ou B(2)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The inotify API identifies affected files by filename. However, by the time " "an application processes an inotify event, the filename may already have " "been deleted or renamed." msgstr "" "L'interface inotify identifie les fichiers affectés par leur nom. Cependant, " "au moment où l'application traite un événement inotify, ce nom de fichier " "peut avoir déjà été supprimé ou renommé." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The inotify API identifies events via watch descriptors. It is the " "application's responsibility to cache a mapping (if one is needed) between " "watch descriptors and pathnames. Be aware that directory renamings may " "affect multiple cached pathnames." msgstr "" "L’interface inotify identifie les événements à l’aide de descripteurs de " "surveillance. L’application est responsable de mettre en cache une " "correspondance (si nécessaire) entre les descripteurs de fichier et les " "chemins. Soyez vigilants aux renommages de répertoire qui pourraient " "affecter plusieurs chemins en cache." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Inotify monitoring of directories is not recursive: to monitor " "subdirectories under a directory, additional watches must be created. This " "can take a significant amount time for large directory trees." msgstr "" "La surveillance inotify des répertoires n'est pas récursive\\ : pour " "surveiller les sous-répertoires, des éléments de surveillance " "supplémentaires doivent être créés. Cela peut être assez long pour les " "répertoires contenant une grande arborescence." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If monitoring an entire directory subtree, and a new subdirectory is created " "in that tree or an existing directory is renamed into that tree, be aware " "that by the time you create a watch for the new subdirectory, new files (and " "subdirectories) may already exist inside the subdirectory. Therefore, you " "may want to scan the contents of the subdirectory immediately after adding " "the watch (and, if desired, recursively add watches for any subdirectories " "that it contains)." msgstr "" "Si la surveillance concerne une arborescence dans son intégralité, et si un " "nouveau sous-répertoire est créé dans ce répertoire ou si un répertoire " "existant est renommé dans cette arborescence, soyez conscient qu'au moment " "où vous créez un élément de surveillance pour le nouveau sous-répertoire, de " "nouveaux fichiers (et sous-répertoires) peuvent déjà exister dans le sous-" "répertoire. Ainsi, vous devriez analyser le contenu du sous-répertoire " "immédiatement après avoir ajouté l'élément de surveillance (et, si " "nécessaire, ajouter des éléments de surveillance pour tous les sous-" "répertoires qu’il contient)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Note that the event queue can overflow. In this case, events are lost. " "Robust applications should handle the possibility of lost events " "gracefully. For example, it may be necessary to rebuild part or all of the " "application cache. (One simple, but possibly expensive, approach is to " "close the inotify file descriptor, empty the cache, create a new inotify " "file descriptor, and then re-create watches and cache entries for the " "objects to be monitored.)" msgstr "" "Remarquez que la file d'événements peut déborder. Dans ce cas, des " "événements sont perdus. Les applications robustes devraient gérer " "correctement la possibilité de perdre des événements. Par exemple, la " "reconstruction de tout ou partie du cache de l’application pourrait être " "nécessaire (une approche simple, mais éventuellement coûteuse, est de fermer " "le descripteur de fichier inotify, vider le cache, créer un nouveau " "descripteur de fichier inotify et recréer les éléments de surveillance et " "les entrées du cache pour les objets à surveiller)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If a filesystem is mounted on top of a monitored directory, no event is " "generated, and no events are generated for objects immediately under the new " "mount point. If the filesystem is subsequently unmounted, events will " "subsequently be generated for the directory and the objects it contains." msgstr "" "Si un système de fichiers est monté par dessus un répertoire surveillé, " "aucun événement n'est généré, pas plus que pour les objets se trouvant " "directement sous le nouveau point de montage. Si le système de fichiers est " "par la suite démonté, les événements seront créés pour le répertoire et les " "objets qu'il contient." #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Dealing with rename() events" msgstr "Traitement des événements rename()" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "As noted above, the B and B event pair that is " "generated by B(2) can be matched up via their shared cookie value. " "However, the task of matching has some challenges." msgstr "" "Comme noté précédemment, la paire d’événements B et " "B générée par B(2) peut être assemblée à l’aide de la " "valeur de cookie partagé. Cependant, la tâche d’assemblage peut poser " "quelques problèmes." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "These two events are usually consecutive in the event stream available when " "reading from the inotify file descriptor. However, this is not guaranteed. " "If multiple processes are triggering events for monitored objects, then (on " "rare occasions) an arbitrary number of other events may appear between the " "B and B events. Furthermore, it is not " "guaranteed that the event pair is atomically inserted into the queue: there " "may be a brief interval where the B has appeared, but the " "B has not." msgstr "" "Ces deux événements sont normalement consécutifs dans le flux d’événements " "disponibles lors de la lecture depuis le descripteur de fichiers inotify. " "Cependant, ce n’est pas garanti. Si plusieurs processus déclenchent des " "événements pour des objets surveillés, alors (rarement) un nombre arbitraire " "d’autres événements pourrait apparaître entre les événements " "B et B. De plus, il n'est pas garanti que la " "paire d'événements soit insérée de façon atomique dans la file : il pourrait " "y avoir un bref intervalle au cours duquel B est apparu, mais " "pas B." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Matching up the B and B event pair generated by " "B(2) is thus inherently racy. (Don't forget that if an object is " "renamed outside of a monitored directory, there may not even be an " "B event.) Heuristic approaches (e.g., assume the events are " "always consecutive) can be used to ensure a match in most cases, but will " "inevitably miss some cases, causing the application to perceive the " "B and B events as being unrelated. If watch " "descriptors are destroyed and re-created as a result, then those watch " "descriptors will be inconsistent with the watch descriptors in any pending " "events. (Re-creating the inotify file descriptor and rebuilding the cache " "may be useful to deal with this scenario.)" msgstr "" "L’assemblage de la paire d’événements B et B " "générés par B(2) pose donc intrinsèquement un risque de situation de " "compétition (n’oubliez pas que si un objet est renommé en dehors d’un " "répertoire surveillé, un événement B pourrait ne même pas être " "envoyé). Des approches heuristiques (par exemple supposer que les événements " "sont toujours consécutifs) permettent d’assurer un assemblage dans la " "plupart des cas, mais manqueront forcément certains cas, forçant " "l’application à percevoir les événements B et B " "comme indépendants. Si les descripteurs de surveillance sont détruits et " "recréés par conséquent, alors ces descripteurs de surveillance seront " "incohérents avec les descripteurs de surveillance dans tous les événements " "en attente (la recréation du descripteur de fichier inotify et la " "reconstruction du cache pourrait être utile dans ce cas)." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Applications should also allow for the possibility that the B " "event was the last event that could fit in the buffer returned by the " "current call to B(2), and the accompanying B event might " "be fetched only on the next B(2), which should be done with a (small) " "timeout to allow for the fact that insertion of the " "B+B event pair is not atomic, and also the " "possibility that there may not be any B event." msgstr "" "Les applications devraient aussi considérer la possibilité que l’événement " "B soit le dernier événement ayant pu entrer dans le tampon " "renvoyé pour l’appel actuel de B(2) et l’événement B " "accompagnant pourrait n’être récupéré que lors de l’appel B(2) " "suivant, ce qui devrait être fait avec un (léger) délai pour permettre que " "l'insertion de la paire d'événements B+B ne soit " "pas atomique et aussi qu'il n'y ait pas d'événement 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" #. commit 820c12d5d6c0890bc93dd63893924a13041fdc35 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Before Linux 3.19, B(2) did not create any inotify events. " "Since Linux 3.19, calls to B(2) generate B events." msgstr "" "Avant Linux 3.19, B(2) ne créait pas d'événements inotify. Depuis " "Linux 3.19, les appels à B(2) créent des événements B." #. FIXME . kernel commit 611da04f7a31b2208e838be55a42c7a1310ae321 #. implies that unmount events were buggy since Linux 2.6.11 to Linux 2.6.36 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Before Linux 2.6.16, the B I flag does not work." msgstr "" "Avant Linux 2.6.16, l'attribut B de I ne fonctionne pas." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "As originally designed and implemented, the B flag did not cause " "an B event to be generated when the watch was dropped after one " "event. However, as an unintended effect of other changes, since Linux " "2.6.36, an B event is generated in this case." msgstr "" "Tel que conçu et implémenté à l’origine, l’attribut B ne forçait " "pas à générer un appel B lorsque la surveillance était supprimée " "après un événement. Cependant, en conséquence involontaire d’autres " "modifications, depuis Linux 2.6.36, un événement B est généré " "dans ce cas." #. commit 1c17d18e3775485bf1e0ce79575eb637a94494a2 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Before Linux 2.6.25, the kernel code that was intended to coalesce " "successive identical events (i.e., the two most recent events could " "potentially be coalesced if the older had not yet been read) instead " "checked if the most recent event could be coalesced with the I " "unread event." msgstr "" "Avant Linux 2.6.25, le code du noyau qui était censé regrouper deux " "événements successifs (c'est-à-dire que les deux événements les plus récents " "pouvaient être fusionnés si le plus ancien des deux n'avait toujours pas été " "lu) vérifiait à la place si l'événement le plus récent pouvait être fusionné " "à l'événement non lu I." #. FIXME . https://bugzilla.kernel.org/show_bug.cgi?id=77111 #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "When a watch descriptor is removed by calling B(2) (or " "because a watch file is deleted or the filesystem that contains it is " "unmounted), any pending unread events for that watch descriptor remain " "available to read. As watch descriptors are subsequently allocated with " "B(2), the kernel cycles through the range of possible " "watch descriptors (1 to B) incrementally. When allocating a free " "watch descriptor, no check is made to see whether that watch descriptor " "number has any pending unread events in the inotify queue. Thus, it can " "happen that a watch descriptor is reallocated even when pending unread " "events exist for a previous incarnation of that watch descriptor number, " "with the result that the application might then read those events and " "interpret them as belonging to the file associated with the newly recycled " "watch descriptor. In practice, the likelihood of hitting this bug may be " "extremely low, since it requires that an application cycle through " "B watch descriptors, release a watch descriptor while leaving " "unread events for that watch descriptor in the queue, and then recycle that " "watch descriptor. For this reason, and because there have been no reports " "of the bug occurring in real-world applications, as of Linux 3.15, no kernel " "changes have yet been made to eliminate this possible bug." msgstr "" "Quand un descripteur de surveillance est supprimé en appelant " "B(2) (ou parce qu’un fichier de surveillance est supprimé " "ou que le système de fichiers qui le contient est démonté), tous les " "événements non lus en attente pour ce descripteur de fichier restent " "disponibles en lecture. Comme les descripteurs de surveillance sont ensuite " "alloués avec B(2), le noyau boucle sur l’intervalle des " "descripteurs de surveillance possibles (1 à B) de façon " "incrémentielle. Lors de l’allocation d’un descripteur de surveillance libre, " "aucune vérification n’est effectuée pour voir si ce numéro de descripteur de " "surveillance a des événements non lus en attente dans la file inotify. " "Ainsi, un descripteur de surveillance pourrait être réalloué même quand des " "événements non lus en attente existent pour une incarnation précédente de ce " "numéro de descripteur de surveillance, avec comme résultat que l’application " "pourrait alors lire ces événements et les interpréter comme appartenant au " "fichier associé au descripteur de surveillance nouvellement recyclé. En " "pratique, la probabilité d’être victime de ce bogue devrait être extrêmement " "basse, puisqu’il nécessite qu’une application boucle sur " "B descripteurs de surveillance, relâche un descripteur de " "surveillance tout en laissant des événements non lus pour ce descripteur de " "fichier dans la file et ensuite recycle ce descripteur de surveillance. Pour " "cette raison, et parce qu’il n’y a eu aucun rapports de bogue à propos de " "réelles applications, dans Linux 3.15, aucune modification de noyau n’a " "encore été faite pour éliminer ce bogue éventuel." #. 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 following program demonstrates the usage of the inotify API. It marks " "the directories passed as a command-line arguments and waits for events of " "type B, B, and B." msgstr "" "Le programme suivant montre l’utilisation de l’interface de programmation " "inotify. Il marque les répertoires passés en arguments de ligne de commande " "et attend les événements de type B, B et " "B." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The following output was recorded while editing the file I and listing directory I. Before the file and the directory were " "opened, B events occurred. After the file was closed, an " "B event occurred. After the directory was closed, an " "B event occurred. Execution of the program ended when the " "user pressed the ENTER key." msgstr "" "La sortie suivante a été enregistrée lors de la modification du fichier I et de l’affichage du contenu du répertoire I. Avant d’ouvrir le fichier et le répertoire, un événement B " "est survenu. Après la fermeture du fichier, un événement B " "est survenu. Après la fermeture du répertoire, un événement " "B est survenu. L’exécution du programme s’est terminée " "quand l’utilisateur a appuyé sur la touche Entrée." #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Example output" msgstr "Sortie de l’exemple" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "" "$ B<./a.out /tmp /home/user/temp>\n" "Press enter key to terminate.\n" "Listening for events.\n" "IN_OPEN: /home/user/temp/foo [file]\n" "IN_CLOSE_WRITE: /home/user/temp/foo [file]\n" "IN_OPEN: /tmp/ [directory]\n" "IN_CLOSE_NOWRITE: /tmp/ [directory]\n" "\\&\n" "Listening for events stopped.\n" msgstr "" "$ B<./a.out /tmp /home/utilisateur/temp>\n" "Appuyer sur la touche Entrée pour quitter.\n" "En écoute d’événements.\n" "IN_OPEN : /home/utilisateur/temp/toto [fichier]\n" "IN_CLOSE_WRITE : /home/utilisateur/temp/toto [fichier]\n" "IN_OPEN : /tmp/ [répertoire]\n" "IN_CLOSE_NOWRITE : /tmp/ [répertoire]\n" "\\&\n" "Arrêt de l’écoute d’événements.\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 Epoll.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/inotify.hE\n" "#include Eunistd.hE\n" "#include Estring.hE\n" "\\&\n" "/* Read all available inotify events from the file descriptor \\[aq]fd\\[aq].\n" " wd is the table of watch descriptors for the directories in argv.\n" " argc is the length of wd and argv.\n" " argv is the list of watched directories.\n" " Entry 0 of wd and argv is unused. */\n" "\\&\n" "static void\n" "handle_events(int fd, int *wd, int argc, char* argv[])\n" "{\n" " /* Some systems cannot read integer variables if they are not\n" " properly aligned. On other systems, incorrect alignment may\n" " decrease performance. Hence, the buffer used for reading from\n" " the inotify file descriptor should have the same alignment as\n" " struct inotify_event. */\n" "\\&\n" " char buf[4096]\n" " __attribute__ ((aligned(__alignof__(struct inotify_event))));\n" " const struct inotify_event *event;\n" " ssize_t len;\n" "\\&\n" " /* Loop while events can be read from inotify file descriptor. */\n" "\\&\n" " for (;;) {\n" "\\&\n" " /* Read some events. */\n" "\\&\n" " len = read(fd, buf, sizeof(buf));\n" " if (len == -1 && errno != EAGAIN) {\n" " perror(\"read\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* If the nonblocking read() found no events to read, then\n" " it returns -1 with errno set to EAGAIN. In that case,\n" " we exit the loop. */\n" "\\&\n" " if (len E= 0)\n" " break;\n" "\\&\n" " /* Loop over all events in the buffer. */\n" "\\&\n" " for (char *ptr = buf; ptr E buf + len;\n" " ptr += sizeof(struct inotify_event) + event-Elen) {\n" "\\&\n" " event = (const struct inotify_event *) ptr;\n" "\\&\n" " /* Print event type. */\n" "\\&\n" " if (event-Emask & IN_OPEN)\n" " printf(\"IN_OPEN: \");\n" " if (event-Emask & IN_CLOSE_NOWRITE)\n" " printf(\"IN_CLOSE_NOWRITE: \");\n" " if (event-Emask & IN_CLOSE_WRITE)\n" " printf(\"IN_CLOSE_WRITE: \");\n" "\\&\n" " /* Print the name of the watched directory. */\n" "\\&\n" " for (size_t i = 1; i E argc; ++i) {\n" " if (wd[i] == event-Ewd) {\n" " printf(\"%s/\", argv[i]);\n" " break;\n" " }\n" " }\n" "\\&\n" " /* Print the name of the file. */\n" "\\&\n" " if (event-Elen)\n" " printf(\"%s\", event-Ename);\n" "\\&\n" " /* Print type of filesystem object. */\n" "\\&\n" " if (event-Emask & IN_ISDIR)\n" " printf(\" [directory]\\en\");\n" " else\n" " printf(\" [file]\\en\");\n" " }\n" " }\n" "}\n" "\\&\n" "int\n" "main(int argc, char* argv[])\n" "{\n" " char buf;\n" " int fd, i, poll_num;\n" " int *wd;\n" " nfds_t nfds;\n" " struct pollfd fds[2];\n" "\\&\n" " if (argc E 2) {\n" " printf(\"Usage: %s PATH [PATH ...]\\en\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " printf(\"Press ENTER key to terminate.\\en\");\n" "\\&\n" " /* Create the file descriptor for accessing the inotify API. */\n" "\\&\n" " fd = inotify_init1(IN_NONBLOCK);\n" " if (fd == -1) {\n" " perror(\"inotify_init1\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Allocate memory for watch descriptors. */\n" "\\&\n" " wd = calloc(argc, sizeof(int));\n" " if (wd == NULL) {\n" " perror(\"calloc\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Mark directories for events\n" " - file was opened\n" " - file was closed */\n" "\\&\n" " for (i = 1; i E argc; i++) {\n" " wd[i] = inotify_add_watch(fd, argv[i],\n" " IN_OPEN | IN_CLOSE);\n" " if (wd[i] == -1) {\n" " fprintf(stderr, \"Cannot watch \\[aq]%s\\[aq]: %s\\en\",\n" " argv[i], strerror(errno));\n" " exit(EXIT_FAILURE);\n" " }\n" " }\n" "\\&\n" " /* Prepare for polling. */\n" "\\&\n" " nfds = 2;\n" "\\&\n" " fds[0].fd = STDIN_FILENO; /* Console input */\n" " fds[0].events = POLLIN;\n" "\\&\n" " fds[1].fd = fd; /* Inotify input */\n" " fds[1].events = POLLIN;\n" "\\&\n" " /* Wait for events and/or terminal input. */\n" "\\&\n" " printf(\"Listening for events.\\en\");\n" " while (1) {\n" " poll_num = poll(fds, nfds, -1);\n" " if (poll_num == -1) {\n" " if (errno == EINTR)\n" " continue;\n" " perror(\"poll\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (poll_num E 0) {\n" "\\&\n" " if (fds[0].revents & POLLIN) {\n" "\\&\n" " /* Console input is available. Empty stdin and quit. */\n" "\\&\n" " while (read(STDIN_FILENO, &buf, 1) E 0 && buf != \\[aq]\\en\\[aq])\n" " continue;\n" " break;\n" " }\n" "\\&\n" " if (fds[1].revents & POLLIN) {\n" "\\&\n" " /* Inotify events are available. */\n" "\\&\n" " handle_events(fd, wd, argc, argv);\n" " }\n" " }\n" " }\n" "\\&\n" " printf(\"Listening for events stopped.\\en\");\n" "\\&\n" " /* Close inotify file descriptor. */\n" "\\&\n" " close(fd);\n" "\\&\n" " free(wd);\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" "#include Eerrno.hE\n" "#include Epoll.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/inotify.hE\n" "#include Eunistd.hE\n" "#include Estring.hE\n" "\\&\n" "/* Lire tous les événements inotify disponibles à partir du\n" " descripteur de fichier «\\ fd\\ ».\n" " wd est le tableau des descripteurs de surveillance pour\n" " les répertoires en argv.\n" " argc est la taille de wd et argv.\n" " argv est la liste des répertoires surveillés.\n" " L’entrée\\ 0 de wd et argv n’est pas utilisée. */\n" "\\&\n" "static void\n" "handle_events(int fd, int *wd, int argc, char* argv[])\n" "{\n" " /* Certains systèmes ne peuvent pas lire de variables entières\n" " si elles ne sont pas alignées correctement. Sur d’autres\n" " systèmes, un alignement incorrect pourrait diminuer les\n" " performances. Par conséquent, le tampon utilisé pour lire\n" " le descripteur de fichier inotify devrait avoir le même\n" " alignement que struct inotify_event. */\n" "\\&\n" " char buf[4096]\n" " __attribute__ ((aligned(__alignof__(struct inotify_event))));\n" " const struct inotify_event *event;\n" " ssize_t len;\n" "\\&\n" " /* Boucler tant que les événements peuvent être lus à partir du\n" " descripteur de fichier inotify */\n" "\\&\n" " for (;;) {\n" "\\&\n" " /* Lire certains événements. */\n" "\\&\n" " len = read(fd, buf, sizeof(buf));\n" " if (len == -1 && errno != EAGAIN) {\n" " perror(\"read\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Si le read() non bloquant n’a pas trouvé d’événement à\n" " lire, il renvoie -1 avec errno défini à EAGAIN. Dans ce\n" " cas, on sort de la boucle. */\n" "\\&\n" " if (len E= 0)\n" " break;\n" "\\&\n" " /* Boucler sur tous les événements du tampon. */\n" "\\&\n" " for (char *ptr = buf; ptr E buf + len;\n" " ptr += sizeof(struct inotify_event) + event-Elen) {\n" "\\&\n" " event = (const struct inotify_event *) ptr;\n" "\\&\n" " /* Afficher le type d’événement. */\n" "\\&\n" " if (event-Emask & IN_OPEN)\n" " printf(\"IN_OPEN: \");\n" " if (event-Emask & IN_CLOSE_NOWRITE)\n" " printf(\"IN_CLOSE_NOWRITE: \");\n" " if (event-Emask & IN_CLOSE_WRITE)\n" " printf(\"IN_CLOSE_WRITE: \");\n" "\\&\n" " /* Afficher le nom du répertoire surveillé. */\n" "\\&\n" " for (size_t i = 1; i E argc; ++i) {\n" " if (wd[i] == event-Ewd) {\n" " printf(\"%s/\", argv[i]);\n" " break;\n" " }\n" " }\n" "\\&\n" " /* Afficher le nom du fichier. */\n" "\\&\n" " if (event-Elen)\n" " printf(\"%s\", event-Ename);\n" "\\&\n" " /* Afficher le type d’objet de système de fichiers. */\n" "\\&\n" " if (event-Emask & IN_ISDIR)\n" " printf(\" [répertoire]\\en\");\n" " else\n" " printf(\" [fichier]\\en\");\n" " }\n" " }\n" "}\n" "\\&\n" "int\n" "main(int argc, char* argv[])\n" "{\n" " char buf;\n" " int fd, i, poll_num;\n" " int *wd;\n" " nfds_t nfds;\n" " struct pollfd fds[2];\n" "\\&\n" " if (argc E 2) {\n" " printf(\"\"Utilisation\\ : %s CHEMIN [CHEMIN ...]\\en\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " printf(\"Appuyer sur la touche Entrée pour quitter.\\en\");\n" "\\&\n" " /* Créer le descripteur de fichier pour accéder à l’interface de\n" " programmation inotify. */\n" "\\&\n" " fd = inotify_init1(IN_NONBLOCK);\n" " if (fd == -1) {\n" " perror(\"inotify_init1\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Allouer la mémoire pour les descripteurs de surveillance. */\n" "\\&\n" " wd = calloc(argc, sizeof(int));\n" " if (wd == NULL) {\n" " perror(\"calloc\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " /* Marquer les répertoires pour les événements :\n" " - un fichier a été ouvert ;\n" " - un fichier a été fermé\n" "\\&\n" " for (i = 1; i E argc; i++) {\n" " wd[i] = inotify_add_watch(fd, argv[i],\n" " IN_OPEN | IN_CLOSE);\n" " if (wd[i] == -1) {\n" " fprintf(stderr, \"Impossible de surveiller « %s » : %s\\en\",\n" " argv[i], strerror(errno));\n" " exit(EXIT_FAILURE);\n" " }\n" " }\n" "\\&\n" " /* Préparer pour la scrutation (polling). */\n" "\\&\n" " nfds = 2;\n" "\\&\n" " fds[0].fd = STDIN_FILENO; /* Entrée de console */\n" " fds[0].events = POLLIN;\n" "\\&\n" " fds[1].fd = fd; /* Entrée d'inotify */\n" " fds[1].events = POLLIN;\n" "\\&\n" " /* Attendre les événements ou une entrée du terminal. */\n" "\\&\n" " printf(\"En écoute d’événements.\\en\");\n" " while (1) {\n" " poll_num = poll(fds, nfds, -1);\n" " if (poll_num == -1) {\n" " if (errno == EINTR)\n" " continue;\n" " perror(\"poll\");\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " if (poll_num E 0) {\n" "\\&\n" " if (fds[0].revents & POLLIN) {\n" "\\&\n" " /* Entrée de console disponible.\n" " Vider l’entrée standard et quitter. */\n" "\\&\n" " while (read(STDIN_FILENO, &buf, 1) E 0 && buf != \\[aq]\\en\\[aq])\n" " continue;\n" " break;\n" " }\n" "\\&\n" " if (fds[1].revents & POLLIN) {\n" "\\&\n" " /* Des événements inotify sont disponibles. */\n" "\\&\n" " handle_events(fd, wd, argc, argv);\n" " }\n" " }\n" " }\n" "\\&\n" " printf(\"Arrêt de l’écoute d’événements.\\en\");\n" "\\&\n" " /* Fermer le descripteur de fichier inotify. */\n" "\\&\n" " close(fd);\n" "\\&\n" " free(wd);\n" " exit(EXIT_SUCCESS);\n" "}\n" #. 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(1), B(1), B(2), " "B(2), B(2), B(2), B(2), " "B(2), B(7)" msgstr "" "B(1), B(1), B(2), " "B(2), B(2), B(2), B(2), " "B(2), B(7)" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "I in the Linux kernel source tree" msgstr "" "I dans les sources du noyau Linux" #. 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 "" "The I field is present only when an event is returned for a file " "inside a watched directory; it identifies the filename within the watched " "directory. This filename is null-terminated, and may include further null " "bytes (\\[aq]\\e0\\[aq]) to align subsequent reads to a suitable address " "boundary." msgstr "" "Le champ I n'est présent que lorsqu'un événement est renvoyé pour un " "fichier au sein d'un répertoire surveillé. Il identifie le chemin du fichier " "dans le répertoire surveillé. Ce chemin est terminé par un caractère NULL et " "peut inclure d'autres octets nuls («\\ \\e0\\ ») pour ajuster des lectures " "successives à une limite d'adressage convenable." #. type: SH #: debian-bookworm #, no-wrap msgid "VERSIONS" msgstr "VERSIONS" #. type: Plain text #: debian-bookworm msgid "The inotify API is Linux-specific." msgstr "L’interface de programmation inotify est spécifique à Linux." #. FIXME . https://bugzilla.kernel.org/show_bug.cgi?id=77111 #. type: Plain text #: debian-bookworm opensuse-leap-15-6 msgid "" "When a watch descriptor is removed by calling B(2) (or " "because a watch file is deleted or the filesystem that contains it is " "unmounted), any pending unread events for that watch descriptor remain " "available to read. As watch descriptors are subsequently allocated with " "B(2), the kernel cycles through the range of possible " "watch descriptors (0 to B) incrementally. When allocating a free " "watch descriptor, no check is made to see whether that watch descriptor " "number has any pending unread events in the inotify queue. Thus, it can " "happen that a watch descriptor is reallocated even when pending unread " "events exist for a previous incarnation of that watch descriptor number, " "with the result that the application might then read those events and " "interpret them as belonging to the file associated with the newly recycled " "watch descriptor. In practice, the likelihood of hitting this bug may be " "extremely low, since it requires that an application cycle through " "B watch descriptors, release a watch descriptor while leaving " "unread events for that watch descriptor in the queue, and then recycle that " "watch descriptor. For this reason, and because there have been no reports " "of the bug occurring in real-world applications, as of Linux 3.15, no kernel " "changes have yet been made to eliminate this possible bug." msgstr "" "Quand un descripteur de surveillance est supprimé en appelant " "B(2) (ou parce qu’un fichier de surveillance est supprimé " "ou que le système de fichiers qui le contient est démonté), tous les " "événements non lus en attente pour ce descripteur de fichier restent " "disponibles en lecture. Comme les descripteurs de surveillance sont ensuite " "alloués avec B(2), le noyau boucle sur l’intervalle des " "descripteurs de surveillance possibles (O à B) de façon " "incrémentielle. Lors de l’allocation d’un descripteur de surveillance libre, " "aucune vérification n’est effectuée pour voir si ce numéro de descripteur de " "surveillance a des événements non lus en attente dans la file inotify. " "Ainsi, un descripteur de surveillance pourrait être réalloué même quand des " "événements non lus en attente existent pour une incarnation précédente de ce " "numéro de descripteur de surveillance, avec comme résultat que l’application " "pourrait alors lire ces événements et les interpréter comme appartenant au " "fichier associé au descripteur de surveillance nouvellement recyclé. En " "pratique, la probabilité d’être victime de ce bogue devrait être extrêmement " "basse, puisqu’il nécessite qu’une application boucle sur " "B descripteurs de surveillance, relâche un descripteur de " "surveillance tout en laissant des événements non lus pour ce descripteur de " "fichier dans la file et ensuite recycle ce descripteur de surveillance. Pour " "cette raison, et parce qu’il n’y a eu aucun rapports de bogue à propos de " "réelles applications, dans Linux 3.15, aucune modification de noyau n’a " "encore été faite pour éliminer ce bogue éventuel." #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "$ B<./a.out /tmp /home/user/temp>\n" "Press enter key to terminate.\n" "Listening for events.\n" "IN_OPEN: /home/user/temp/foo [file]\n" "IN_CLOSE_WRITE: /home/user/temp/foo [file]\n" "IN_OPEN: /tmp/ [directory]\n" "IN_CLOSE_NOWRITE: /tmp/ [directory]\n" msgstr "" "$ B<./a.out /tmp /home/utilisateur/temp>\n" "Appuyer sur la touche Entrée pour quitter.\n" "En écoute d’événements.\n" "IN_OPEN : /home/utilisateur/temp/toto [fichier]\n" "IN_CLOSE_WRITE : /home/utilisateur/temp/toto [fichier]\n" "IN_OPEN : /tmp/ [répertoire]\n" "IN_CLOSE_NOWRITE : /tmp/ [répertoire]\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "Listening for events stopped.\n" msgstr "Arrêt de l’écoute d’événements.\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#include Eerrno.hE\n" "#include Epoll.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/inotify.hE\n" "#include Eunistd.hE\n" "#include Estring.hE\n" msgstr "" "#include Eerrno.hE\n" "#include Epoll.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/inotify.hE\n" "#include Eunistd.hE\n" "#include Estring.hE\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "/* Read all available inotify events from the file descriptor \\[aq]fd\\[aq].\n" " wd is the table of watch descriptors for the directories in argv.\n" " argc is the length of wd and argv.\n" " argv is the list of watched directories.\n" " Entry 0 of wd and argv is unused. */\n" msgstr "" "/* Lire tous les événements inotify disponibles à partir du\n" " descripteur de fichier «\\ fd\\ ».\n" " wd est le tableau des descripteurs de surveillance pour\n" " les répertoires en argv.\n" " argc est la taille de wd et argv.\n" " argv est la liste des répertoires surveillés.\n" " L’entrée\\ 0 de wd et argv n’est pas utilisée. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "static void\n" "handle_events(int fd, int *wd, int argc, char* argv[])\n" "{\n" " /* Some systems cannot read integer variables if they are not\n" " properly aligned. On other systems, incorrect alignment may\n" " decrease performance. Hence, the buffer used for reading from\n" " the inotify file descriptor should have the same alignment as\n" " struct inotify_event. */\n" msgstr "" "static void\n" "handle_events(int fd, int *wd, int argc, char* argv[])\n" "{\n" " /* Certains systèmes ne peuvent pas lire de variables entières\n" " si elles ne sont pas alignées correctement. Sur d’autres\n" " systèmes, un alignement incorrect pourrait diminuer les\n" " performances. Par conséquent, le tampon utilisé pour lire\n" " le descripteur de fichier inotify devrait avoir le même\n" " alignement que struct inotify_event. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " char buf[4096]\n" " __attribute__ ((aligned(__alignof__(struct inotify_event))));\n" " const struct inotify_event *event;\n" " ssize_t len;\n" msgstr "" " char buf[4096]\n" " __attribute__ ((aligned(__alignof__(struct inotify_event))));\n" " const struct inotify_event *event;\n" " ssize_t len;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Loop while events can be read from inotify file descriptor. */\n" msgstr "" " /* Boucler tant que les événements peuvent être lus à partir du\n" " descripteur de fichier inotify */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " for (;;) {\n" msgstr " for (;;) {\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Read some events. */\n" msgstr " /* Lire certains événements. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " len = read(fd, buf, sizeof(buf));\n" " if (len == -1 && errno != EAGAIN) {\n" " perror(\"read\");\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " len = read(fd, buf, sizeof(buf));\n" " if (len == -1 && errno != EAGAIN) {\n" " perror(\"read\");\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " /* If the nonblocking read() found no events to read, then\n" " it returns -1 with errno set to EAGAIN. In that case,\n" " we exit the loop. */\n" msgstr "" " /* Si le read() non bloquant n’a pas trouvé d’événement à\n" " lire, il renvoie -1 avec errno défini à EAGAIN. Dans ce\n" " cas, on sort de la boucle. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (len E= 0)\n" " break;\n" msgstr "" " if (len E= 0)\n" " break;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Loop over all events in the buffer. */\n" msgstr " /* Boucler sur tous les événements du tampon. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " for (char *ptr = buf; ptr E buf + len;\n" " ptr += sizeof(struct inotify_event) + event-Elen) {\n" msgstr "" " for (char *ptr = buf; ptr E buf + len;\n" " ptr += sizeof(struct inotify_event) + event-Elen) {\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " event = (const struct inotify_event *) ptr;\n" msgstr " event = (const struct inotify_event *) ptr;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Print event type. */\n" msgstr " /* Afficher le type d’événement. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (event-Emask & IN_OPEN)\n" " printf(\"IN_OPEN: \");\n" " if (event-Emask & IN_CLOSE_NOWRITE)\n" " printf(\"IN_CLOSE_NOWRITE: \");\n" " if (event-Emask & IN_CLOSE_WRITE)\n" " printf(\"IN_CLOSE_WRITE: \");\n" msgstr "" " if (event-Emask & IN_OPEN)\n" " printf(\"IN_OPEN : \");\n" " if (event-Emask & IN_CLOSE_NOWRITE)\n" " printf(\"IN_CLOSE_NOWRITE : \");\n" " if (event-Emask & IN_CLOSE_WRITE)\n" " printf(\"IN_CLOSE_WRITE : \");\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Print the name of the watched directory. */\n" msgstr " /* Afficher le nom du répertoire surveillé. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " for (size_t i = 1; i E argc; ++i) {\n" " if (wd[i] == event-Ewd) {\n" " printf(\"%s/\", argv[i]);\n" " break;\n" " }\n" " }\n" msgstr "" " for (size_t i = 1; i E argc; ++i) {\n" " if (wd[i] == event-Ewd) {\n" " printf(\"%s/\", argv[i]);\n" " break;\n" " }\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Print the name of the file. */\n" msgstr " /* Afficher le nom du fichier. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (event-Elen)\n" " printf(\"%s\", event-Ename);\n" msgstr "" " if (event-Elen)\n" " printf(\"%s\", event-Ename);\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Print type of filesystem object. */\n" msgstr " /* Afficher le type d’objet de système de fichiers. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (event-Emask & IN_ISDIR)\n" " printf(\" [directory]\\en\");\n" " else\n" " printf(\" [file]\\en\");\n" " }\n" " }\n" "}\n" msgstr "" " if (event-Emask & IN_ISDIR)\n" " printf(\" [répertoire]\\en\");\n" " else\n" " printf(\" [fichier]\\en\");\n" " }\n" " }\n" "}\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "int\n" "main(int argc, char* argv[])\n" "{\n" " char buf;\n" " int fd, i, poll_num;\n" " int *wd;\n" " nfds_t nfds;\n" " struct pollfd fds[2];\n" msgstr "" "int\n" "main(int argc, char* argv[])\n" "{\n" " char buf;\n" " int fd, i, poll_num;\n" " int *wd;\n" " nfds_t nfds;\n" " struct pollfd fds[2];\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (argc E 2) {\n" " printf(\"Usage: %s PATH [PATH ...]\\en\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " if (argc E 2) {\n" " printf(\"Utilisation\\ : %s CHEMIN [CHEMIN ...]\\en\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " printf(\"Press ENTER key to terminate.\\en\");\n" msgstr " printf(\"Appuyer sur la touche Entrée pour quitter.\\en\");\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Create the file descriptor for accessing the inotify API. */\n" msgstr "" " /* Créer le descripteur de fichier pour accéder à l’interface de\n" " programmation inotify. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " fd = inotify_init1(IN_NONBLOCK);\n" " if (fd == -1) {\n" " perror(\"inotify_init1\");\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " fd = inotify_init1(IN_NONBLOCK);\n" " if (fd == -1) {\n" " perror(\"inotify_init1\");\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Allocate memory for watch descriptors. */\n" msgstr " /* Allouer la mémoire pour les descripteurs de surveillance. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " wd = calloc(argc, sizeof(int));\n" " if (wd == NULL) {\n" " perror(\"calloc\");\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " wd = calloc(argc, sizeof(int));\n" " if (wd == NULL) {\n" " perror(\"calloc\");\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " /* Mark directories for events\n" " - file was opened\n" " - file was closed */\n" msgstr "" " /* Marquer les répertoires pour les événements :\n" " - un fichier a été ouvert ;\n" " - un fichier a été fermé\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " for (i = 1; i E argc; i++) {\n" " wd[i] = inotify_add_watch(fd, argv[i],\n" " IN_OPEN | IN_CLOSE);\n" " if (wd[i] == -1) {\n" " fprintf(stderr, \"Cannot watch \\[aq]%s\\[aq]: %s\\en\",\n" " argv[i], strerror(errno));\n" " exit(EXIT_FAILURE);\n" " }\n" " }\n" msgstr "" " for (i = 1; i E argc; i++) {\n" " wd[i] = inotify_add_watch(fd, argv[i],\n" " IN_OPEN | IN_CLOSE);\n" " if (wd[i] == -1) {\n" " fprintf(stderr,\n" " \"Impossible de surveiller « %s »\\en\", argv[i]);\n" " perror(\"inotify_add_watch\");\n" " exit(EXIT_FAILURE);\n" " }\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Prepare for polling. */\n" msgstr " /* Préparer pour la scrutation (polling). */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " nfds = 2;\n" msgstr " nfds = 2;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " fds[0].fd = STDIN_FILENO; /* Console input */\n" " fds[0].events = POLLIN;\n" msgstr "" " fds[0].fd = STDIN_FILENO; /* Entrée de console */\n" " fds[0].events = POLLIN;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " fds[1].fd = fd; /* Inotify input */\n" " fds[1].events = POLLIN;\n" msgstr "" " fds[1].fd = fd; /* Entrée d'inotify */\n" " fds[1].events = POLLIN;\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Wait for events and/or terminal input. */\n" msgstr " /* Attendre les événements ou une entrée du terminal. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " printf(\"Listening for events.\\en\");\n" " while (1) {\n" " poll_num = poll(fds, nfds, -1);\n" " if (poll_num == -1) {\n" " if (errno == EINTR)\n" " continue;\n" " perror(\"poll\");\n" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" " printf(\"En écoute d’événements.\\en\");\n" " while (1) {\n" " poll_num = poll(fds, nfds, -1);\n" " if (poll_num == -1) {\n" " if (errno == EINTR)\n" " continue;\n" " perror(\"poll\");\n" " exit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " if (poll_num E 0) {\n" msgstr " if (poll_num E 0) {\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " if (fds[0].revents & POLLIN) {\n" msgstr " if (fds[0].revents & POLLIN) {\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Console input is available. Empty stdin and quit. */\n" msgstr "" " /* Entrée de console disponible.\n" " Vider l’entrée standard et quitter. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " while (read(STDIN_FILENO, &buf, 1) E 0 && buf != \\[aq]\\en\\[aq])\n" " continue;\n" " break;\n" " }\n" msgstr "" " while (read(STDIN_FILENO, &buf, 1) E 0 && buf != \\[aq]\\en\\[aq])\n" " continue;\n" " break;\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " if (fds[1].revents & POLLIN) {\n" msgstr " if (fds[1].revents & POLLIN) {\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Inotify events are available. */\n" msgstr " /* Des événements inotify sont disponibles. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " handle_events(fd, wd, argc, argv);\n" " }\n" " }\n" " }\n" msgstr "" " handle_events(fd, wd, argc, argv);\n" " }\n" " }\n" " }\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " printf(\"Listening for events stopped.\\en\");\n" msgstr " printf(\"Arrêt de l’écoute d’événements.\\en\");\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Close inotify file descriptor. */\n" msgstr " /* Fermer le descripteur de fichier inotify. */\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " close(fd);\n" msgstr " close(fd);\n" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " free(wd);\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" " free(wd);\n" " 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)"