diff usr/src/cmd/svc/startd/startd.c @ 14129:790945ad7848

3986 svc.startd dies in getutxent_frec() 3987 svc.startd dies in utmpx_postfork() Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Saso Kiselkov <skiselkov@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net>
author Bryan Cantrill <bryan@joyent.com>
date Sun, 04 Aug 2013 09:58:38 -0700
parents da056fdd2d14
children
line wrap: on
line diff
--- a/usr/src/cmd/svc/startd/startd.c	Thu Aug 08 14:17:55 2013 -0700
+++ b/usr/src/cmd/svc/startd/startd.c	Sun Aug 04 09:58:38 2013 -0700
@@ -771,6 +771,11 @@
 		log_framework(LOG_DEBUG, "Existing configd contract %ld; not "
 		    "starting svc.configd\n", configd_ctid);
 
+	/*
+	 * Call utmpx_init() before creating the fork_configd() thread.
+	 */
+	utmpx_init();
+
 	(void) startd_thread_create(fork_configd_thread, (void *)configd_ctid);
 
 	/*
@@ -786,7 +791,6 @@
 	}
 	MUTEX_UNLOCK(&st->st_configd_live_lock);
 
-	utmpx_init();
 	wait_init();
 
 	if (read_startd_config())