2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2018 Joyent, Inc.
20 .Nd get or set the name of a thread
34 .Fa "const char *name"
42 functions, respectively, get and set the names of the thread whose id is given
52 Thread names are limited to
54 including the terminating NUL.
55 They may only contain printable ASCII characters.
57 To clear a thread name, call
62 Unlike some other systems, threads do not inherit the process name by default.
64 Upon successful completion, the
70 Otherwise, an error number is returned to indicate the error.
71 If the thread identified by
73 does not have a name set,
75 will be set to an empty string (length = 0).
77 On failure, the contents of the buffer are undefined.
86 function will fail with:
98 was not large enough to contain the name of the thread.
107 function will fail with:
112 exceeds the maximum allowed size.
118 .Sh INTERFACE STABILITY
123 .Xr pthread_setname_np 3c ,