From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=DMARC_NONE,MAILING_LIST_MULTI, RDNS_NONE autolearn=no autolearn_force=no version=4.0.0 Received: from uranus.u235.eyep.net (unknown [194.90.113.98]) by chiba.3jane.net (Postfix) with SMTP id 2C97B1899D for ; Mon, 3 Dec 2001 09:19:42 -0600 (CST) Received: (qmail 32649 invoked by uid 500); 3 Dec 2001 15:12:14 -0000 Subject: Re: [gentoo-dev] Start enhancement From: Vitaly Kushneriuk To: gentoo-dev@gentoo.org In-Reply-To: <20011203215456.C13834@swool.com> References: <004001c17bce$99f982f0$6400a8c0@server> <20011203215456.C13834@swool.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/0.99.0 (Preview Release) Date: 03 Dec 2001 17:12:13 +0200 Message-Id: <1007392333.13527.12.camel@uranus.u235.eyep.net> Mime-Version: 1.0 Sender: gentoo-dev-admin@gentoo.org Errors-To: gentoo-dev-admin@gentoo.org X-BeenThere: gentoo-dev@gentoo.org X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: gentoo-dev@gentoo.org List-Help: List-Post: List-Subscribe: , List-Id: Developer discussion list List-Unsubscribe: , List-Archive: X-Archives-Salt: 30ef9a25-17c9-438e-9b36-ce50b1cd47eb X-Archives-Hash: 7c44a6d4ac090ea17a2a03eace58a1e5 It is definitly possible. Might require writing a little c proggy: waitpids pid1 pid2 .... which returns when ANY of the processes terminates. The rest can be implemented in sh. Or the whole process can be implemented in Python ( thought I don't like the idea of boot process in python) The following is a simplified python/sh algo :-). All marking of who is started + dependencies etc. is done, like in present version, through files and dirs in /dev/shm ----------------------------------------------------------- function can_start(): if depend($1) == '' return TRUE;# no dependencies for service in depend($1) if not_started(service): return FALSE; return TRUE; while not all services started: for every service that not started: if can_start(service): service& PIDS="$PIDS $!" PIDS = `waitpids $PIDS` # will wait for at least one process to # terminate, so we MAY be able to start more # services ----------------------------------------------------------- It is more complicated than that, but not much. exit satatus, error handling, service start output, circular dependancy and timeouts are some of the issues that need to be solved. I might implement it when I'll have some more time then right now (busy working) On Mon, 2001-12-03 at 15:54, Joshua Pierre wrote: > On Mon, Dec 03, 2001 at 08:46:21AM +0100 or thereabouts, Sebastian Werner wrote: > > I have a good dream last night. Some days ago I find the tool from > > Microsoft to optimize the boot time of their new system (winxp). The > > idea is to run some services to system-init parallel. Or in other words: > > Why we must wait for samba to start xdm. Couldn't we use the > > multitaskting experience of linux in our init-scripts. So we can start > > Linux in near the half time I think. Good or bad idea? > > Not sure if it is possible but maybe a manual way to set the order in which the init scripts start. > > However, a few of the init scripts might have whacky depends making things wait uncessarily. > > Who knows but a way to manually change the boot order would be great but as I said above I am not sure if it is possible or not. > > Cheers, > > -- > Joshua Pierre > Developer & Release Technician > Themes.Org -- Open Source Interface Enhancement > _______________________________________________ > gentoo-dev mailing list > gentoo-dev@gentoo.org > http://lists.gentoo.org/mailman/listinfo/gentoo-dev