Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Sep 2005 22:32:27 GMT
From:      soc-tyler <soc-tyler@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 83148 for review
Message-ID:  <200509052232.j85MWRFm022565@repoman.freebsd.org>

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

Change 83148 by soc-tyler@soc-tyler_launchd on 2005/09/05 22:32:25

	Well...it compiles with the init code....
	
	I'll hack on it a little more before I test it as PID 1 :P

Affected files ...

.. //depot/projects/soc2005/launchd/Makefile#20 edit
.. //depot/projects/soc2005/launchd/init.8#6 delete
.. //depot/projects/soc2005/launchd/init.c#11 edit

Differences ...

==== //depot/projects/soc2005/launchd/Makefile#20 (text+ko) ====

@@ -4,7 +4,7 @@
 PROG=	launchd
 SRCS=	launchd.c liblaunch.c init.c
 #launchdebugd.c launchproxy.c
-MAN=	init.8 launchd.8 
+MAN=	launchd.8 
 
 BINMODE=500
 INSTALLFLAGS=-b -B.bak
@@ -15,7 +15,7 @@
 # init.c related CFLAGS (from src/sbin/init/Makefile)
 # -DSECURE to make secure single-user logins (enter root passwd, etc)
 # -DDEBUGSHELL ? we don't need no stinkin' DEBUGSHELL
-CFLAGS+= -DLOGIN_CAP -DCOMPAT_SYSV_INIT \
+CFLAGS+= -DLOGIN_CAP -DCOMPAT_SYSV_INIT -D_BE_INIT_ \
 	-DLAUNCHD_PATH=`echo \"$$PWD/launchd\"` \
 	-DLAUNCHCTL_PATH=`echo \"$$PWD/launchctl/launchctl\"`
 # defining LAUNCHD_PATH and LAUNCHCTL_PATH is for development only

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

@@ -149,7 +149,7 @@
 
 void transition(state_t);
 /* this is something of old init.c, the state nonsense */
-//state_t requested_transition = runcom;
+state_t requested_transition = runcom;
 
 void setctty(const char *);
 
@@ -175,7 +175,7 @@
 
 void free_session(session_t *);
 session_t *new_session(session_t *, int, struct ttyent *);
-session_t *sessions;
+static TAILQ_HEAD(sesshead, session_t) *sessions = TAILQ_HEAD_INITIALIZER(*sessions);
 
 char **construct_argv(char *);
 void start_window_system(session_t *);
@@ -231,13 +231,13 @@
 		 */
 		if (getsecuritylevel() == 0)
 			setsecuritylevel(1);
-/* XXX: I'm not exactly sure what this macro call's purpose is, so I'm
- * not going to touch it until it's time to execute launchd(8) as PID 1
- */
+/* XXX: I'm not certain this is necessary on non-mach systems */
+/*
 		TAILQ_FOREACH(s, &sessions, tqe) {
 			if (s->se_process == 0)
 				session_launch(s);
 		}
+*/
 	}
 #endif
 }
@@ -567,8 +567,10 @@
 			continue;
 		//return (state_func_t) single_user;
 	}
+	*/
+
 	requested_transition = 0;
-*/
+	
 	do {
 		if ((wpid = waitpid(-1, &status, WUNTRACED)) != -1)
 			collect_child(wpid);



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