]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r309460
authorvangyzen <vangyzen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 15 Dec 2016 01:45:31 +0000 (01:45 +0000)
committervangyzen <vangyzen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 15 Dec 2016 01:45:31 +0000 (01:45 +0000)
commit38b9eaac6d9fc0e46f1978ebcc0a4e7060da7695
tree2146c306c55d2cd1106d8cda9f66760d8864bda2
parente3e55f520dc51b95938bb0245901c08f460fb285
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).

The man page changes were not merged because thr_set_name.2
does not exist on stable/10.

Sponsored by: Dell EMC

git-svn-id: svn://svn.freebsd.org/base/stable/10@310099 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/kern_thr.c