Debian Codegraph @

po/fr/man2/poll.2.po

raw
1 # French translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Christophe Blaess <https://www.blaess.fr/christophe/>, 1996-2003.
5 # Stéphan Rafin <[email protected]>, 2002.
6 # Thierry Vignaud <[email protected]>, 1999,2002.
7 # François Micaux, 2002.
8 # Alain Portal <[email protected]>, 2003-2008.
9 # Jean-Philippe Guérard <[email protected]>, 2005-2006.
10 # Jean-Luc Coulon (f5ibh) <[email protected]>, 2006-2007.
11 # Julien Cristau <[email protected]>, 2006-2007.
12 # Thomas Huriaux <[email protected]>, 2006-2008.
13 # Nicolas François <[email protected]>, 2006-2008.
14 # Florentin Duneau <[email protected]>, 2006-2010.
15 # Simon Paillard <[email protected]>, 2006.
16 # Denis Barbier <[email protected]>, 2006,2010.
17 # David Prévot <[email protected]>, 2010-2014.
18 # Jean-Philippe MENGUAL <[email protected]>, 2021-2024.
19 msgid ""
20 msgstr ""
21 "Project-Id-Version: manpages-l10n 4.22.0\n"
22 "POT-Creation-Date: 2026-06-05 06:35+0200\n"
23 "PO-Revision-Date: 2024-06-02 10:52+0200\n"
24 "Last-Translator: Jean-Philippe MENGUAL <[email protected]>\n"
25 "Language-Team: French <[email protected]>\n"
26 "Language: fr\n"
27 "MIME-Version: 1.0\n"
28 "Content-Type: text/plain; charset=UTF-8\n"
29 "Content-Transfer-Encoding: 8bit\n"
30 "Plural-Forms: nplurals=2; plural=n > 1;\n"
31 "X-Generator: Lokalize 22.12.3\n"
32
33 #. type: TH
34 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
35 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
36 #, no-wrap
37 msgid "poll"
38 msgstr "poll"
39
40 #. type: TH
41 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
42 #: opensuse-tumbleweed
43 #, no-wrap
44 msgid "2026-02-08"
45 msgstr "8 février 2026"
46
47 #. type: TH
48 #: archlinux debian-unstable
49 #, no-wrap
50 msgid "Linux man-pages 6.18"
51 msgstr "Pages du manuel de Linux 6.18"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "NAME"
58 msgstr "NOM"
59
60 #. type: Plain text
61 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
62 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "poll, ppoll - wait for some event on a file descriptor"
64 msgstr ""
65 "poll, ppoll - Attendre un événement concernant un descripteur de fichier"
66
67 #. type: SH
68 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
69 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
70 #, no-wrap
71 msgid "LIBRARY"
72 msgstr "BIBLIOTHÈQUE"
73
74 #. type: Plain text
75 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
76 #: opensuse-leap-16-1 opensuse-tumbleweed
77 msgid "Standard C library (I<libc>,\\ I<-lc>)"
78 msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)"
79
80 #. type: SH
81 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
82 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
83 #, no-wrap
84 msgid "SYNOPSIS"
85 msgstr "SYNOPSIS"
86
87 #. type: Plain text
88 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
89 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
90 #, no-wrap
91 msgid "B<#include E<lt>poll.hE<gt>>\n"
92 msgstr "B<#include E<lt>poll.hE<gt>>\n"
93
94 #. type: Plain text
95 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
96 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
97 #, no-wrap
98 msgid "B<int poll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, int >I<timeout>B<);>\n"
99 msgstr "B<int poll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, int >I<timeout>B<);>\n"
100
101 #. type: Plain text
102 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
103 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
104 #, no-wrap
105 msgid ""
106 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
107 "B<#include E<lt>poll.hE<gt>>\n"
108 msgstr ""
109 "B<#define _GNU_SOURCE> /* Consultez feature_test_macros(7) */\n"
110 "B<#include E<lt>poll.hE<gt>>\n"
111
112 #. type: Plain text
113 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
114 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
115 #, no-wrap
116 msgid ""
117 "B<int ppoll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<,>\n"
118 "B< const struct timespec *_Nullable >I<tmo_p>B<,>\n"
119 "B< const sigset_t *_Nullable >I<sigmask>B<);>\n"
120 msgstr ""
121 "B<int ppoll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<,>\n"
122 "B< const struct timespec *_Nullable >I<tmo_p>B<,>\n"
123 "B< const sigset_t *_Nullable >I<sigmask>B<);>\n"
124
125 #. type: SH
126 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
127 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
128 #, no-wrap
129 msgid "DESCRIPTION"
130 msgstr "DESCRIPTION"
131
132 #. type: Plain text
133 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
134 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
135 msgid ""
136 "B<poll>() performs a similar task to B<select>(2): it waits for one of a "
137 "set of file descriptors to become ready to perform I/O. The Linux-specific "
138 "B<epoll>(7) API performs a similar task, but offers features beyond those "
139 "found in B<poll>()."
140 msgstr ""
141 "B<poll>() fait la même chose que B<select>(2)\\ : il attend que l'un des "
142 "descripteurs de fichier soit prêt pour des entrées et sorties. L'API de "
143 "B<epoll>(7) spécifique à Linux fait la même chose, mais avec des "
144 "fonctionnalités allant au-delà de celles de B<poll>()."
145
146 #. type: Plain text
147 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
148 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
149 msgid ""
150 "The set of file descriptors to be monitored is specified in the I<fds> "
151 "argument, which is an array of structures of the following form:"
152 msgstr ""
153 "L'ensemble de descripteurs de fichier à surveiller est indiqué dans "
154 "l'argument I<fds> qui est un tableau de structures de la forme suivante\\ :"
155
156 #. type: Plain text
157 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
158 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
159 #, no-wrap
160 msgid ""
161 "struct pollfd {\n"
162 " int fd; /* file descriptor */\n"
163 " short events; /* requested events */\n"
164 " short revents; /* returned events */\n"
165 "};\n"
166 msgstr ""
167 "struct pollfd {\n"
168 " int fd; /* Descripteur de fichier */\n"
169 " short events; /* Événements attendus */\n"
170 " short revents; /* Événements détectés */\n"
171 "};\n"
172
173 #. type: Plain text
174 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
175 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
176 msgid ""
177 "The caller should specify the number of items in the I<fds> array in I<nfds>."
178 msgstr ""
179 "L'appelant doit spécifier le nombre d'éléments du tableau I<fds> dans "
180 "I<nfds>."
181
182 #. type: Plain text
183 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
184 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
185 msgid ""
186 "The field I<fd> contains a file descriptor for an open file. If this field "
187 "is negative, then the corresponding I<events> field is ignored and the "
188 "I<revents> field returns zero. (This provides an easy way of ignoring a "
189 "file descriptor for a single B<poll>() call: simply set the I<fd> field to "
190 "its bitwise complement.)"
191 msgstr ""
192 "Le champ I<fd> contient un descripteur de fichier pour un fichier ouvert. Si "
193 "ce champ est négatif, alors le champ I<events> correspondant est ignoré et "
194 "le champ I<revents> renvoie zéro (cela permet d'ignorer facilement un "
195 "descripteur de fichier pour un seul appel B<poll>() : il suffit de définir "
196 "le champ I<fd> à son complément bit à bit)."
197
198 #. type: Plain text
199 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
200 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
201 msgid ""
202 "The field I<events> is an input parameter, a bit mask specifying the events "
203 "the application is interested in for the file descriptor I<fd>. This field "
204 "may be specified as zero, in which case the only events that can be returned "
205 "in I<revents> are B<POLLHUP>, B<POLLERR>, and B<POLLNVAL> (see below)."
206 msgstr ""
207 "Le champ I<events> est un paramètre d'entrée, un masque de bits indiquant "
208 "les événements qui intéressent l'application pour le descripteur de fichier "
209 "I<fd>. Ce champ peut être nul, auquel cas les seuls événements qui peuvent "
210 "être renvoyés dans I<revents> sont B<POLLHUP>, B<POLLERR> et B<POLLNVAL> "
211 "(voir ci-dessous)."
212
213 #. type: Plain text
214 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
215 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
216 msgid ""
217 "The field I<revents> is an output parameter, filled by the kernel with the "
218 "events that actually occurred. The bits returned in I<revents> can include "
219 "any of those specified in I<events>, or one of the values B<POLLERR>, "
220 "B<POLLHUP>, or B<POLLNVAL>. (These three bits are meaningless in the "
221 "I<events> field, and will be set in the I<revents> field whenever the "
222 "corresponding condition is true.)"
223 msgstr ""
224 "Le champ I<revents> est un paramètre de sortie, rempli par le noyau avec les "
225 "événements qui se sont effectivement produits, d'un des types demandés par "
226 "I<events> ou de l'une des valeurs B<POLLERR>, B<POLLHUP> ou B<POLLNVAL>. "
227 "(Ces trois bits n'ont pas de signification dans la demande I<events> et se "
228 "trouvent positionnés dans la valeur de retour I<revents> si l'une des "
229 "conditions correspondantes se produit.)"
230
231 #. type: Plain text
232 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
233 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
234 msgid ""
235 "If none of the events requested (and no error) has occurred for any of the "
236 "file descriptors, then B<poll>() blocks until one of the events occurs."
237 msgstr ""
238 "Si aucun événement attendu (ni aucune erreur) ne s'est déjà produit, "
239 "B<poll>() bloque jusqu'à ce que l'un des événements se produise."
240
241 #. type: Plain text
242 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
243 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
244 msgid ""
245 "The I<timeout> argument specifies the number of milliseconds that B<poll>() "
246 "should block waiting for a file descriptor to become ready. The call will "
247 "block until either:"
248 msgstr ""
249 "L'argument I<timeout> définit le temps en milliseconde pendant lequel "
250 "B<poll>() devrait bloquer en attendant que le descripteur de fichier soit "
251 "prêt. L’appel bloquera jusqu’au premier événement suivant :"
252
253 #. type: IP
254 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
255 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
256 #, no-wrap
257 msgid "\\[bu]"
258 msgstr "-"
259
260 #. type: Plain text
261 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
262 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
263 msgid "a file descriptor becomes ready;"
264 msgstr "un descripteur de fichier devient prêt ;"
265
266 #. type: Plain text
267 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
268 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
269 msgid "the call is interrupted by a signal handler; or"
270 msgstr "l’appel est interrompu par un gestionnaire de signal ;"
271
272 #. type: Plain text
273 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
274 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
275 msgid "the timeout expires."
276 msgstr "le délai expire."
277
278 #. type: Plain text
279 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
280 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
281 msgid ""
282 "Being \"ready\" means that the requested operation will not block; thus, "
283 "B<poll>()ing regular files, block devices, and other files with no "
284 "reasonable polling semantic I<always> returns instantly as ready to read and "
285 "write."
286 msgstr ""
287 "Être « prêt » signifie que l'opération requise ne sera pas bloquée ; donc, "
288 "l'exécution de B<poll>() sur des fichiers ordinaires, des périphériques bloc "
289 "et d'autres fichiers sans sémantique de scrutation correcte rend la main "
290 "I<toujours> instantanément comme prêt à lire et à écrire."
291
292 #. type: Plain text
293 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
294 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
295 msgid ""
296 "Note that the I<timeout> interval will be rounded up to the system clock "
297 "granularity, and kernel scheduling delays mean that the blocking interval "
298 "may overrun by a small amount. Specifying a negative value in I<timeout> "
299 "means an infinite timeout. Specifying a I<timeout> of zero causes "
300 "B<poll>() to return immediately, even if no file descriptors are ready."
301 msgstr ""
302 "Remarquez que l’intervalle I<timeout> sera arrondi à la granularité de "
303 "l'horloge système et que les délais d'ordonnancement du noyau signifient que "
304 "l'intervalle de blocage pourrait être dépassé d'une petite quantité. Une "
305 "valeur négative de I<timeout> signifie un délai infini, alors qu'un "
306 "I<timeout> nul force B<epoll>() à se terminer immédiatement, même si aucun "
307 "descripteur de fichier n'est prêt."
308
309 #. type: Plain text
310 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
311 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
312 msgid ""
313 "The bits that may be set/returned in I<events> and I<revents> are defined in "
314 "I<E<lt>poll.hE<gt>>:"
315 msgstr ""
316 "Les bits qui peuvent être activés ou renvoyés dans I<events> et I<revents> "
317 "sont définis par I<E<lt>poll.hE<gt>>\\ :"
318
319 #. type: TP
320 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
321 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
322 #, no-wrap
323 msgid "B<POLLIN>"
324 msgstr "B<POLLIN>"
325
326 #. type: Plain text
327 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
328 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
329 msgid "There is data to read."
330 msgstr "Il y a des données en attente de lecture."
331
332 #. type: TP
333 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
334 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
335 #, no-wrap
336 msgid "B<POLLPRI>"
337 msgstr "B<POLLPRI>"
338
339 #. type: Plain text
340 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
341 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
342 msgid ""
343 "There is some exceptional condition on the file descriptor. Possibilities "
344 "include:"
345 msgstr ""
346 "Il existe une condition d'exception sur le descripteur de fichier. Parmi "
347 "celles possibles :"
348
349 #. type: Plain text
350 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
351 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
352 msgid "There is out-of-band data on a TCP socket (see B<tcp>(7))."
353 msgstr "Des données dépassent sur un socket TCP (voir B<tcp>(7))."
354
355 #. type: Plain text
356 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
357 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
358 msgid ""
359 "A pseudoterminal master in packet mode has seen a state change on the slave "
360 "(see B<ioctl_tty>(2))."
361 msgstr ""
362 "Un pseudoterminal maître en mode paquet a vu un changement d'état sur "
363 "l'esclave (voir B<ioctl_tty>(2))."
364
365 #. type: Plain text
366 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
367 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
368 msgid "A I<cgroup.events> file has been modified (see B<cgroups>(7))."
369 msgstr "Un fichier I<cgroup.events> a été modifié (voir B<cgroups>(7))."
370
371 #. type: TP
372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
374 #, no-wrap
375 msgid "B<POLLOUT>"
376 msgstr "B<POLLOUT>"
377
378 #. type: Plain text
379 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
380 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
381 msgid ""
382 "Writing is now possible, though a write larger than the available space in a "
383 "socket or pipe will still block (unless B<O_NONBLOCK> is set)."
384 msgstr ""
385 "L'écriture est maintenant possible, mais une écriture plus grande que "
386 "l'espace disponible sur un socket ou un tube bloquera encore (sauf si "
387 "B<O_NONBLOCK> est positionné)."
388
389 #. type: TP
390 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
391 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
392 #, no-wrap
393 msgid "B<POLLRDHUP> (since Linux 2.6.17)"
394 msgstr "B<POLLRDHUP> (depuis Linux 2.6.17)"
395
396 #. type: Plain text
397 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
398 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
399 msgid ""
400 "Stream socket peer closed connection, or shut down writing half of "
401 "connection. The B<_GNU_SOURCE> feature test macro must be defined (before "
402 "including I<any> header files) in order to obtain this definition."
403 msgstr ""
404 "Le correspondant sur un socket en mode flux a fermé la connexion ou bien a "
405 "terminé la partie écriture de la connexion. La macro de test de "
406 "fonctionnalité B<_GNU_SOURCE> doit être définie (avant d'inclure I<tout> "
407 "fichier d'en\\(hytête) pour obtenir cette définition."
408
409 #. type: TP
410 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
411 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
412 #, no-wrap
413 msgid "B<POLLERR>"
414 msgstr "B<POLLERR>"
415
416 #. type: Plain text
417 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
418 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
419 msgid ""
420 "Error condition (only returned in I<revents>; ignored in I<events>). This "
421 "bit is also set for a file descriptor referring to the write end of a pipe "
422 "when the read end has been closed."
423 msgstr ""
424 "Condition d'erreur (renvoyée seulement dans I<revents> ; ignorée dans "
425 "I<events>). Ce bit est aussi positionné pour un descripteur de fichier qui "
426 "se rapporte à une fin d'écriture sur un tube lorsque la fin de lecture a été "
427 "fermée."
428
429 #. type: TP
430 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
431 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
432 #, no-wrap
433 msgid "B<POLLHUP>"
434 msgstr "B<POLLHUP>"
435
436 #. type: Plain text
437 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
438 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
439 msgid ""
440 "Hang up (only returned in I<revents>; ignored in I<events>). Note that when "
441 "reading from a channel such as a pipe or a stream socket, this event merely "
442 "indicates that the peer closed its end of the channel. Subsequent reads "
443 "from the channel will return 0 (end of file) only after all outstanding "
444 "data in the channel has been consumed."
445 msgstr ""
446 "Plantage (renvoyé seulement dans I<revents> ; ignoré dans I<events>). "
447 "Remarquez qu'en lecture à partir d'un canal tel qu'un tube ou un socket de "
448 "flux, cet événement indique simplement que le pair a fermé la fin de son "
449 "canal. Les lectures suivantes à partir du canal ne renverront B<0> (fin de "
450 "fichier) qu'après que toutes les données du canal aient été consommées."
451
452 #. type: TP
453 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
454 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
455 #, no-wrap
456 msgid "B<POLLNVAL>"
457 msgstr "B<POLLNVAL>"
458
459 #. type: Plain text
460 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
461 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
462 msgid ""
463 "Invalid request: I<fd> not open (only returned in I<revents>; ignored in "
464 "I<events>)."
465 msgstr ""
466 "Requête non valable\\ : I<fd> n'est pas ouvert (renvoyé seulement dans "
467 "I<revents> ; ignoré dans I<events>)."
468
469 #. type: Plain text
470 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
471 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
472 msgid ""
473 "When compiling with B<_XOPEN_SOURCE> defined, one also has the following, "
474 "which convey no further information beyond the bits listed above:"
475 msgstr ""
476 "Lorsque B<_XOPEN_SOURCE> est défini à la compilation, les macros suivantes "
477 "sont également définies (mais n'apportent pas d'informations supplémentaires "
478 "par rapport aux bits listés ci\\(hydessus\\ :"
479
480 #. type: TP
481 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
482 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
483 #, no-wrap
484 msgid "B<POLLRDNORM>"
485 msgstr "B<POLLRDNORM>"
486
487 #. type: Plain text
488 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
489 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
490 msgid "Equivalent to B<POLLIN>."
491 msgstr "Équivalent à B<POLLIN>."
492
493 #. type: TP
494 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
495 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
496 #, no-wrap
497 msgid "B<POLLRDBAND>"
498 msgstr "B<POLLRDBAND>"
499
500 #. POLLRDBAND is used in the DECnet protocol.
501 #. type: Plain text
502 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
503 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
504 msgid "Priority band data can be read (generally unused on Linux)."
505 msgstr ""
506 "Des données prioritaires sont en attente de lecture (généralement inutilisé "
507 "sous Linux)."
508
509 #. type: TP
510 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
511 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
512 #, no-wrap
513 msgid "B<POLLWRNORM>"
514 msgstr "B<POLLWRNORM>"
515
516 #. type: Plain text
517 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
518 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
519 msgid "Equivalent to B<POLLOUT>."
520 msgstr "Équivalent à B<POLLOUT>."
521
522 #. type: TP
523 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
524 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
525 #, no-wrap
526 msgid "B<POLLWRBAND>"
527 msgstr "B<POLLWRBAND>"
528
529 #. type: Plain text
530 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
531 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
532 msgid "Priority data may be written."
533 msgstr "Des données prioritaires peuvent être écrites."
534
535 #. type: Plain text
536 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
537 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
538 msgid "Linux also knows about, but does not use B<POLLMSG>."
539 msgstr "Linux connaît aussi B<POLLMSG>, mais ne l'utilise pas."
540
541 #. type: SS
542 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
543 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
544 #, no-wrap
545 msgid "ppoll()"
546 msgstr "ppoll()"
547
548 #. type: Plain text
549 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
550 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
551 msgid ""
552 "The relationship between B<poll>() and B<ppoll>() is analogous to the "
553 "relationship between B<select>(2) and B<pselect>(2): like B<pselect>(2), "
554 "B<ppoll>() allows an application to safely wait until either a file "
555 "descriptor becomes ready or until a signal is caught."
556 msgstr ""
557 "La relation entre B<poll>() et B<ppoll>() est similaire à la relation entre "
558 "B<select>(2) et B<pselect>(2)\\ : comme B<pselect>(2), B<ppoll>() permet à "
559 "une application d'attendre de façon sûre que soit un descripteur de fichier "
560 "soit prêt, soit un signal soit reçu."
561
562 #. type: Plain text
563 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
564 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
565 msgid ""
566 "Other than the difference in the precision of the I<timeout> argument, the "
567 "following B<ppoll>() call:"
568 msgstr ""
569 "Mise à part la différence de précision de l'argument I<timeout>, l'appel "
570 "B<ppoll>() suivant\\ :"
571
572 #. type: Plain text
573 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
574 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
575 #, no-wrap
576 msgid "ready = ppoll(&fds, nfds, tmo_p, &sigmask);\n"
577 msgstr "ready = ppoll(&fds, nfds, tmo_p, &sigmask);\n"
578
579 #. type: Plain text
580 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
581 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
582 msgid "is nearly equivalent to I<atomically> executing the following calls:"
583 msgstr ""
584 "est presque équivalent à exécuter de façon I<atomique> les appels suivants :"
585
586 #. type: Plain text
587 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
588 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
589 #, no-wrap
590 msgid ""
591 "sigset_t origmask;\n"
592 "int timeout;\n"
593 "\\&\n"
594 "timeout = (tmo_p == NULL) ? -1 :\n"
595 " (tmo_p-E<gt>tv_sec * 1000 + tmo_p-E<gt>tv_nsec / 1000000);\n"
596 "pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);\n"
597 "ready = poll(&fds, nfds, timeout);\n"
598 "pthread_sigmask(SIG_SETMASK, &origmask, NULL);\n"
599 msgstr ""
600 "sigset_t origmask;\n"
601 "int timeout;\n"
602 "\\&\n"
603 "timeout = (tmo_p == NULL) ? -1 :\n"
604 " (tmo_p-E<gt>tv_sec * 1000 + tmo_p-E<gt>tv_nsec / 1000000);\n"
605 "pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);\n"
606 "ready = poll(&fds, nfds, timeout);\n"
607 "pthread_sigmask(SIG_SETMASK, &origmask, NULL);\n"
608
609 #. type: Plain text
610 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
611 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
612 msgid ""
613 "The above code segment is described as I<nearly> equivalent because whereas "
614 "a negative I<timeout> value for B<poll>() is interpreted as an infinite "
615 "timeout, a negative value expressed in I<*tmo_p> results in an error from "
616 "B<ppoll>()."
617 msgstr ""
618 "Le bout de code ci-dessus est décrit comme I<presque> équivalent parce "
619 "qu’une valeur négative dans I<*tmo_p> donne une erreur de B<ppoll>(), tandis "
620 "qu’une valeur négative de I<timeout> pour B<poll>() est interprétée comme un "
621 "délai infini."
622
623 #. type: Plain text
624 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
625 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
626 msgid ""
627 "See the description of B<pselect>(2) for an explanation of why B<ppoll>() "
628 "is necessary."
629 msgstr ""
630 "Consultez la description de B<pselect>(2) pour une explication de la "
631 "nécessité de B<ppoll>()."
632
633 #. type: Plain text
634 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
635 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
636 msgid ""
637 "If the I<sigmask> argument is specified as NULL, then no signal mask "
638 "manipulation is performed (and thus B<ppoll>() differs from B<poll>() only "
639 "in the precision of the I<timeout> argument)."
640 msgstr ""
641 "Si le paramètre I<sigmask> est défini comme NULL, aucune manipulation de "
642 "masque de signaux n'est effectuée (et ainsi B<ppoll>() ne diffère de "
643 "B<poll>() que dans la précision du paramètre I<timeout>)."
644
645 #. type: Plain text
646 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
647 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
648 msgid ""
649 "The I<tmo_p> argument specifies an upper limit on the amount of time that "
650 "B<ppoll>() will block. This argument is a pointer to a B<timespec>(3) "
651 "structure."
652 msgstr ""
653 "L'argument I<tmo_p> définit une limite supérieure sur le temps pendant "
654 "lequel B<ppoll>() bloquera. Cet argument est un pointeur vers une structure "
655 "B<timespec>(3) :"
656
657 #. type: Plain text
658 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
659 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
660 msgid ""
661 "If I<tmo_p> is specified as NULL, then B<ppoll>() can block indefinitely."
662 msgstr "Si I<tmo_p> est NULL, B<ppoll>() pourra bloquer indéfiniment."
663
664 #. type: SH
665 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
666 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
667 #, no-wrap
668 msgid "RETURN VALUE"
669 msgstr "VALEUR RENVOYÉE"
670
671 #. type: Plain text
672 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
673 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
674 msgid ""
675 "On success, B<poll>() returns a nonnegative value which is the number of "
676 "elements in the I<pollfds> whose I<revents> fields have been set to a "
677 "nonzero value (indicating an event or an error). A return value of zero "
678 "indicates that the system call timed out before any file descriptors became "
679 "ready."
680 msgstr ""
681 "En cas de succès, B<poll>() renvoie une valeur non négative qui est un "
682 "nombre d'éléments dans I<pollfds> dont les champs I<revents> ont été "
683 "positionnés sur une valeur autre que zéro (indiquant un événement ou une "
684 "erreur). Un code de retour de zéro indique que l'appel système a atteint son "
685 "délai avant qu'un descripteur de fichier ne soit prêt."
686
687 #. type: Plain text
688 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
689 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
690 msgid "On error, -1 is returned, and I<errno> is set to indicate the error."
691 msgstr ""
692 "En cas d'erreur, la valeur de retour est B<-1> et I<errno> est définie pour "
693 "préciser l'erreur."
694
695 #. type: SH
696 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
697 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
698 #, no-wrap
699 msgid "ERRORS"
700 msgstr "ERREURS"
701
702 #. type: TP
703 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
704 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
705 #, no-wrap
706 msgid "B<EFAULT>"
707 msgstr "B<EFAULT>"
708
709 #. type: Plain text
710 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
711 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
712 msgid ""
713 "I<fds> points outside the process's accessible address space. The array "
714 "given as argument was not contained in the calling program's address space."
715 msgstr ""
716 "I<fds> pointe hors de l'espace d'adressage accessible. Le tableau donné en "
717 "argument ne se trouvait pas dans l'espace d'adressage du programme appelant."
718
719 #. type: TP
720 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
721 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
722 #, no-wrap
723 msgid "B<EINTR>"
724 msgstr "B<EINTR>"
725
726 #. type: Plain text
727 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
728 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
729 msgid "A signal occurred before any requested event; see B<signal>(7)."
730 msgstr ""
731 "Un signal a été reçu avant qu'un événement intéressant ne se produise ; voir "
732 "B<signal>(7)."
733
734 #. type: TP
735 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
736 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
737 #, no-wrap
738 msgid "B<EINVAL>"
739 msgstr "B<EINVAL>"
740
741 #. type: Plain text
742 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
743 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
744 msgid "The I<nfds> value exceeds the B<RLIMIT_NOFILE> value."
745 msgstr "La valeur I<nfds> dépasse la valeur B<RLIMIT_NOFILE>."
746
747 #. type: Plain text
748 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
749 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
750 msgid ""
751 "(B<ppoll>()) The timeout value expressed in I<*tmo_p> is invalid (negative)."
752 msgstr ""
753 "(B<ppoll>()) La valeur du délai exprimée dans I<*tmo_p> n'est pas valable "
754 "(négative)."
755
756 #. type: TP
757 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
758 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
759 #, no-wrap
760 msgid "B<ENOMEM>"
761 msgstr "B<ENOMEM>"
762
763 #. type: Plain text
764 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
765 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
766 msgid "Unable to allocate memory for kernel data structures."
767 msgstr ""
768 "Impossible d'allouer de la mémoire pour des structures de données du noyau."
769
770 #. type: SH
771 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
772 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
773 #, no-wrap
774 msgid "VERSIONS"
775 msgstr "VERSIONS"
776
777 #. Darwin, according to a report by Jeremy Sequoia, relayed by Josh Triplett
778 #. type: Plain text
779 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
780 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
781 msgid ""
782 "On some other UNIX systems, B<poll>() can fail with the error B<EAGAIN> if "
783 "the system fails to allocate kernel-internal resources, rather than "
784 "B<ENOMEM> as Linux does. POSIX permits this behavior. Portable programs "
785 "may wish to check for B<EAGAIN> and loop, just as with B<EINTR>."
786 msgstr ""
787 "Sur d'autres systèmes UNIX, B<poll>() peut échouer avec l'erreur B<EAGAIN> "
788 "si le système n'arrive pas à allouer des ressources internes au noyau, et "
789 "non avec B<ENOMEM> comme sur Linux. POSIX autorise ce comportement. Les "
790 "programmes portables peuvent vouloir vérifier B<EAGAIN> et tourner en "
791 "boucle, comme avec B<EINTR>."
792
793 #. type: Plain text
794 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
795 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
796 msgid ""
797 "Some implementations define the nonstandard constant B<INFTIM> with the "
798 "value -1 for use as a I<timeout> for B<poll>(). This constant is not "
799 "provided in glibc."
800 msgstr ""
801 "Certaines implémentations définissent la constante symbolique non standard "
802 "B<INFTIM> de valeur B<-1>, à utiliser comme I<timeout> pour B<poll>(). Cette "
803 "constante n'est pas fournie par la glibc."
804
805 #. type: SS
806 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
807 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
808 #, no-wrap
809 msgid "C library/kernel differences"
810 msgstr "Différences entre bibliothèque C et noyau"
811
812 #. type: Plain text
813 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
814 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
815 msgid ""
816 "The Linux B<ppoll>() system call modifies its I<tmo_p> argument. However, "
817 "the glibc wrapper function hides this behavior by using a local variable for "
818 "the timeout argument that is passed to the system call. Thus, the glibc "
819 "B<ppoll>() function does not modify its I<tmo_p> argument."
820 msgstr ""
821 "L'appel système B<ppoll>() sous Linux modifie son argument I<tmo_p>. "
822 "Cependant, l'enveloppe fournie par la glibc cache ce comportement en "
823 "utilisant une variable locale pour le délai qui est fournie à l'appel "
824 "système. Ainsi, la fonction B<ppoll>() de la glibc ne modifie donc pas son "
825 "argument I<tmo_p>."
826
827 #. type: Plain text
828 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
829 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
830 msgid ""
831 "The raw B<ppoll>() system call has a fifth argument, I<size_t sigsetsize>, "
832 "which specifies the size in bytes of the I<sigmask> argument. The glibc "
833 "B<ppoll>() wrapper function specifies this argument as a fixed value (equal "
834 "to I<sizeof(kernel_sigset_t)>). See B<sigprocmask>(2) for a discussion on "
835 "the differences between the kernel and the libc notion of the sigset."
836 msgstr ""
837 "L'appel système B<ppoll>() brut a un cinquième paramètre, I<size_t "
838 "sigsetsize>, qui indique la taille en octets du paramètre I<sigmask>. La "
839 "fonction enveloppe B<ppoll>() de la glibc indique ce paramètre comme une "
840 "valeur fixe (égale à I<sizeof(kernel_sigset_t)>). Voir B<sigprocmask>(2) "
841 "pour un point sur les différences entre l'approche du noyau et de la libc de "
842 "sigset."
843
844 #. type: SH
845 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
846 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
847 #, no-wrap
848 msgid "STANDARDS"
849 msgstr "NORMES"
850
851 #. type: Plain text
852 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
853 #: opensuse-tumbleweed
854 msgid "POSIX.1-2024."
855 msgstr "POSIX.1-2024."
856
857 #. type: SH
858 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
859 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
860 #, no-wrap
861 msgid "HISTORY"
862 msgstr "HISTORIQUE"
863
864 #. type: TP
865 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
866 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
867 #, no-wrap
868 msgid "B<poll>()"
869 msgstr "B<poll>()"
870
871 #. type: Plain text
872 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
873 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
874 msgid "POSIX.1-2001. Linux 2.1.23."
875 msgstr "POSIX.1-2001, Linux 2.1.23."
876
877 #. type: Plain text
878 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
879 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
880 msgid ""
881 "On older kernels that lack this system call, the glibc B<poll>() wrapper "
882 "function provides emulation using B<select>(2)."
883 msgstr ""
884 "Sur les anciens noyaux sans cet appel système, la fonction enveloppe "
885 "B<poll>() de la glibc fournit une émulation en utilisant B<select>(2)."
886
887 #. type: TP
888 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
889 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
890 #, no-wrap
891 msgid "B<ppoll>()"
892 msgstr "B<ppoll>()"
893
894 #. type: Plain text
895 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
896 #: opensuse-tumbleweed
897 #, fuzzy
898 #| msgid "POSIX.1-2008. Linux 2.6.16, glibc 2.4."
899 msgid "POSIX.1-2024. Linux 2.6.16, glibc 2.4."
900 msgstr "POSIX.1-2008. Linux 2.6.16, glibc 2.4."
901
902 #. type: SH
903 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
904 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
905 #, no-wrap
906 msgid "NOTES"
907 msgstr "NOTES"
908
909 #. type: Plain text
910 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
911 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
912 msgid ""
913 "The operation of B<poll>() and B<ppoll>() is not affected by the "
914 "B<O_NONBLOCK> flag."
915 msgstr ""
916 "L'opération de B<poll>() et B<ppoll>() n'est pas concernée par l'attribut "
917 "B<O_NONBLOCK>."
918
919 #. type: Plain text
920 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
921 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
922 msgid ""
923 "For a discussion of what may happen if a file descriptor being monitored by "
924 "B<poll>() is closed in another thread, see B<select>(2)."
925 msgstr ""
926 "Consultez B<select>(2) pour une discussion sur ce qui pourrait arriver si un "
927 "descripteur de fichier surveillé par B<poll>() est fermé dans un autre "
928 "thread."
929
930 #. type: SH
931 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
932 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
933 #, no-wrap
934 msgid "BUGS"
935 msgstr "BOGUES"
936
937 #. type: Plain text
938 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
939 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
940 msgid ""
941 "See the discussion of spurious readiness notifications under the BUGS "
942 "section of B<select>(2)."
943 msgstr ""
944 "Consultez la discussion sur les notifications non voulues dans la section "
945 "BOGUES de B<select>(2)."
946
947 #. type: SH
948 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
949 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
950 #, no-wrap
951 msgid "EXAMPLES"
952 msgstr "EXEMPLES"
953
954 #. type: Plain text
955 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
956 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
957 msgid ""
958 "The program below opens each of the files named in its command-line "
959 "arguments and monitors the resulting file descriptors for readiness to read "
960 "(B<POLLIN>). The program loops, repeatedly using B<poll>() to monitor the "
961 "file descriptors, printing the number of ready file descriptors on return. "
962 "For each ready file descriptor, the program:"
963 msgstr ""
964 "Le programme ci-dessous ouvre chacun des fichiers nommés sur ses paramètres "
965 "de la ligne de commande et surveille les descripteurs de fichier qui en "
966 "résultent quand à leur possibilité d'être lus (B<POLLIN>). Le programme "
967 "effectue une boucle de B<poll>() pour surveiller les descripteurs de "
968 "fichier, affichant en retour le nombre de descripteurs de fichier prêts. "
969 "Pour chaque descripteur disponible, le programme :"
970
971 #. type: Plain text
972 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
973 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
974 msgid "displays the returned I<revents> field in a human-readable form;"
975 msgstr ""
976 "affiche le champ I<revents> renvoyé sous une forme lisible par un humain ;"
977
978 #. type: Plain text
979 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
980 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
981 msgid ""
982 "if the file descriptor is readable, reads some data from it, and displays "
983 "that data on standard output; and"
984 msgstr ""
985 "si le descripteur de fichier est lisible, y lit des données et affiche ces "
986 "données sur la sortie standard ; et"
987
988 #. type: Plain text
989 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
990 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
991 msgid ""
992 "if the file descriptor was not readable, but some other event occurred "
993 "(presumably B<POLLHUP>), closes the file descriptor."
994 msgstr ""
995 "si le descripteur de fichier n'était pas lisible, mais qu'un autre événement "
996 "s'est produit (probablement B<POLLHUP>), ferme le descripteur de fichier."
997
998 #. type: Plain text
999 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1000 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1001 msgid "Suppose we run the program in one terminal, asking it to open a FIFO:"
1002 msgstr ""
1003 "Supposons qu'on lance le programme dans un terminal, en lui demandant "
1004 "d'ouvrir un FIFO :"
1005
1006 #. type: Plain text
1007 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1008 #: opensuse-tumbleweed
1009 #, fuzzy, no-wrap
1010 #| msgid ""
1011 #| "$ B<mkfifo myfifo>\n"
1012 #| "$ B<./poll_input myfifo>\n"
1013 msgid ""
1014 "$B< mkfifo myfifo>;\n"
1015 "$B< ./poll_input myfifo>;\n"
1016 msgstr ""
1017 "$ B<mkfifo monfifo>\n"
1018 "$ B<./poll_input monfifo>\n"
1019
1020 #. type: Plain text
1021 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1022 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1023 msgid ""
1024 "In a second terminal window, we then open the FIFO for writing, write some "
1025 "data to it, and close the FIFO:"
1026 msgstr ""
1027 "Dans une deuxième fenêtre de terminal, on ouvre alors le FIFO en écriture, "
1028 "on y écrit des données et on ferme le FIFO :"
1029
1030 #. type: Plain text
1031 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1032 #: opensuse-tumbleweed
1033 #, fuzzy, no-wrap
1034 #| msgid "$ B<echo aaaaabbbbbccccc E<gt> myfifo>\n"
1035 msgid "$B< echo aaaaabbbbbccccc E<gt> myfifo>;\n"
1036 msgstr "$ B<echo aaaaabbbbbccccc E<gt> monfifo>\n"
1037
1038 #. type: Plain text
1039 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1040 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1041 msgid "In the terminal where we are running the program, we would then see:"
1042 msgstr "Dans le terminal où on exécute le programme, on verrait alors :"
1043
1044 #. type: Plain text
1045 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1046 #: opensuse-tumbleweed
1047 #, fuzzy, no-wrap
1048 #| msgid ""
1049 #| "Opened \"myfifo\" on fd 3\n"
1050 #| "About to poll()\n"
1051 #| "Ready: 1\n"
1052 #| " fd=3; events: POLLIN POLLHUP\n"
1053 #| " read 10 bytes: aaaaabbbbb\n"
1054 #| "About to poll()\n"
1055 #| "Ready: 1\n"
1056 #| " fd=3; events: POLLIN POLLHUP\n"
1057 #| " read 6 bytes: ccccc\n"
1058 #| "\\&\n"
1059 #| "About to poll()\n"
1060 #| "Ready: 1\n"
1061 #| " fd=3; events: POLLHUP\n"
1062 #| " closing fd 3\n"
1063 #| "All file descriptors closed; bye\n"
1064 msgid ""
1065 "Opened \"myfifo\" on fd 3\n"
1066 "About to poll()\n"
1067 "Ready: 1\n"
1068 " fd=3; events: POLLIN POLLHUP\n"
1069 " read 10 bytes: aaaaabbbbb\n"
1070 "About to poll()\n"
1071 "Ready: 1\n"
1072 " fd=3; events: POLLIN POLLHUP\n"
1073 " read 6 bytes: ccccc\n"
1074 "\\&\n"
1075 "About to poll()\n"
1076 "Ready: 1\n"
1077 " fd=3; events: POLLHUP\n"
1078 " closing fd 3\n"
1079 "All file descriptors closed. Bye.\n"
1080 msgstr ""
1081 "\"monfifo\" ouvert sur le fd 3\n"
1082 "Préparation pour poll()\n"
1083 "Prêt : 1\n"
1084 " fd=3; événements: POLLIN POLLHUP\n"
1085 " 10 octets lus : aaaaabbbbb\n"
1086 "Va poll()\n"
1087 "Prêt : 1\n"
1088 " fd=3 ; événements : POLLIN POLLHUP\n"
1089 " lecture de 6 octets : ccccc\n"
1090 "\\&\n"
1091 "Préparation pour poll()\n"
1092 "\n"
1093 "Prêt : 1\n"
1094 " fd=3; événements : POLLHUP\n"
1095 " fermeture de fd 3\n"
1096 "Tous les descripteurs de fichier sont fermés ; au revoir\n"
1097
1098 #. type: Plain text
1099 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1100 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1101 msgid "In the above output, we see that B<poll>() returned three times:"
1102 msgstr "Dans la sortie ci-dessus, on voit que B<poll>() a renvoyé trois fois :"
1103
1104 #. type: Plain text
1105 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1106 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1107 msgid ""
1108 "On the first return, the bits returned in the I<revents> field were "
1109 "B<POLLIN>, indicating that the file descriptor is readable, and B<POLLHUP>, "
1110 "indicating that the other end of the FIFO has been closed. The program then "
1111 "consumed some of the available input."
1112 msgstr ""
1113 "Sur le premier retour, les bits renvoyés dans le champ I<revents> étaient "
1114 "B<POLLIN>, indiquant que le descripteur de fichier est lisible, et "
1115 "B<POLLHUP>, indiquant que l'autre extrémité du FIFO a été fermée. Puis le "
1116 "programme a consommé une partie de l'entrée disponible."
1117
1118 #. type: Plain text
1119 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1120 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1121 msgid ""
1122 "The second return from B<poll>() also indicated B<POLLIN> and B<POLLHUP>; "
1123 "the program then consumed the last of the available input."
1124 msgstr ""
1125 "Le deuxième retour de B<poll>() indiquait aussi B<POLLIN> et B<POLLHUP> ; le "
1126 "programme a alors consommé la dernière partie de l’entrée disponible."
1127
1128 #. type: Plain text
1129 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1130 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1131 msgid ""
1132 "On the final return, B<poll>() indicated only B<POLLHUP> on the FIFO, at "
1133 "which point the file descriptor was closed and the program terminated."
1134 msgstr ""
1135 "Sur le dernier retour, B<poll>() n'indiquait que B<POLLHUP> sur le FIFO, "
1136 "lemoment où le descripteur de fichier a été fermé et où le programme s'est "
1137 "terminé."
1138
1139 #. type: SS
1140 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1141 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1142 #, no-wrap
1143 msgid "Program source"
1144 msgstr "Source du programme"
1145
1146 #. type: Plain text
1147 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1148 #: opensuse-tumbleweed
1149 #, fuzzy, no-wrap
1150 #| msgid ""
1151 #| "/* poll_input.c\n"
1152 #| "\\&\n"
1153 #| " Licensed under GNU General Public License v2 or later.\n"
1154 #| "*/\n"
1155 #| "#include E<lt>fcntl.hE<gt>\n"
1156 #| "#include E<lt>poll.hE<gt>\n"
1157 #| "#include E<lt>stdio.hE<gt>\n"
1158 #| "#include E<lt>stdlib.hE<gt>\n"
1159 #| "#include E<lt>sys/types.hE<gt>\n"
1160 #| "#include E<lt>unistd.hE<gt>\n"
1161 #| "\\&\n"
1162 #| "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n"
1163 #| " } while (0)\n"
1164 #| "\\&\n"
1165 #| "int\n"
1166 #| "main(int argc, char *argv[])\n"
1167 #| "{\n"
1168 #| " int ready;\n"
1169 #| " char buf[10];\n"
1170 #| " nfds_t num_open_fds, nfds;\n"
1171 #| " ssize_t s;\n"
1172 #| " struct pollfd *pfds;\n"
1173 #| "\\&\n"
1174 #| " if (argc E<lt> 2) {\n"
1175 #| " fprintf(stderr, \"Usage: %s file...\\[rs]n\", argv[0]);\n"
1176 #| " exit(EXIT_FAILURE);\n"
1177 #| " }\n"
1178 #| "\\&\n"
1179 #| " num_open_fds = nfds = argc - 1;\n"
1180 #| " pfds = calloc(nfds, sizeof(struct pollfd));\n"
1181 #| " if (pfds == NULL)\n"
1182 #| " errExit(\"malloc\");\n"
1183 #| "\\&\n"
1184 #| " /* Open each file on command line, and add it to \\[aq]pfds\\[aq] array. */\n"
1185 #| "\\&\n"
1186 #| " for (nfds_t j = 0; j E<lt> nfds; j++) {\n"
1187 #| " pfds[j].fd = open(argv[j + 1], O_RDONLY);\n"
1188 #| " if (pfds[j].fd == -1)\n"
1189 #| " errExit(\"open\");\n"
1190 #| "\\&\n"
1191 #| " printf(\"Opened \\[rs]\"%s\\[rs]\" on fd %d\\[rs]n\", argv[j + 1], pfds[j].fd);\n"
1192 #| "\\&\n"
1193 #| " pfds[j].events = POLLIN;\n"
1194 #| " }\n"
1195 #| "\\&\n"
1196 #| " /* Keep calling poll() as long as at least one file descriptor is\n"
1197 #| " open. */\n"
1198 #| "\\&\n"
1199 #| " while (num_open_fds E<gt> 0) {\n"
1200 #| " printf(\"About to poll()\\[rs]n\");\n"
1201 #| " ready = poll(pfds, nfds, -1);\n"
1202 #| " if (ready == -1)\n"
1203 #| " errExit(\"poll\");\n"
1204 #| "\\&\n"
1205 #| " printf(\"Ready: %d\\[rs]n\", ready);\n"
1206 #| "\\&\n"
1207 #| " /* Deal with array returned by poll(). */\n"
1208 #| "\\&\n"
1209 #| " for (nfds_t j = 0; j E<lt> nfds; j++) {\n"
1210 #| " if (pfds[j].revents != 0) {\n"
1211 #| " printf(\" fd=%d; events: %s%s%s\\[rs]n\", pfds[j].fd,\n"
1212 #| " (pfds[j].revents & POLLIN) ? \"POLLIN \" : \"\",\n"
1213 #| " (pfds[j].revents & POLLHUP) ? \"POLLHUP \" : \"\",\n"
1214 #| " (pfds[j].revents & POLLERR) ? \"POLLERR \" : \"\");\n"
1215 #| "\\&\n"
1216 #| " if (pfds[j].revents & POLLIN) {\n"
1217 #| " s = read(pfds[j].fd, buf, sizeof(buf));\n"
1218 #| " if (s == -1)\n"
1219 #| " errExit(\"read\");\n"
1220 #| " printf(\" read %zd bytes: %.*s\\[rs]n\",\n"
1221 #| " s, (int) s, buf);\n"
1222 #| " } else { /* POLLERR | POLLHUP */\n"
1223 #| " printf(\" closing fd %d\\[rs]n\", pfds[j].fd);\n"
1224 #| " if (close(pfds[j].fd) == -1)\n"
1225 #| " errExit(\"close\");\n"
1226 #| " num_open_fds--;\n"
1227 #| " }\n"
1228 #| " }\n"
1229 #| " }\n"
1230 #| " }\n"
1231 #| "\\&\n"
1232 #| " printf(\"All file descriptors closed; bye\\[rs]n\");\n"
1233 #| " exit(EXIT_SUCCESS);\n"
1234 #| "}\n"
1235 msgid ""
1236 "/* poll_input.c\n"
1237 "\\&\n"
1238 " Licensed under GNU General Public License v2 or later.\n"
1239 "*/\n"
1240 "#include E<lt>err.hE<gt>\n"
1241 "#include E<lt>fcntl.hE<gt>\n"
1242 "#include E<lt>poll.hE<gt>\n"
1243 "#include E<lt>stdio.hE<gt>\n"
1244 "#include E<lt>stdlib.hE<gt>\n"
1245 "#include E<lt>sys/types.hE<gt>\n"
1246 "#include E<lt>unistd.hE<gt>\n"
1247 "\\&\n"
1248 "int\n"
1249 "main(int argc, char *argv[])\n"
1250 "{\n"
1251 " int ready;\n"
1252 " char buf[10];\n"
1253 " nfds_t num_open_fds, nfds;\n"
1254 " ssize_t s;\n"
1255 " struct pollfd *pfds;\n"
1256 "\\&\n"
1257 " if (argc E<lt> 2) {\n"
1258 " fprintf(stderr, \"Usage: %s file...\\[rs]n\", argv[0]);\n"
1259 " exit(EXIT_FAILURE);\n"
1260 " }\n"
1261 "\\&\n"
1262 " num_open_fds = nfds = argc - 1;\n"
1263 " pfds = calloc(nfds, sizeof(struct pollfd));\n"
1264 " if (pfds == NULL)\n"
1265 " err(EXIT_FAILURE, \"malloc\");\n"
1266 "\\&\n"
1267 " /* Open each file on command line, and add it to \\[aq]pfds\\[aq] array. */\n"
1268 "\\&\n"
1269 " for (nfds_t j = 0; j E<lt> nfds; j++) {\n"
1270 " pfds[j].fd = open(argv[j + 1], O_RDONLY);\n"
1271 " if (pfds[j].fd == -1)\n"
1272 " err(EXIT_FAILURE, \"open\");\n"
1273 "\\&\n"
1274 " printf(\"Opened \\[rs]\"%s\\[rs]\" on fd %d\\[rs]n\", argv[j + 1], pfds[j].fd);\n"
1275 "\\&\n"
1276 " pfds[j].events = POLLIN;\n"
1277 " }\n"
1278 "\\&\n"
1279 " /* Keep calling poll() as long as at least one file descriptor is\n"
1280 " open. */\n"
1281 "\\&\n"
1282 " while (num_open_fds E<gt> 0) {\n"
1283 " printf(\"About to poll()\\[rs]n\");\n"
1284 " ready = poll(pfds, nfds, -1);\n"
1285 " if (ready == -1)\n"
1286 " err(EXIT_FAILURE, \"poll\");\n"
1287 "\\&\n"
1288 " printf(\"Ready: %d\\[rs]n\", ready);\n"
1289 "\\&\n"
1290 " /* Deal with array returned by poll(). */\n"
1291 "\\&\n"
1292 " for (nfds_t j = 0; j E<lt> nfds; j++) {\n"
1293 " if (pfds[j].revents != 0) {\n"
1294 " printf(\" fd=%d; events: %s%s%s\\[rs]n\", pfds[j].fd,\n"
1295 " (pfds[j].revents & POLLIN) ? \"POLLIN \" : \"\",\n"
1296 " (pfds[j].revents & POLLHUP) ? \"POLLHUP \" : \"\",\n"
1297 " (pfds[j].revents & POLLERR) ? \"POLLERR \" : \"\");\n"
1298 "\\&\n"
1299 " if (pfds[j].revents & POLLIN) {\n"
1300 " s = read(pfds[j].fd, buf, sizeof(buf));\n"
1301 " if (s == -1)\n"
1302 " err(EXIT_FAILURE, \"read\");\n"
1303 " printf(\" read %zd bytes: %.*s\\[rs]n\",\n"
1304 " s, (int) s, buf);\n"
1305 " } else { /* POLLERR | POLLHUP */\n"
1306 " printf(\" closing fd %d\\[rs]n\", pfds[j].fd);\n"
1307 " if (close(pfds[j].fd) == -1)\n"
1308 " err(EXIT_FAILURE, \"close\");\n"
1309 " num_open_fds--;\n"
1310 " }\n"
1311 " }\n"
1312 " }\n"
1313 " }\n"
1314 "\\&\n"
1315 " printf(\"All file descriptors closed. Bye.\\[rs]n\");\n"
1316 " exit(EXIT_SUCCESS);\n"
1317 "}\n"
1318 msgstr ""
1319 "/* poll_input.c\n"
1320 "\\&\n"
1321 " Sous licence GNU General Public v2 ou postérieure.\n"
1322 "*/\n"
1323 "#include E<lt>fcntl.hE<gt>\n"
1324 "#include E<lt>poll.hE<gt>\n"
1325 "#include E<lt>stdio.hE<gt>\n"
1326 "#include E<lt>stdlib.hE<gt>\n"
1327 "#include E<lt>sys/types.hE<gt>\n"
1328 "#include E<lt>unistd.hE<gt>\n"
1329 "\\&\n"
1330 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n"
1331 " } while (0)\n"
1332 "\\&\n"
1333 "int\n"
1334 "main(int argc, char *argv[])\n"
1335 "{\n"
1336 " int ready;\n"
1337 " char buf[10];\n"
1338 " nfds_t num_open_fds, nfds;\n"
1339 " ssize_t s;\n"
1340 " struct pollfd *pfds;\n"
1341 "\\&\n"
1342 " if (argc E<lt> 2) {\n"
1343 " fprintf(stderr, \"Utilisation : %s file...\\[rs]n\", argv[0]);\n"
1344 " exit(EXIT_FAILURE);\n"
1345 " }\n"
1346 "\\&\n"
1347 " num_open_fds = nfds = argc - 1;\n"
1348 " pfds = calloc(nfds, sizeof(struct pollfd));\n"
1349 " if (pfds == NULL)\n"
1350 " errExit(\"malloc\");\n"
1351 "\\&\n"
1352 " /* Ouvrir chaque fichier de la ligne de commande et l'ajouter au tableau\n"
1353 " \\[aq]pfds\\[aq]. */\n"
1354 "\\&\n"
1355 " for (nfds_t j = 0; j E<lt> nfds; j++) {\n"
1356 " pfds[j].fd = open(argv[j + 1], O_RDONLY);\n"
1357 " if (pfds[j].fd == -1)\n"
1358 " errExit(\"open\");\n"
1359 "\\&\n"
1360 " printf(\"\"\\[rs]\"%s\\e\" ouvert sur le fd %d\\en\", argv[j + 1], pfds[j].fd);\n"
1361 "\\&\n"
1362 " pfds[j].events = POLLIN;\n"
1363 " }\n"
1364 "\\&\n"
1365 " /* Conserver poll() au moins aussi longtemps qu'un descripteur de fichier\n"
1366 " est ouvert. */\n"
1367 "\\&\n"
1368 " while (num_open_fds E<gt> 0) {\n"
1369 " printf(\"Préparation pour poll()\\[rs]n\");\n"
1370 " ready = poll(pfds, nfds, -1);\n"
1371 " if (ready == -1)\n"
1372 " errExit(\"poll\");\n"
1373 "\\&\n"
1374 " printf(\"Prêt: %d\\[rs]n\", ready);\n"
1375 "\\&\n"
1376 " /* Gérer le tableau renvoyé par poll(). */\n"
1377 "\\&\n"
1378 " for (nfds_t j = 0; j E<lt> nfds; j++) {\n"
1379 " if (pfds[j].revents != 0) {\n"
1380 " printf(\" fd=%d; événements : %s%s%s\\[rs]n\", pfds[j].fd,\n"
1381 " (pfds[j].revents & POLLIN) ? \"POLLIN \" : \"\",\n"
1382 " (pfds[j].revents & POLLHUP) ? \"POLLHUP \" : \"\",\n"
1383 " (pfds[j].revents & POLLERR) ? \"POLLERR \" : \"\");\n"
1384 "\\&\n"
1385 " if (pfds[j].revents & POLLIN) {\n"
1386 " s = read(pfds[j].fd, buf, sizeof(buf));\n"
1387 " if (s == -1)\n"
1388 " errExit(\"read\");\n"
1389 " printf(\" lecture de %zd octets : %.*s\\[rs]n\",\n"
1390 " s, (int) s, buf);\n"
1391 " } else { /* POLLERR | POLLHUP */\n"
1392 " printf(\" fermeture du fd %d\\[rs]n\", pfds[j].fd);\n"
1393 " if (close(pfds[j].fd) == -1)\n"
1394 " errExit(\"close\");\n"
1395 " num_open_fds--;\n"
1396 " }\n"
1397 " }\n"
1398 " }\n"
1399 " }\n"
1400 "\\&\n"
1401 " printf(\"Tous les descripteurs de fichier sont fermés ; au revoir\\[rs]n\");\n"
1402 " exit(EXIT_SUCCESS);\n"
1403 "}\n"
1404
1405 #. SRC END
1406 #. type: SH
1407 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1408 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1409 #, no-wrap
1410 msgid "SEE ALSO"
1411 msgstr "VOIR AUSSI"
1412
1413 #. type: Plain text
1414 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1415 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1416 msgid ""
1417 "B<restart_syscall>(2), B<select>(2), B<select_tut>(2), B<timespec>(3), "
1418 "B<epoll>(7), B<time>(7)"
1419 msgstr ""
1420 "B<restart_syscall>(2), B<select>(2), B<select_tut>(2), B<timespec>(3), "
1421 "B<epoll>(7), B<time>(7)"
1422
1423 #. type: TH
1424 #: debian-trixie
1425 #, no-wrap
1426 msgid "2024-06-15"
1427 msgstr "15 juin 2024"
1428
1429 #. type: TH
1430 #: debian-trixie
1431 #, no-wrap
1432 msgid "Linux man-pages 6.9.1"
1433 msgstr "Pages du manuel de Linux 6.9.1"
1434
1435 #. type: Plain text
1436 #: debian-trixie
1437 msgid "Standard C library (I<libc>, I<-lc>)"
1438 msgstr "Bibliothèque C standard (I<libc>, I<-lc>)"
1439
1440 #. type: Plain text
1441 #: debian-trixie fedora-44 fedora-rawhide
1442 msgid "POSIX.1-2008."
1443 msgstr "POSIX.1-2008."
1444
1445 #. FIXME .
1446 #. ppoll() is proposed for inclusion in POSIX:
1447 #. https://www.austingroupbugs.net/view.php?id=1263
1448 #. NetBSD 3.0 has a pollts() which is like Linux ppoll().
1449 #. type: Plain text
1450 #: debian-trixie fedora-44 fedora-rawhide
1451 msgid "Linux."
1452 msgstr "Linux."
1453
1454 #. type: Plain text
1455 #: debian-trixie fedora-44 fedora-rawhide
1456 msgid "Linux 2.6.16, glibc 2.4."
1457 msgstr "Linux 2.6.16, glibc 2.4."
1458
1459 #. type: Plain text
1460 #: debian-trixie fedora-44 fedora-rawhide
1461 #, no-wrap
1462 msgid ""
1463 "$ B<mkfifo myfifo>\n"
1464 "$ B<./poll_input myfifo>\n"
1465 msgstr ""
1466 "$ B<mkfifo monfifo>\n"
1467 "$ B<./poll_input monfifo>\n"
1468
1469 #. type: Plain text
1470 #: debian-trixie fedora-44 fedora-rawhide
1471 #, no-wrap
1472 msgid "$ B<echo aaaaabbbbbccccc E<gt> myfifo>\n"
1473 msgstr "$ B<echo aaaaabbbbbccccc E<gt> monfifo>\n"
1474
1475 #. type: Plain text
1476 #: debian-trixie fedora-44 fedora-rawhide
1477 #, no-wrap
1478 msgid ""
1479 "Opened \"myfifo\" on fd 3\n"
1480 "About to poll()\n"
1481 "Ready: 1\n"
1482 " fd=3; events: POLLIN POLLHUP\n"
1483 " read 10 bytes: aaaaabbbbb\n"
1484 "About to poll()\n"
1485 "Ready: 1\n"
1486 " fd=3; events: POLLIN POLLHUP\n"
1487 " read 6 bytes: ccccc\n"
1488 "\\&\n"
1489 "About to poll()\n"
1490 "Ready: 1\n"
1491 " fd=3; events: POLLHUP\n"
1492 " closing fd 3\n"
1493 "All file descriptors closed; bye\n"
1494 msgstr ""
1495 "\"monfifo\" ouvert sur le fd 3\n"
1496 "Préparation pour poll()\n"
1497 "Prêt : 1\n"
1498 " fd=3; événements: POLLIN POLLHUP\n"
1499 " 10 octets lus : aaaaabbbbb\n"
1500 "Va poll()\n"
1501 "Prêt : 1\n"
1502 " fd=3 ; événements : POLLIN POLLHUP\n"
1503 " lecture de 6 octets : ccccc\n"
1504 "\\&\n"
1505 "Préparation pour poll()\n"
1506 "\n"
1507 "Prêt : 1\n"
1508 " fd=3; événements : POLLHUP\n"
1509 " fermeture de fd 3\n"
1510 "Tous les descripteurs de fichier sont fermés ; au revoir\n"
1511
1512 #. type: Plain text
1513 #: debian-trixie fedora-44 fedora-rawhide
1514 #, no-wrap
1515 msgid ""
1516 "/* poll_input.c\n"
1517 "\\&\n"
1518 " Licensed under GNU General Public License v2 or later.\n"
1519 "*/\n"
1520 "#include E<lt>fcntl.hE<gt>\n"
1521 "#include E<lt>poll.hE<gt>\n"
1522 "#include E<lt>stdio.hE<gt>\n"
1523 "#include E<lt>stdlib.hE<gt>\n"
1524 "#include E<lt>sys/types.hE<gt>\n"
1525 "#include E<lt>unistd.hE<gt>\n"
1526 "\\&\n"
1527 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n"
1528 " } while (0)\n"
1529 "\\&\n"
1530 "int\n"
1531 "main(int argc, char *argv[])\n"
1532 "{\n"
1533 " int ready;\n"
1534 " char buf[10];\n"
1535 " nfds_t num_open_fds, nfds;\n"
1536 " ssize_t s;\n"
1537 " struct pollfd *pfds;\n"
1538 "\\&\n"
1539 " if (argc E<lt> 2) {\n"
1540 " fprintf(stderr, \"Usage: %s file...\\[rs]n\", argv[0]);\n"
1541 " exit(EXIT_FAILURE);\n"
1542 " }\n"
1543 "\\&\n"
1544 " num_open_fds = nfds = argc - 1;\n"
1545 " pfds = calloc(nfds, sizeof(struct pollfd));\n"
1546 " if (pfds == NULL)\n"
1547 " errExit(\"malloc\");\n"
1548 "\\&\n"
1549 " /* Open each file on command line, and add it to \\[aq]pfds\\[aq] array. */\n"
1550 "\\&\n"
1551 " for (nfds_t j = 0; j E<lt> nfds; j++) {\n"
1552 " pfds[j].fd = open(argv[j + 1], O_RDONLY);\n"
1553 " if (pfds[j].fd == -1)\n"
1554 " errExit(\"open\");\n"
1555 "\\&\n"
1556 " printf(\"Opened \\[rs]\"%s\\[rs]\" on fd %d\\[rs]n\", argv[j + 1], pfds[j].fd);\n"
1557 "\\&\n"
1558 " pfds[j].events = POLLIN;\n"
1559 " }\n"
1560 "\\&\n"
1561 " /* Keep calling poll() as long as at least one file descriptor is\n"
1562 " open. */\n"
1563 "\\&\n"
1564 " while (num_open_fds E<gt> 0) {\n"
1565 " printf(\"About to poll()\\[rs]n\");\n"
1566 " ready = poll(pfds, nfds, -1);\n"
1567 " if (ready == -1)\n"
1568 " errExit(\"poll\");\n"
1569 "\\&\n"
1570 " printf(\"Ready: %d\\[rs]n\", ready);\n"
1571 "\\&\n"
1572 " /* Deal with array returned by poll(). */\n"
1573 "\\&\n"
1574 " for (nfds_t j = 0; j E<lt> nfds; j++) {\n"
1575 " if (pfds[j].revents != 0) {\n"
1576 " printf(\" fd=%d; events: %s%s%s\\[rs]n\", pfds[j].fd,\n"
1577 " (pfds[j].revents & POLLIN) ? \"POLLIN \" : \"\",\n"
1578 " (pfds[j].revents & POLLHUP) ? \"POLLHUP \" : \"\",\n"
1579 " (pfds[j].revents & POLLERR) ? \"POLLERR \" : \"\");\n"
1580 "\\&\n"
1581 " if (pfds[j].revents & POLLIN) {\n"
1582 " s = read(pfds[j].fd, buf, sizeof(buf));\n"
1583 " if (s == -1)\n"
1584 " errExit(\"read\");\n"
1585 " printf(\" read %zd bytes: %.*s\\[rs]n\",\n"
1586 " s, (int) s, buf);\n"
1587 " } else { /* POLLERR | POLLHUP */\n"
1588 " printf(\" closing fd %d\\[rs]n\", pfds[j].fd);\n"
1589 " if (close(pfds[j].fd) == -1)\n"
1590 " errExit(\"close\");\n"
1591 " num_open_fds--;\n"
1592 " }\n"
1593 " }\n"
1594 " }\n"
1595 " }\n"
1596 "\\&\n"
1597 " printf(\"All file descriptors closed; bye\\[rs]n\");\n"
1598 " exit(EXIT_SUCCESS);\n"
1599 "}\n"
1600 msgstr ""
1601 "/* poll_input.c\n"
1602 "\\&\n"
1603 " Sous licence GNU General Public v2 ou postérieure.\n"
1604 "*/\n"
1605 "#include E<lt>fcntl.hE<gt>\n"
1606 "#include E<lt>poll.hE<gt>\n"
1607 "#include E<lt>stdio.hE<gt>\n"
1608 "#include E<lt>stdlib.hE<gt>\n"
1609 "#include E<lt>sys/types.hE<gt>\n"
1610 "#include E<lt>unistd.hE<gt>\n"
1611 "\\&\n"
1612 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n"
1613 " } while (0)\n"
1614 "\\&\n"
1615 "int\n"
1616 "main(int argc, char *argv[])\n"
1617 "{\n"
1618 " int ready;\n"
1619 " char buf[10];\n"
1620 " nfds_t num_open_fds, nfds;\n"
1621 " ssize_t s;\n"
1622 " struct pollfd *pfds;\n"
1623 "\\&\n"
1624 " if (argc E<lt> 2) {\n"
1625 " fprintf(stderr, \"Utilisation : %s file...\\[rs]n\", argv[0]);\n"
1626 " exit(EXIT_FAILURE);\n"
1627 " }\n"
1628 "\\&\n"
1629 " num_open_fds = nfds = argc - 1;\n"
1630 " pfds = calloc(nfds, sizeof(struct pollfd));\n"
1631 " if (pfds == NULL)\n"
1632 " errExit(\"malloc\");\n"
1633 "\\&\n"
1634 " /* Ouvrir chaque fichier de la ligne de commande et l'ajouter au tableau\n"
1635 " \\[aq]pfds\\[aq]. */\n"
1636 "\\&\n"
1637 " for (nfds_t j = 0; j E<lt> nfds; j++) {\n"
1638 " pfds[j].fd = open(argv[j + 1], O_RDONLY);\n"
1639 " if (pfds[j].fd == -1)\n"
1640 " errExit(\"open\");\n"
1641 "\\&\n"
1642 " printf(\"\"\\[rs]\"%s\\e\" ouvert sur le fd %d\\en\", argv[j + 1], pfds[j].fd);\n"
1643 "\\&\n"
1644 " pfds[j].events = POLLIN;\n"
1645 " }\n"
1646 "\\&\n"
1647 " /* Conserver poll() au moins aussi longtemps qu'un descripteur de fichier\n"
1648 " est ouvert. */\n"
1649 "\\&\n"
1650 " while (num_open_fds E<gt> 0) {\n"
1651 " printf(\"Préparation pour poll()\\[rs]n\");\n"
1652 " ready = poll(pfds, nfds, -1);\n"
1653 " if (ready == -1)\n"
1654 " errExit(\"poll\");\n"
1655 "\\&\n"
1656 " printf(\"Prêt: %d\\[rs]n\", ready);\n"
1657 "\\&\n"
1658 " /* Gérer le tableau renvoyé par poll(). */\n"
1659 "\\&\n"
1660 " for (nfds_t j = 0; j E<lt> nfds; j++) {\n"
1661 " if (pfds[j].revents != 0) {\n"
1662 " printf(\" fd=%d; événements : %s%s%s\\[rs]n\", pfds[j].fd,\n"
1663 " (pfds[j].revents & POLLIN) ? \"POLLIN \" : \"\",\n"
1664 " (pfds[j].revents & POLLHUP) ? \"POLLHUP \" : \"\",\n"
1665 " (pfds[j].revents & POLLERR) ? \"POLLERR \" : \"\");\n"
1666 "\\&\n"
1667 " if (pfds[j].revents & POLLIN) {\n"
1668 " s = read(pfds[j].fd, buf, sizeof(buf));\n"
1669 " if (s == -1)\n"
1670 " errExit(\"read\");\n"
1671 " printf(\" lecture de %zd octets : %.*s\\[rs]n\",\n"
1672 " s, (int) s, buf);\n"
1673 " } else { /* POLLERR | POLLHUP */\n"
1674 " printf(\" fermeture du fd %d\\[rs]n\", pfds[j].fd);\n"
1675 " if (close(pfds[j].fd) == -1)\n"
1676 " errExit(\"close\");\n"
1677 " num_open_fds--;\n"
1678 " }\n"
1679 " }\n"
1680 " }\n"
1681 " }\n"
1682 "\\&\n"
1683 " printf(\"Tous les descripteurs de fichier sont fermés ; au revoir\\[rs]n\");\n"
1684 " exit(EXIT_SUCCESS);\n"
1685 "}\n"
1686
1687 #. type: TH
1688 #: fedora-44 fedora-rawhide
1689 #, no-wrap
1690 msgid "2024-07-23"
1691 msgstr "23 juillet 2024"
1692
1693 #. type: TH
1694 #: fedora-44 fedora-rawhide
1695 #, no-wrap
1696 msgid "Linux man-pages 6.13"
1697 msgstr "Pages du manuel de Linux 6.13"
1698
1699 #. type: TH
1700 #: mageia-cauldron
1701 #, no-wrap
1702 msgid "Linux man-pages 6.17"
1703 msgstr "Pages du manuel de Linux 6.17"
1704
1705 #. type: TH
1706 #: opensuse-leap-16-1 opensuse-tumbleweed
1707 #, no-wrap
1708 msgid "Linux man-pages (unreleased)"
1709 msgstr "Pages du manuel de Linux (non publiées)"