Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Sep 2005 19:41:33 GMT
From:      soc-tyler <soc-tyler@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 82974 for review
Message-ID:  <200509011941.j81JfXXA051875@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=82974

Change 82974 by soc-tyler@soc-tyler_launchd on 2005/09/01 19:40:41

	Remove debugging statements, and uncomment some other debuggery

Affected files ...

.. //depot/projects/soc2005/launchd/launchctl/launchctl.c#17 edit
.. //depot/projects/soc2005/launchd/launchd.c#19 edit

Differences ...

==== //depot/projects/soc2005/launchd/launchctl/launchctl.c#17 (text+ko) ====

@@ -149,7 +149,7 @@
 	{ "umask",	umask_cmd,		"Change launchd's umask" },
 	{ "help",	help_cmd,		"This help output" },
 	{"exit", 	exit_cmd, 		"Exit launchctl" },
-	{"quit",	exit_cmd,		"Quit launchctl"},
+	{"quit",	exit_cmd,		"Exit launchctl"},
 };
 
 static bool istty = false;

==== //depot/projects/soc2005/launchd/launchd.c#19 (text+ko) ====

@@ -343,22 +343,22 @@
 		static struct timespec timeout = { 30, 0 };
 		struct timespec *timeoutp = NULL;
 
-	/*	if (getpid() == 1) {
+		if (getpid() == 1) {
 			if (readcfg_pid == 0)
 				init_pre_kevent();
 		} else {
 			/* in theory, this will make sure we don't exit if we
 			 * have (a) any more jobs nd (b) open socket connections
 			 * to say, something like, launchctl? ;)
-			 *
+			 */
 			if (TAILQ_EMPTY(&jobs) && TAILQ_EMPTY(&connections)) {
-				/* liblaunch will restart launchd if we're needed again *
+				/* liblaunch will restart us if we're needed again */
 				timeoutp = &timeout;
 			} else if (shutdown_in_progress && total_children == 0) {
 				exit(EXIT_SUCCESS);
 			}
 		}
-	*/	
+		
 		switch (kevent(mainkq, NULL, 0, &kev, 1, timeoutp)) {
 			case -1:
 				syslog(LOG_DEBUG, "kevent(): %m");
@@ -1011,9 +1011,6 @@
 		if (NULL == resp)
 			resp = launch_data_new_errno(ESRCH);
 	} else if (!strcmp(cmd, LAUNCH_KEY_REMOVEJOB)) {
-		fprintf(stderr, "**debug** j == %p\n", j);
-		fprintf(stderr, "**debug** jobs.tqh_first == %p\n", jobs.tqh_first);
-		fprintf(stderr, "**debug** jobs.tqh_last == %p\n", jobs.tqh_last);
 		TAILQ_FOREACH(j, &jobs, tqe) {
 			if (!strcmp(j->label, launch_data_get_string(data))) {
 				job_remove(j);
@@ -2545,8 +2542,6 @@
         static pthread_mutex_t forklock = PTHREAD_MUTEX_INITIALIZER;
         pid_t r;
         size_t i;
-        
-        fprintf(stderr, "**debug** starting launch_fork()\n");
 
         pthread_mutex_lock(&forklock);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509011941.j81JfXXA051875>