1.\" $OpenBSD: pthread_set_name_np.3,v 1.6 2014/03/06 17:42:25 jmc Exp $
2.\" David Leonard <d@openbsd.org>, 1999. Public domain.
3.Dd $Mdocdate: March 6 2014 $
4.Dt PTHREAD_SET_NAME_NP 3
5.Os
6.Sh NAME
7.Nm pthread_set_name_np
8.Nd set the name of a thread
9.Sh SYNOPSIS
10.In pthread.h
11.In pthread_np.h
12.Ft void
13.Fn pthread_set_name_np "pthread_t thread" "const char *name"
14.Sh DESCRIPTION
15The
16.Fn pthread_set_name_np
17function associates
18.Fa name
19with
20.Fa thread .
21This can be useful for debugging, as the name is displayed in
22the thread status as displayed when the process receives the
23.Dv SIGINFO
24signal.
25.Pp
26The string pointed to by
27.Fa name
28is copied, and so need not be valid for the life of the thread.
29.Sh SEE ALSO
30.Xr pthreads 3
31.Sh STANDARDS
32The
33.Fn pthread_set_name_np
34function is non-portable and may not be supported with the above
35semantics on other POSIX systems.
36