From: Vitaly Kushneriuk <vitaly@jungo.com>
To: gentoo-dev@gentoo.org
Subject: Re: [gentoo-dev] Start enhancement
Date: 03 Dec 2001 17:12:13 +0200 [thread overview]
Message-ID: <1007392333.13527.12.camel@uranus.u235.eyep.net> (raw)
In-Reply-To: <20011203215456.C13834@swool.com>
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
next prev parent reply other threads:[~2001-12-03 15:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <004001c17bce$99f982f0$6400a8c0@server>
2001-12-03 13:54 ` [gentoo-dev] Start enhancement Joshua Pierre
2001-12-03 15:12 ` Vitaly Kushneriuk [this message]
2001-12-03 16:25 ` jano
2001-12-03 16:33 ` Daniel Robbins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1007392333.13527.12.camel@uranus.u235.eyep.net \
--to=vitaly@jungo.com \
--cc=gentoo-dev@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox