Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section

@@ -20,10 +20,11 @@
  */
 
 /*
  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012 Milan Jurik. All rights reserved.
+ * Copyright 2018 Joyent Inc.
  */
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <synch.h>

@@ -423,10 +424,12 @@
 {
         pid_t           fpid;
         char            *fmri;
         char            *me = "forker_monitor";
 
+        (void) thr_setname(thr_self(), me);
+
         /* wait until forker exits */
         fpid = forker_pid;
         (void) selfcred_pulse(forking_door);
 
         _NSCD_LOG(NSCD_LOG_SELF_CRED, NSCD_LOG_LEVEL_DEBUG)

@@ -1464,10 +1467,12 @@
         DIR             *dp;
         struct dirent   *ep;
         int             found;
         char            *me = "check_user_process";
 
+        (void) thr_setname(thr_self(), me);
+
         for (;;) {
                 (void) sleep(60);
 
                 found = 0;