diff options
author | vangyzen <vangyzen@FreeBSD.org> | 2016-12-13 23:34:07 +0000 |
---|---|---|
committer | vangyzen <vangyzen@FreeBSD.org> | 2016-12-13 23:34:07 +0000 |
commit | f1a55d2a3f0f502f1b9f16b4d166349ecf79664d (patch) | |
tree | 945af3134d118911e02cf4f89d57e705d6f36960 /share/man/man3 | |
parent | 33d63662f28bf596d2c89c3428e2d96264ad6c4c (diff) | |
download | FreeBSD-src-f1a55d2a3f0f502f1b9f16b4d166349ecf79664d.zip FreeBSD-src-f1a55d2a3f0f502f1b9f16b4d166349ecf79664d.tar.gz |
MFC r309460
thr_set_name(): silently truncate the given name as needed
Instead of failing with ENAMETOOLONG, which is swallowed by
pthread_set_name_np() anyway, truncate the given name to MAXCOMLEN+1
bytes. This is more likely what the user wants, and saves the
caller from truncating it before the call (which was the only
recourse).
Polish pthread_set_name_np(3) and add a .Xr to thr_set_name(2)
so the user might find the documentation for this behavior.
Sponsored by: Dell EMC
Diffstat (limited to 'share/man/man3')
-rw-r--r-- | share/man/man3/pthread_set_name_np.3 | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/share/man/man3/pthread_set_name_np.3 b/share/man/man3/pthread_set_name_np.3 index e302939..c8e5cb4 100644 --- a/share/man/man3/pthread_set_name_np.3 +++ b/share/man/man3/pthread_set_name_np.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 13, 2003 +.Dd December 2, 2016 .Dt PTHREAD_SET_NAME_NP 3 .Os .Sh NAME @@ -35,18 +35,19 @@ .Sh SYNOPSIS .In pthread_np.h .Ft void -.Fn pthread_set_name_np "pthread_t tid" "const char *name" +.Fn pthread_set_name_np "pthread_t thread" "const char *name" .Sh DESCRIPTION The .Fn pthread_set_name_np -function sets internal name for thread specified by -.Fa tid -argument to string value specified by +function applies a copy of the given .Fa name -argument. +to the given +.Fa thread . .Sh ERRORS Because of the debugging nature of this function, all errors that may appear inside are silently ignored. +.Sh SEE ALSO +.Xr thr_set_name 2 .Sh AUTHORS This manual page was written by .An Alexey Zelkin Aq Mt phantom@FreeBSD.org . |