summaryrefslogtreecommitdiff
path: root/usr/src/cmd/nscd/nscd_getentctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/nscd/nscd_getentctx.c')
-rw-r--r--usr/src/cmd/nscd/nscd_getentctx.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/src/cmd/nscd/nscd_getentctx.c b/usr/src/cmd/nscd/nscd_getentctx.c
index 2fed9a5c82..bebd7be19f 100644
--- a/usr/src/cmd/nscd/nscd_getentctx.c
+++ b/usr/src/cmd/nscd/nscd_getentctx.c
@@ -21,6 +21,8 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2018 Joyent, Inc.
*/
#include <sys/ccompile.h>
@@ -30,6 +32,7 @@
#include <string.h>
#include <errno.h>
#include <fcntl.h>
+#include <pthread.h>
#include "nscd_db.h"
#include "nscd_log.h"
@@ -658,6 +661,8 @@ reclaim_getent_ctx(void *arg)
nss_getent_t nssctx = { 0 };
char *me = "reclaim_getent_ctx";
+ (void) pthread_setname_np(pthread_self(), me);
+
/*CONSTCOND*/
while (1) {
@@ -744,7 +749,8 @@ reclaim_getent_ctx(void *arg)
}
static nscd_rc_t
-_nscd_init_getent_ctx_monitor() {
+_nscd_init_getent_ctx_monitor()
+{
int errnum;
char *me = "_nscd_init_getent_ctx_monitor";
@@ -763,7 +769,7 @@ _nscd_init_getent_ctx_monitor() {
* start a thread to reclaim unused getent contexts
*/
if (thr_create(NULL, NULL, reclaim_getent_ctx,
- NULL, THR_DETACHED, NULL) != 0) {
+ NULL, THR_DETACHED, NULL) != 0) {
errnum = errno;
_NSCD_LOG(NSCD_LOG_GETENT_CTX, NSCD_LOG_LEVEL_ERROR)
(me, "thr_create: %s\n", strerror(errnum));