Debian Codegraph @

po/fr/man3/pthread_setname_np.3.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, 2012.
18 # Frédéric Hantrais <[email protected]>, 2013, 2014.
19 # Jean-Pierre Giraud <[email protected]>, 2023-2024.
20 msgid ""
21 msgstr ""
22 "Project-Id-Version: manpages-l10n 4.22.0\n"
23 "POT-Creation-Date: 2026-06-05 06:38+0200\n"
24 "PO-Revision-Date: 2024-05-07 16:39+0200\n"
25 "Last-Translator: Jean-Pierre Giraud <[email protected]>\n"
26 "Language-Team: French <[email protected]>\n"
27 "Language: fr\n"
28 "MIME-Version: 1.0\n"
29 "Content-Type: text/plain; charset=UTF-8\n"
30 "Content-Transfer-Encoding: 8bit\n"
31 "Plural-Forms: nplurals=2; plural=n > 1;\n"
32 "X-Generator: Lokalize 22.12.3\n"
33
34 #. type: TH
35 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
36 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
37 #, no-wrap
38 msgid "pthread_setname_np"
39 msgstr "pthread_setname_np"
40
41 #. type: TH
42 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
43 #: opensuse-tumbleweed
44 #, no-wrap
45 msgid "2026-02-08"
46 msgstr "8 février 2026"
47
48 #. type: TH
49 #: archlinux debian-unstable
50 #, no-wrap
51 msgid "Linux man-pages 6.18"
52 msgstr "Pages du manuel de Linux 6.18"
53
54 #. type: SH
55 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
56 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
57 #, no-wrap
58 msgid "NAME"
59 msgstr "NOM"
60
61 #. type: Plain text
62 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
63 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
64 msgid "pthread_setname_np, pthread_getname_np - set/get the name of a thread"
65 msgstr ""
66 "pthread_setname_np, pthread_getname_np - Définir ou obtenir le nom d'un "
67 "thread"
68
69 #. type: SH
70 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
71 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
72 #, no-wrap
73 msgid "LIBRARY"
74 msgstr "BIBLIOTHÈQUE"
75
76 #. type: Plain text
77 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
78 #: opensuse-leap-16-1 opensuse-tumbleweed
79 msgid "POSIX threads library (I<libpthread>,\\ I<-lpthread>)"
80 msgstr "Bibliothèque de threads POSIX (I<libpthread>,\\ I<-lpthread>)"
81
82 #. type: SH
83 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
84 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
85 #, no-wrap
86 msgid "SYNOPSIS"
87 msgstr "SYNOPSIS"
88
89 #. type: Plain text
90 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
91 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
92 #, no-wrap
93 msgid ""
94 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
95 "B<#include E<lt>pthread.hE<gt>>\n"
96 msgstr ""
97 "B<#define _GNU_SOURCE> /* Consultez feature_test_macros(7) */\n"
98 "B<#include E<lt>pthread.hE<gt>>\n"
99
100 #. type: Plain text
101 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
102 #: opensuse-tumbleweed
103 #, fuzzy, no-wrap
104 #| msgid ""
105 #| "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
106 #| "B<int pthread_getname_np(pthread_t >I<thread>B<, char >I<name>B<[.>I<size>B<], size_t >I<size>B<);>\n"
107 msgid ""
108 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
109 "B<int pthread_getname_np(>size_t size;\n"
110 "B< pthread_t >I<thread>B<, char >I<name>B<[>I<size>B<], size_t >I<size>B<);>\n"
111 msgstr ""
112 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<nom>B<);>\n"
113 "B<int pthread_getname_np(pthread_t >I<thread>B<, char >I<nom>B<[.>I<taille>B<], size_t >I<taille>B<);>\n"
114
115 #. type: SH
116 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
117 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
118 #, no-wrap
119 msgid "DESCRIPTION"
120 msgstr "DESCRIPTION"
121
122 #. type: Plain text
123 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
124 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
125 #, fuzzy
126 #| msgid ""
127 #| "By default, all the threads created using B<pthread_create>() inherit "
128 #| "the program name. The B<pthread_setname_np>() function can be used to "
129 #| "set a unique name for a thread, which can be useful for debugging "
130 #| "multithreaded applications. The thread name is a meaningful C language "
131 #| "string, whose length is restricted to 16 characters, including the "
132 #| "terminating null byte (\\[aq]\\e0\\[aq]). The I<thread> argument "
133 #| "specifies the thread whose name is to be changed; I<name> specifies the "
134 #| "new name."
135 msgid ""
136 "By default, all the threads created using B<pthread_create>() inherit the "
137 "program name. The B<pthread_setname_np>() function can be used to set a "
138 "unique name for a thread, which can be useful for debugging multithreaded "
139 "applications. The thread name is a meaningful C language string, whose "
140 "length is restricted to 16 characters, including the terminating null byte "
141 "(\\[aq]\\[rs]0\\[aq]). The I<thread> argument specifies the thread whose "
142 "name is to be changed; I<name> specifies the new name."
143 msgstr ""
144 "Par défaut, tous les threads créés par B<pthread_create>() héritent du nom "
145 "de programme. La fonction B<pthread_setname_np>() permet d'affecter un nom "
146 "propre à un thread, ce qui peut être utile pour déboguer une application "
147 "multithread. Le nom du thread est une chaîne de langage C significative, "
148 "dont la longueur ne peut dépasser 16 caractères, caractère nul final (\\[aq]"
149 "\\e0\\[aq]) inclus. L'argument I<thread> indique le thread dont le nom doit "
150 "être changé ; le nouveau nom est précisé dans I<nom>."
151
152 #. type: Plain text
153 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
154 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
155 msgid ""
156 "The B<pthread_getname_np>() function can be used to retrieve the name of "
157 "the thread. The I<thread> argument specifies the thread whose name is to be "
158 "retrieved. The buffer I<name> is used to return the thread name; I<size> "
159 "specifies the number of bytes available in I<name>. The buffer specified by "
160 "I<name> should be at least 16 characters in length. The returned thread "
161 "name in the output buffer will be null terminated."
162 msgstr ""
163 "La fonction B<pthread_getname_np>() permet de récupérer le nom du thread. "
164 "L'argument I<thread> indique le thread dont le nom doit être récupéré. Le "
165 "tampon I<nom> est utilisé pour renvoyer le nom du thread ; I<taille> indique "
166 "le nombre d'octets disponibles dans I<nom>. La longueur du tampon indiqué "
167 "dans I<nom> doit être d'au moins 16 caractères. Le nom du thread renvoyé "
168 "dans le tampon de retour est terminé par caractère nul."
169
170 #. type: SH
171 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
172 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
173 #, no-wrap
174 msgid "RETURN VALUE"
175 msgstr "VALEUR RENVOYÉE"
176
177 #. type: Plain text
178 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
179 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
180 msgid ""
181 "On success, these functions return 0; on error, they return a nonzero error "
182 "number."
183 msgstr ""
184 "En cas de succès, ces fonctions renvoient B<0> ; en cas d'erreur, elles "
185 "renvoient un code d'erreur non nul."
186
187 #. type: SH
188 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
189 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
190 #, no-wrap
191 msgid "ERRORS"
192 msgstr "ERREURS"
193
194 #. type: Plain text
195 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
196 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
197 msgid ""
198 "The B<pthread_setname_np>() function can fail with the following error:"
199 msgstr ""
200 "La fonction B<pthread_setname_np>() peut échouer avec l'erreur suivante :"
201
202 #. type: TP
203 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
204 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
205 #, no-wrap
206 msgid "B<ERANGE>"
207 msgstr "B<ERANGE>"
208
209 #. type: Plain text
210 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
211 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
212 msgid ""
213 "The length of the string specified pointed to by I<name> exceeds the allowed "
214 "limit."
215 msgstr ""
216 "La longueur de la chaîne vers laquelle pointe I<nom> dépasse la limite "
217 "autorisée."
218
219 #. type: Plain text
220 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
221 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
222 msgid ""
223 "The B<pthread_getname_np>() function can fail with the following error:"
224 msgstr ""
225 "La fonction B<pthread_getname_np>() peut échouer avec l'erreur suivante :"
226
227 #. type: Plain text
228 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
229 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
230 msgid ""
231 "The buffer specified by I<name> and I<size> is too small to hold the thread "
232 "name."
233 msgstr ""
234 "Le tampon indiqué par I<nom> et I<taille> a une taille insuffisante pour "
235 "contenir le nom du thread."
236
237 #. type: Plain text
238 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
239 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
240 msgid ""
241 "If either of these functions fails to open I</proc/self/task/>tidI</comm>, "
242 "then the call may fail with one of the errors described in B<open>(2)."
243 msgstr ""
244 "Si l'une de ces fonctions ne parvient pas à ouvrir I</proc/self/task/>tidI</"
245 "comm>, alors l'appel peut échouer en retournant l'une des erreurs décrites "
246 "dans B<open>(2)"
247
248 #. type: SH
249 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
250 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
251 #, no-wrap
252 msgid "ATTRIBUTES"
253 msgstr "ATTRIBUTS"
254
255 #. type: Plain text
256 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
257 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
258 msgid ""
259 "For an explanation of the terms used in this section, see B<attributes>(7)."
260 msgstr ""
261 "Pour une explication des termes utilisés dans cette section, consulter "
262 "B<attributes>(7)."
263
264 #. type: tbl table
265 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
266 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
267 #, no-wrap
268 msgid "Interface"
269 msgstr "Interface"
270
271 #. type: tbl table
272 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
273 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
274 #, no-wrap
275 msgid "Attribute"
276 msgstr "Attribut"
277
278 #. type: tbl table
279 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
280 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
281 #, no-wrap
282 msgid "Value"
283 msgstr "Valeur"
284
285 #. type: tbl table
286 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
287 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
288 #, no-wrap
289 msgid ".na\n"
290 msgstr ".na\n"
291
292 #. type: tbl table
293 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
294 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
295 #, no-wrap
296 msgid ".nh\n"
297 msgstr ".nh\n"
298
299 #. type: tbl table
300 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
301 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
302 #, no-wrap
303 msgid ""
304 "B<pthread_setname_np>(),\n"
305 "B<pthread_getname_np>()"
306 msgstr ""
307 "B<pthread_setname_np>(),\n"
308 "B<pthread_getname_np>()"
309
310 #. type: tbl table
311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
313 #, no-wrap
314 msgid "Thread safety"
315 msgstr "Sécurité des threads"
316
317 #. type: tbl table
318 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
319 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
320 #, no-wrap
321 msgid "MT-Safe"
322 msgstr "MT-Safe"
323
324 #. type: SH
325 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
326 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
327 #, no-wrap
328 msgid "STANDARDS"
329 msgstr "NORMES"
330
331 #. type: Plain text
332 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
333 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
334 msgid "GNU; hence the suffix \"_np\" (nonportable) in the names."
335 msgstr "GNU ; d'où le suffixe « _np » (non portable) dans leur nom."
336
337 #. type: SH
338 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
339 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
340 #, no-wrap
341 msgid "HISTORY"
342 msgstr "HISTORIQUE"
343
344 #. type: Plain text
345 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
346 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
347 msgid "glibc 2.12."
348 msgstr "glibc 2.12."
349
350 #. type: SH
351 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
352 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
353 #, no-wrap
354 msgid "NOTES"
355 msgstr "NOTES"
356
357 #. type: Plain text
358 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
359 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
360 msgid ""
361 "B<pthread_setname_np>() internally writes to the thread-specific I<comm> "
362 "file under the I</proc> filesystem: I</proc/self/task/>tidI</comm>. "
363 "B<pthread_getname_np>() retrieves it from the same location."
364 msgstr ""
365 "B<pthread_setname_np>() écrit en interne dans le fichier I<comm> du thread "
366 "(dans le système de fichiers I</proc>) : I</proc/self/task/>tidI</comm>. "
367 "B<pthread_getname_np>() récupère le nom du thread à ce même endroit."
368
369 #. type: SH
370 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
371 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
372 #, no-wrap
373 msgid "EXAMPLES"
374 msgstr "EXEMPLES"
375
376 #. type: Plain text
377 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
378 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
379 msgid ""
380 "The program below demonstrates the use of B<pthread_setname_np>() and "
381 "B<pthread_getname_np>()."
382 msgstr ""
383 "Le programme ci-dessous illustre l'utilisation de B<pthread_setname_np>() et "
384 "de B<pthread_getname_np>()."
385
386 #. type: Plain text
387 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
388 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
389 msgid "The following shell session shows a sample run of the program:"
390 msgstr ""
391 "La session d'interpréteur suivant montre un échantillon d'exécution du "
392 "programme :"
393
394 #. type: Plain text
395 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
396 #: opensuse-tumbleweed
397 #, fuzzy, no-wrap
398 #| msgid ""
399 #| "$B< ./a.out>\n"
400 #| "Created a thread. Default name is: a.out\n"
401 #| "The thread name after setting it is THREADFOO.\n"
402 #| "B<\\[ha]Z> # Suspend the program\n"
403 #| "[1]+ Stopped ./a.out\n"
404 #| "$ B<ps H -C a.out -o \\[aq]pid tid cmd comm\\[aq]>\n"
405 #| " PID TID CMD COMMAND\n"
406 #| " 5990 5990 ./a.out a.out\n"
407 #| " 5990 5991 ./a.out THREADFOO\n"
408 #| "$ B<cat /proc/5990/task/5990/comm>\n"
409 #| "a.out\n"
410 #| "$ B<cat /proc/5990/task/5991/comm>\n"
411 #| "THREADFOO\n"
412 msgid ""
413 "$B< ./a.out>;\n"
414 "Created a thread. Default name is: a.out\n"
415 "The thread name after setting it is THREADFOO.\n"
416 "\\f[B]\\[ha]Z\\fR # Suspend the program\n"
417 "[1]+ Stopped ./a.out\n"
418 "$ B<ps H -C a.out -o \\[aq]pid tid cmd comm\\[aq]>\n"
419 " PID TID CMD COMMAND\n"
420 " 5990 5990 ./a.out a.out\n"
421 " 5990 5991 ./a.out THREADFOO\n"
422 "$ B<cat /proc/5990/task/5990/comm>\n"
423 "a.out\n"
424 "$ B<cat /proc/5990/task/5991/comm>\n"
425 "THREADFOO\n"
426 msgstr ""
427 "$B< ./a.out>\n"
428 "Thread créé. Le nom par défaut est : a.out\n"
429 "Le nom du thread après nommage est THREADFOO.\n"
430 "B<\\[ha]Z> # Suspendre l'exécution du programme\n"
431 "[1]+ Stoppé ./a.out\n"
432 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
433 " PID TID CMD COMMAND\n"
434 " 5990 5990 ./a.out a.out\n"
435 " 5990 5991 ./a.out THREADFOO\n"
436 "$ B<cat /proc/5990/task/5990/comm>\n"
437 "a.out\n"
438 "$ B<cat /proc/5990/task/5991/comm>\n"
439 "THREADFOO\n"
440
441 #. type: SS
442 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
443 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
444 #, no-wrap
445 msgid "Program source"
446 msgstr "Source du programme"
447
448 #. type: Plain text
449 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
450 #: opensuse-tumbleweed
451 #, fuzzy, no-wrap
452 #| msgid ""
453 #| "#define _GNU_SOURCE\n"
454 #| "#include E<lt>err.hE<gt>\n"
455 #| "#include E<lt>errno.hE<gt>\n"
456 #| "#include E<lt>pthread.hE<gt>\n"
457 #| "#include E<lt>stdio.hE<gt>\n"
458 #| "#include E<lt>stdlib.hE<gt>\n"
459 #| "#include E<lt>string.hE<gt>\n"
460 #| "#include E<lt>unistd.hE<gt>\n"
461 #| "\\&\n"
462 #| "#define NAMELEN 16\n"
463 #| "\\&\n"
464 #| "static void *\n"
465 #| "threadfunc(void *parm)\n"
466 #| "{\n"
467 #| " sleep(5); // allow main program to set the thread name\n"
468 #| " return NULL;\n"
469 #| "}\n"
470 #| "\\&\n"
471 #| "int\n"
472 #| "main(int argc, char *argv[])\n"
473 #| "{\n"
474 #| " pthread_t thread;\n"
475 #| " int rc;\n"
476 #| " char thread_name[NAMELEN];\n"
477 #| "\\&\n"
478 #| " rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
479 #| " if (rc != 0)\n"
480 #| " errc(EXIT_FAILURE, rc, \"pthread_create\");\n"
481 #| "\\&\n"
482 #| " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
483 #| " if (rc != 0)\n"
484 #| " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
485 #| "\\&\n"
486 #| " printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
487 #| " rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
488 #| " if (rc != 0)\n"
489 #| " errc(EXIT_FAILURE, rc, \"pthread_setname_np\");\n"
490 #| "\\&\n"
491 #| " sleep(2);\n"
492 #| "\\&\n"
493 #| " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
494 #| " if (rc != 0)\n"
495 #| " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
496 #| " printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
497 #| "\\&\n"
498 #| " rc = pthread_join(thread, NULL);\n"
499 #| " if (rc != 0)\n"
500 #| " errc(EXIT_FAILURE, rc, \"pthread_join\");\n"
501 #| "\\&\n"
502 #| " printf(\"Done\\en\");\n"
503 #| " exit(EXIT_SUCCESS);\n"
504 #| "}\n"
505 msgid ""
506 "#define _GNU_SOURCE\n"
507 "#include E<lt>err.hE<gt>\n"
508 "#include E<lt>errno.hE<gt>\n"
509 "#include E<lt>pthread.hE<gt>\n"
510 "#include E<lt>stdio.hE<gt>\n"
511 "#include E<lt>stdlib.hE<gt>\n"
512 "#include E<lt>string.hE<gt>\n"
513 "#include E<lt>unistd.hE<gt>\n"
514 "\\&\n"
515 "#define NAMELEN 16\n"
516 "\\&\n"
517 "static void *\n"
518 "threadfunc(void *parm)\n"
519 "{\n"
520 " sleep(5); // allow main program to set the thread name\n"
521 " return NULL;\n"
522 "}\n"
523 "\\&\n"
524 "int\n"
525 "main(int argc, char *argv[])\n"
526 "{\n"
527 " pthread_t thread;\n"
528 " int rc;\n"
529 " char thread_name[NAMELEN];\n"
530 "\\&\n"
531 " rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
532 " if (rc != 0)\n"
533 " errc(EXIT_FAILURE, rc, \"pthread_create\");\n"
534 "\\&\n"
535 " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
536 " if (rc != 0)\n"
537 " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
538 "\\&\n"
539 " printf(\"Created a thread. Default name is: %s\\[rs]n\", thread_name);\n"
540 " rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
541 " if (rc != 0)\n"
542 " errc(EXIT_FAILURE, rc, \"pthread_setname_np\");\n"
543 "\\&\n"
544 " sleep(2);\n"
545 "\\&\n"
546 " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
547 " if (rc != 0)\n"
548 " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
549 " printf(\"The thread name after setting it is %s.\\[rs]n\", thread_name);\n"
550 "\\&\n"
551 " rc = pthread_join(thread, NULL);\n"
552 " if (rc != 0)\n"
553 " errc(EXIT_FAILURE, rc, \"pthread_join\");\n"
554 "\\&\n"
555 " printf(\"Done\\[rs]n\");\n"
556 " exit(EXIT_SUCCESS);\n"
557 "}\n"
558 msgstr ""
559 "#define _GNU_SOURCE\n"
560 "#include E<lt>err.hE<gt>\n"
561 "#include E<lt>errno.hE<gt>\n"
562 "#include E<lt>pthread.hE<gt>\n"
563 "#include E<lt>stdio.hE<gt>\n"
564 "#include E<lt>stdlib.hE<gt>\n"
565 "#include E<lt>string.hE<gt>\n"
566 "#include E<lt>unistd.hE<gt>\n"
567 "\\&\n"
568 "#define NAMELEN 16\n"
569 "\\&\n"
570 "static void *\n"
571 "threadfunc(void *parm)\n"
572 "{\n"
573 " sleep(5); // permet au programme principal de définir\n"
574 " // le nom du thread\n"
575 " return NULL;\n"
576 "}\n"
577 "\\&\n"
578 "int\n"
579 "main(int argc, char *argv[])\n"
580 "{\n"
581 " pthread_t thread;\n"
582 " int rc;\n"
583 " char thread_name[NAMELEN];\n"
584 "\\&\n"
585 " rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
586 " if (rc != 0)\n"
587 " errc(EXIT_FAILURE, rc, \"pthread_create\");\n"
588 "\\&\n"
589 " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
590 " if (rc != 0)\n"
591 " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
592 "\\&\n"
593 " printf(\"Thread créé. Le nom par défaut est : %s\\en\", thread_name);\n"
594 " rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
595 " if (rc != 0)\n"
596 " errc(EXIT_FAILURE, rc, \"pthread_setname_np\");\n"
597 "\\&\n"
598 " sleep(2);\n"
599 "\\&\n"
600 " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
601 " if (rc != 0)\n"
602 " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
603 " printf(\"Le nom du thread après nommage est %s.\\en\", thread_name);\n"
604 "\\&\n"
605 " rc = pthread_join(thread, NULL);\n"
606 " if (rc != 0)\n"
607 " errc(EXIT_FAILURE, rc, \"pthread_join\");\n"
608 "\\&\n"
609 " printf(\"Done\\en\");\n"
610 " exit(EXIT_SUCCESS);\n"
611 "}\n"
612
613 #. SRC END
614 #. type: SH
615 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
616 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
617 #, no-wrap
618 msgid "SEE ALSO"
619 msgstr "VOIR AUSSI"
620
621 #. type: Plain text
622 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
623 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
624 msgid "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
625 msgstr "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
626
627 #. type: TH
628 #: debian-trixie
629 #, no-wrap
630 msgid "2024-06-15"
631 msgstr "15 juin 2024"
632
633 #. type: TH
634 #: debian-trixie
635 #, no-wrap
636 msgid "Linux man-pages 6.9.1"
637 msgstr "Pages du manuel de Linux 6.9.1"
638
639 #. type: Plain text
640 #: debian-trixie
641 msgid "POSIX threads library (I<libpthread>, I<-lpthread>)"
642 msgstr "Bibliothèque de threads POSIX (I<libpthread>, I<-lpthread>)"
643
644 #. type: Plain text
645 #: debian-trixie fedora-44 fedora-rawhide
646 #, no-wrap
647 msgid ""
648 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
649 "B<int pthread_getname_np(pthread_t >I<thread>B<, char >I<name>B<[.>I<size>B<], size_t >I<size>B<);>\n"
650 msgstr ""
651 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<nom>B<);>\n"
652 "B<int pthread_getname_np(pthread_t >I<thread>B<, char >I<nom>B<[.>I<taille>B<], size_t >I<taille>B<);>\n"
653
654 #. type: Plain text
655 #: debian-trixie fedora-44 fedora-rawhide
656 #, no-wrap
657 msgid ""
658 "$B< ./a.out>\n"
659 "Created a thread. Default name is: a.out\n"
660 "The thread name after setting it is THREADFOO.\n"
661 "B<\\[ha]Z> # Suspend the program\n"
662 "[1]+ Stopped ./a.out\n"
663 "$ B<ps H -C a.out -o \\[aq]pid tid cmd comm\\[aq]>\n"
664 " PID TID CMD COMMAND\n"
665 " 5990 5990 ./a.out a.out\n"
666 " 5990 5991 ./a.out THREADFOO\n"
667 "$ B<cat /proc/5990/task/5990/comm>\n"
668 "a.out\n"
669 "$ B<cat /proc/5990/task/5991/comm>\n"
670 "THREADFOO\n"
671 msgstr ""
672 "$B< ./a.out>\n"
673 "Thread créé. Le nom par défaut est : a.out\n"
674 "Le nom du thread après nommage est THREADFOO.\n"
675 "B<\\[ha]Z> # Suspendre l'exécution du programme\n"
676 "[1]+ Stoppé ./a.out\n"
677 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
678 " PID TID CMD COMMAND\n"
679 " 5990 5990 ./a.out a.out\n"
680 " 5990 5991 ./a.out THREADFOO\n"
681 "$ B<cat /proc/5990/task/5990/comm>\n"
682 "a.out\n"
683 "$ B<cat /proc/5990/task/5991/comm>\n"
684 "THREADFOO\n"
685
686 #. type: Plain text
687 #: debian-trixie fedora-44 fedora-rawhide
688 #, fuzzy, no-wrap
689 #| msgid ""
690 #| "#define _GNU_SOURCE\n"
691 #| "#include E<lt>err.hE<gt>\n"
692 #| "#include E<lt>errno.hE<gt>\n"
693 #| "#include E<lt>pthread.hE<gt>\n"
694 #| "#include E<lt>stdio.hE<gt>\n"
695 #| "#include E<lt>stdlib.hE<gt>\n"
696 #| "#include E<lt>string.hE<gt>\n"
697 #| "#include E<lt>unistd.hE<gt>\n"
698 #| "\\&\n"
699 #| "#define NAMELEN 16\n"
700 #| "\\&\n"
701 #| "static void *\n"
702 #| "threadfunc(void *parm)\n"
703 #| "{\n"
704 #| " sleep(5); // allow main program to set the thread name\n"
705 #| " return NULL;\n"
706 #| "}\n"
707 #| "\\&\n"
708 #| "int\n"
709 #| "main(int argc, char *argv[])\n"
710 #| "{\n"
711 #| " pthread_t thread;\n"
712 #| " int rc;\n"
713 #| " char thread_name[NAMELEN];\n"
714 #| "\\&\n"
715 #| " rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
716 #| " if (rc != 0)\n"
717 #| " errc(EXIT_FAILURE, rc, \"pthread_create\");\n"
718 #| "\\&\n"
719 #| " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
720 #| " if (rc != 0)\n"
721 #| " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
722 #| "\\&\n"
723 #| " printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
724 #| " rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
725 #| " if (rc != 0)\n"
726 #| " errc(EXIT_FAILURE, rc, \"pthread_setname_np\");\n"
727 #| "\\&\n"
728 #| " sleep(2);\n"
729 #| "\\&\n"
730 #| " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
731 #| " if (rc != 0)\n"
732 #| " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
733 #| " printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
734 #| "\\&\n"
735 #| " rc = pthread_join(thread, NULL);\n"
736 #| " if (rc != 0)\n"
737 #| " errc(EXIT_FAILURE, rc, \"pthread_join\");\n"
738 #| "\\&\n"
739 #| " printf(\"Done\\en\");\n"
740 #| " exit(EXIT_SUCCESS);\n"
741 #| "}\n"
742 msgid ""
743 "#define _GNU_SOURCE\n"
744 "#include E<lt>err.hE<gt>\n"
745 "#include E<lt>errno.hE<gt>\n"
746 "#include E<lt>pthread.hE<gt>\n"
747 "#include E<lt>stdio.hE<gt>\n"
748 "#include E<lt>stdlib.hE<gt>\n"
749 "#include E<lt>string.hE<gt>\n"
750 "#include E<lt>unistd.hE<gt>\n"
751 "\\&\n"
752 "#define NAMELEN 16\n"
753 "\\&\n"
754 "static void *\n"
755 "threadfunc(void *parm)\n"
756 "{\n"
757 " sleep(5); // allow main program to set the thread name\n"
758 " return NULL;\n"
759 "}\n"
760 "\\&\n"
761 "int\n"
762 "main(int argc, char *argv[])\n"
763 "{\n"
764 " pthread_t thread;\n"
765 " int rc;\n"
766 " char thread_name[NAMELEN];\n"
767 "\\&\n"
768 " rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
769 " if (rc != 0)\n"
770 " errc(EXIT_FAILURE, rc, \"pthread_create\");\n"
771 "\\&\n"
772 " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
773 " if (rc != 0)\n"
774 " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
775 "\\&\n"
776 " printf(\"Created a thread. Default name is: %s\\[rs]n\", thread_name);\n"
777 " rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
778 " if (rc != 0)\n"
779 " errc(EXIT_FAILURE, rc, \"pthread_setname_np\");\n"
780 "\\&\n"
781 " sleep(2);\n"
782 "\\&\n"
783 " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
784 " if (rc != 0)\n"
785 " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
786 " printf(\"The thread name after setting it is %s.\\[rs]n\", thread_name);\n"
787 "\\&\n"
788 " rc = pthread_join(thread, NULL);\n"
789 " if (rc != 0)\n"
790 " errc(EXIT_FAILURE, rc, \"pthread_join\");\n"
791 "\\&\n"
792 " printf(\"Done\\[rs]n\");\n"
793 " exit(EXIT_SUCCESS);\n"
794 "}\n"
795 msgstr ""
796 "#define _GNU_SOURCE\n"
797 "#include E<lt>err.hE<gt>\n"
798 "#include E<lt>errno.hE<gt>\n"
799 "#include E<lt>pthread.hE<gt>\n"
800 "#include E<lt>stdio.hE<gt>\n"
801 "#include E<lt>stdlib.hE<gt>\n"
802 "#include E<lt>string.hE<gt>\n"
803 "#include E<lt>unistd.hE<gt>\n"
804 "\\&\n"
805 "#define NAMELEN 16\n"
806 "\\&\n"
807 "static void *\n"
808 "threadfunc(void *parm)\n"
809 "{\n"
810 " sleep(5); // permet au programme principal de définir\n"
811 " // le nom du thread\n"
812 " return NULL;\n"
813 "}\n"
814 "\\&\n"
815 "int\n"
816 "main(int argc, char *argv[])\n"
817 "{\n"
818 " pthread_t thread;\n"
819 " int rc;\n"
820 " char thread_name[NAMELEN];\n"
821 "\\&\n"
822 " rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
823 " if (rc != 0)\n"
824 " errc(EXIT_FAILURE, rc, \"pthread_create\");\n"
825 "\\&\n"
826 " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
827 " if (rc != 0)\n"
828 " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
829 "\\&\n"
830 " printf(\"Thread créé. Le nom par défaut est : %s\\en\", thread_name);\n"
831 " rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
832 " if (rc != 0)\n"
833 " errc(EXIT_FAILURE, rc, \"pthread_setname_np\");\n"
834 "\\&\n"
835 " sleep(2);\n"
836 "\\&\n"
837 " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
838 " if (rc != 0)\n"
839 " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
840 " printf(\"Le nom du thread après nommage est %s.\\en\", thread_name);\n"
841 "\\&\n"
842 " rc = pthread_join(thread, NULL);\n"
843 " if (rc != 0)\n"
844 " errc(EXIT_FAILURE, rc, \"pthread_join\");\n"
845 "\\&\n"
846 " printf(\"Done\\en\");\n"
847 " exit(EXIT_SUCCESS);\n"
848 "}\n"
849
850 #. type: TH
851 #: fedora-44 fedora-rawhide
852 #, no-wrap
853 msgid "2024-07-23"
854 msgstr "23 juillet 2024"
855
856 #. type: TH
857 #: fedora-44 fedora-rawhide
858 #, no-wrap
859 msgid "Linux man-pages 6.13"
860 msgstr "Pages du manuel de Linux 6.13"
861
862 #. type: TH
863 #: mageia-cauldron
864 #, no-wrap
865 msgid "Linux man-pages 6.17"
866 msgstr "Pages du manuel de Linux 6.17"
867
868 #. type: TH
869 #: opensuse-leap-16-1 opensuse-tumbleweed
870 #, no-wrap
871 msgid "Linux man-pages (unreleased)"
872 msgstr "Pages du manuel de Linux (non publiées)"