summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@fingolfin.org>2020-11-13 20:48:43 -0800
committerRobert Mustacchi <rm@fingolfin.org>2020-11-21 08:41:06 -0800
commit059afd40d138a2155e774750e4dcabfd78c9d0be (patch)
tree6c674ffd22cca3d8b17c105e141118a51dfbb215
parent986529380f11a23c3c6de33e5cea6611d4abe648 (diff)
downloadillumos-joyent-059afd40d138a2155e774750e4dcabfd78c9d0be.tar.gz
13312 _thrp_create() should not set the thread name if passed an empty string
Reviewed by: Jason King <jason.brian.king@gmail.com> Reviewed by: Richard Lowe <richlowe@richlowe.net> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/lib/libc/port/threads/thr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/src/lib/libc/port/threads/thr.c b/usr/src/lib/libc/port/threads/thr.c
index 4b7d9035b3..9308d8277f 100644
--- a/usr/src/lib/libc/port/threads/thr.c
+++ b/usr/src/lib/libc/port/threads/thr.c
@@ -715,7 +715,7 @@ _thrp_create(void *stk, size_t stksize, void *(*func)(void *), void *arg,
exit_critical(self);
- if (name != NULL)
+ if (name != NULL && name[0] != '\0')
(void) pthread_setname_np(tid, name);
if (!(flags & THR_SUSPENDED))