From owner-p4-projects@FreeBSD.ORG Mon Sep 5 22:32:29 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 70C4416A422; Mon, 5 Sep 2005 22:32:29 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 32CCF16A421 for ; Mon, 5 Sep 2005 22:32:29 +0000 (GMT) (envelope-from soc-tyler@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0727343D48 for ; Mon, 5 Sep 2005 22:32:28 +0000 (GMT) (envelope-from soc-tyler@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j85MWRds022568 for ; Mon, 5 Sep 2005 22:32:27 GMT (envelope-from soc-tyler@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j85MWRFm022565 for perforce@freebsd.org; Mon, 5 Sep 2005 22:32:27 GMT (envelope-from soc-tyler@freebsd.org) Date: Mon, 5 Sep 2005 22:32:27 GMT Message-Id: <200509052232.j85MWRFm022565@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-tyler@freebsd.org using -f From: soc-tyler To: Perforce Change Reviews Cc: Subject: PERFORCE change 83148 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2005 22:32:30 -0000 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);