Debian Codegraph @

templates/man3/pthread_setname_np.3.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:38+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "pthread_setname_np"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid "pthread_setname_np, pthread_getname_np - set/get the name of a thread"
50 msgstr ""
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "LIBRARY"
57 msgstr ""
58
59 #. type: Plain text
60 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
61 #: opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "POSIX threads library (I<libpthread>,\\ I<-lpthread>)"
63 msgstr ""
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "SYNOPSIS"
70 msgstr ""
71
72 #. type: Plain text
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid ""
77 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
78 "B<#include E<lt>pthread.hE<gt>>\n"
79 msgstr ""
80
81 #. type: Plain text
82 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
83 #: opensuse-tumbleweed
84 #, no-wrap
85 msgid ""
86 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
87 "B<int pthread_getname_np(>size_t size;\n"
88 "B< pthread_t >I<thread>B<, char >I<name>B<[>I<size>B<], size_t >I<size>B<);>\n"
89 msgstr ""
90
91 #. type: SH
92 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
93 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
94 #, no-wrap
95 msgid "DESCRIPTION"
96 msgstr ""
97
98 #. type: Plain text
99 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
100 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
101 msgid ""
102 "By default, all the threads created using B<pthread_create>() inherit the "
103 "program name. The B<pthread_setname_np>() function can be used to set a "
104 "unique name for a thread, which can be useful for debugging multithreaded "
105 "applications. The thread name is a meaningful C language string, whose "
106 "length is restricted to 16 characters, including the terminating null byte "
107 "(\\[aq]\\[rs]0\\[aq]). The I<thread> argument specifies the thread whose "
108 "name is to be changed; I<name> specifies the new name."
109 msgstr ""
110
111 #. type: Plain text
112 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
113 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
114 msgid ""
115 "The B<pthread_getname_np>() function can be used to retrieve the name of "
116 "the thread. The I<thread> argument specifies the thread whose name is to be "
117 "retrieved. The buffer I<name> is used to return the thread name; I<size> "
118 "specifies the number of bytes available in I<name>. The buffer specified by "
119 "I<name> should be at least 16 characters in length. The returned thread "
120 "name in the output buffer will be null terminated."
121 msgstr ""
122
123 #. type: SH
124 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
125 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
126 #, no-wrap
127 msgid "RETURN VALUE"
128 msgstr ""
129
130 #. type: Plain text
131 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
132 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
133 msgid ""
134 "On success, these functions return 0; on error, they return a nonzero error "
135 "number."
136 msgstr ""
137
138 #. type: SH
139 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
140 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
141 #, no-wrap
142 msgid "ERRORS"
143 msgstr ""
144
145 #. type: Plain text
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 msgid ""
149 "The B<pthread_setname_np>() function can fail with the following error:"
150 msgstr ""
151
152 #. type: TP
153 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
154 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
155 #, no-wrap
156 msgid "B<ERANGE>"
157 msgstr ""
158
159 #. type: Plain text
160 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
161 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
162 msgid ""
163 "The length of the string specified pointed to by I<name> exceeds the allowed "
164 "limit."
165 msgstr ""
166
167 #. type: Plain text
168 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
169 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
170 msgid ""
171 "The B<pthread_getname_np>() function can fail with the following error:"
172 msgstr ""
173
174 #. type: Plain text
175 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
176 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
177 msgid ""
178 "The buffer specified by I<name> and I<size> is too small to hold the thread "
179 "name."
180 msgstr ""
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 "If either of these functions fails to open I</proc/self/task/>tidI</comm>, "
187 "then the call may fail with one of the errors described in B<open>(2)."
188 msgstr ""
189
190 #. type: SH
191 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
192 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
193 #, no-wrap
194 msgid "ATTRIBUTES"
195 msgstr ""
196
197 #. type: Plain text
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 msgid ""
201 "For an explanation of the terms used in this section, see B<attributes>(7)."
202 msgstr ""
203
204 #. type: tbl table
205 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
206 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
207 #, no-wrap
208 msgid "Interface"
209 msgstr ""
210
211 #. type: tbl table
212 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
213 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
214 #, no-wrap
215 msgid "Attribute"
216 msgstr ""
217
218 #. type: tbl table
219 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
220 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
221 #, no-wrap
222 msgid "Value"
223 msgstr ""
224
225 #. type: tbl table
226 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
227 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
228 #, no-wrap
229 msgid ".na\n"
230 msgstr ""
231
232 #. type: tbl table
233 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
234 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
235 #, no-wrap
236 msgid ".nh\n"
237 msgstr ""
238
239 #. type: tbl table
240 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
241 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
242 #, no-wrap
243 msgid ""
244 "B<pthread_setname_np>(),\n"
245 "B<pthread_getname_np>()"
246 msgstr ""
247
248 #. type: tbl table
249 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
250 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
251 #, no-wrap
252 msgid "Thread safety"
253 msgstr ""
254
255 #. type: tbl table
256 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
257 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
258 #, no-wrap
259 msgid "MT-Safe"
260 msgstr ""
261
262 #. type: SH
263 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
264 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
265 #, no-wrap
266 msgid "STANDARDS"
267 msgstr ""
268
269 #. type: Plain text
270 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
271 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
272 msgid "GNU; hence the suffix \"_np\" (nonportable) in the names."
273 msgstr ""
274
275 #. type: SH
276 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
277 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
278 #, no-wrap
279 msgid "HISTORY"
280 msgstr ""
281
282 #. type: Plain text
283 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
284 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
285 msgid "glibc 2.12."
286 msgstr ""
287
288 #. type: SH
289 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
290 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
291 #, no-wrap
292 msgid "NOTES"
293 msgstr ""
294
295 #. type: Plain text
296 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
297 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
298 msgid ""
299 "B<pthread_setname_np>() internally writes to the thread-specific I<comm> "
300 "file under the I</proc> filesystem: I</proc/self/task/>tidI</comm>. "
301 "B<pthread_getname_np>() retrieves it from the same location."
302 msgstr ""
303
304 #. type: SH
305 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
306 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
307 #, no-wrap
308 msgid "EXAMPLES"
309 msgstr ""
310
311 #. type: Plain text
312 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
313 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
314 msgid ""
315 "The program below demonstrates the use of B<pthread_setname_np>() and "
316 "B<pthread_getname_np>()."
317 msgstr ""
318
319 #. type: Plain text
320 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
321 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
322 msgid "The following shell session shows a sample run of the program:"
323 msgstr ""
324
325 #. type: Plain text
326 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
327 #: opensuse-tumbleweed
328 #, no-wrap
329 msgid ""
330 "$B< ./a.out>;\n"
331 "Created a thread. Default name is: a.out\n"
332 "The thread name after setting it is THREADFOO.\n"
333 "\\f[B]\\[ha]Z\\fR # Suspend the program\n"
334 "[1]+ Stopped ./a.out\n"
335 "$ B<ps H -C a.out -o \\[aq]pid tid cmd comm\\[aq]>\n"
336 " PID TID CMD COMMAND\n"
337 " 5990 5990 ./a.out a.out\n"
338 " 5990 5991 ./a.out THREADFOO\n"
339 "$ B<cat /proc/5990/task/5990/comm>\n"
340 "a.out\n"
341 "$ B<cat /proc/5990/task/5991/comm>\n"
342 "THREADFOO\n"
343 msgstr ""
344
345 #. type: SS
346 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
347 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
348 #, no-wrap
349 msgid "Program source"
350 msgstr ""
351
352 #. type: Plain text
353 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
354 #: opensuse-tumbleweed
355 #, no-wrap
356 msgid ""
357 "#define _GNU_SOURCE\n"
358 "#include E<lt>err.hE<gt>\n"
359 "#include E<lt>errno.hE<gt>\n"
360 "#include E<lt>pthread.hE<gt>\n"
361 "#include E<lt>stdio.hE<gt>\n"
362 "#include E<lt>stdlib.hE<gt>\n"
363 "#include E<lt>string.hE<gt>\n"
364 "#include E<lt>unistd.hE<gt>\n"
365 "\\&\n"
366 "#define NAMELEN 16\n"
367 "\\&\n"
368 "static void *\n"
369 "threadfunc(void *parm)\n"
370 "{\n"
371 " sleep(5); // allow main program to set the thread name\n"
372 " return NULL;\n"
373 "}\n"
374 "\\&\n"
375 "int\n"
376 "main(int argc, char *argv[])\n"
377 "{\n"
378 " pthread_t thread;\n"
379 " int rc;\n"
380 " char thread_name[NAMELEN];\n"
381 "\\&\n"
382 " rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
383 " if (rc != 0)\n"
384 " errc(EXIT_FAILURE, rc, \"pthread_create\");\n"
385 "\\&\n"
386 " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
387 " if (rc != 0)\n"
388 " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
389 "\\&\n"
390 " printf(\"Created a thread. Default name is: %s\\[rs]n\", thread_name);\n"
391 " rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
392 " if (rc != 0)\n"
393 " errc(EXIT_FAILURE, rc, \"pthread_setname_np\");\n"
394 "\\&\n"
395 " sleep(2);\n"
396 "\\&\n"
397 " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
398 " if (rc != 0)\n"
399 " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
400 " printf(\"The thread name after setting it is %s.\\[rs]n\", thread_name);\n"
401 "\\&\n"
402 " rc = pthread_join(thread, NULL);\n"
403 " if (rc != 0)\n"
404 " errc(EXIT_FAILURE, rc, \"pthread_join\");\n"
405 "\\&\n"
406 " printf(\"Done\\[rs]n\");\n"
407 " exit(EXIT_SUCCESS);\n"
408 "}\n"
409 msgstr ""
410
411 #. SRC END
412 #. type: SH
413 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
414 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
415 #, no-wrap
416 msgid "SEE ALSO"
417 msgstr ""
418
419 #. type: Plain text
420 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
421 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
422 msgid "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
423 msgstr ""
424
425 #. type: TH
426 #: debian-trixie
427 #, no-wrap
428 msgid "2024-06-15"
429 msgstr ""
430
431 #. type: TH
432 #: debian-trixie
433 #, no-wrap
434 msgid "Linux man-pages 6.9.1"
435 msgstr ""
436
437 #. type: Plain text
438 #: debian-trixie
439 msgid "POSIX threads library (I<libpthread>, I<-lpthread>)"
440 msgstr ""
441
442 #. type: Plain text
443 #: debian-trixie fedora-44 fedora-rawhide
444 #, no-wrap
445 msgid ""
446 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
447 "B<int pthread_getname_np(pthread_t >I<thread>B<, char >I<name>B<[.>I<size>B<], size_t >I<size>B<);>\n"
448 msgstr ""
449
450 #. type: Plain text
451 #: debian-trixie fedora-44 fedora-rawhide
452 #, no-wrap
453 msgid ""
454 "$B< ./a.out>\n"
455 "Created a thread. Default name is: a.out\n"
456 "The thread name after setting it is THREADFOO.\n"
457 "B<\\[ha]Z> # Suspend the program\n"
458 "[1]+ Stopped ./a.out\n"
459 "$ B<ps H -C a.out -o \\[aq]pid tid cmd comm\\[aq]>\n"
460 " PID TID CMD COMMAND\n"
461 " 5990 5990 ./a.out a.out\n"
462 " 5990 5991 ./a.out THREADFOO\n"
463 "$ B<cat /proc/5990/task/5990/comm>\n"
464 "a.out\n"
465 "$ B<cat /proc/5990/task/5991/comm>\n"
466 "THREADFOO\n"
467 msgstr ""
468
469 #. type: Plain text
470 #: debian-trixie fedora-44 fedora-rawhide
471 #, no-wrap
472 msgid ""
473 "#define _GNU_SOURCE\n"
474 "#include E<lt>err.hE<gt>\n"
475 "#include E<lt>errno.hE<gt>\n"
476 "#include E<lt>pthread.hE<gt>\n"
477 "#include E<lt>stdio.hE<gt>\n"
478 "#include E<lt>stdlib.hE<gt>\n"
479 "#include E<lt>string.hE<gt>\n"
480 "#include E<lt>unistd.hE<gt>\n"
481 "\\&\n"
482 "#define NAMELEN 16\n"
483 "\\&\n"
484 "static void *\n"
485 "threadfunc(void *parm)\n"
486 "{\n"
487 " sleep(5); // allow main program to set the thread name\n"
488 " return NULL;\n"
489 "}\n"
490 "\\&\n"
491 "int\n"
492 "main(int argc, char *argv[])\n"
493 "{\n"
494 " pthread_t thread;\n"
495 " int rc;\n"
496 " char thread_name[NAMELEN];\n"
497 "\\&\n"
498 " rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
499 " if (rc != 0)\n"
500 " errc(EXIT_FAILURE, rc, \"pthread_create\");\n"
501 "\\&\n"
502 " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
503 " if (rc != 0)\n"
504 " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
505 "\\&\n"
506 " printf(\"Created a thread. Default name is: %s\\[rs]n\", thread_name);\n"
507 " rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
508 " if (rc != 0)\n"
509 " errc(EXIT_FAILURE, rc, \"pthread_setname_np\");\n"
510 "\\&\n"
511 " sleep(2);\n"
512 "\\&\n"
513 " rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
514 " if (rc != 0)\n"
515 " errc(EXIT_FAILURE, rc, \"pthread_getname_np\");\n"
516 " printf(\"The thread name after setting it is %s.\\[rs]n\", thread_name);\n"
517 "\\&\n"
518 " rc = pthread_join(thread, NULL);\n"
519 " if (rc != 0)\n"
520 " errc(EXIT_FAILURE, rc, \"pthread_join\");\n"
521 "\\&\n"
522 " printf(\"Done\\[rs]n\");\n"
523 " exit(EXIT_SUCCESS);\n"
524 "}\n"
525 msgstr ""
526
527 #. type: TH
528 #: fedora-44 fedora-rawhide
529 #, no-wrap
530 msgid "2024-07-23"
531 msgstr ""
532
533 #. type: TH
534 #: fedora-44 fedora-rawhide
535 #, no-wrap
536 msgid "Linux man-pages 6.13"
537 msgstr ""
538
539 #. type: TH
540 #: mageia-cauldron
541 #, no-wrap
542 msgid "Linux man-pages 6.17"
543 msgstr ""
544
545 #. type: TH
546 #: opensuse-leap-16-1 opensuse-tumbleweed
547 #, no-wrap
548 msgid "Linux man-pages (unreleased)"
549 msgstr ""