On Mon, 2008-01-07 at 10:44 +0100, Enrico Scholz wrote:
Casey Dahlin <cjdahlin(a)ncsu.edu> writes:
>>> A shell which emulates POSIX process handling in-process and uses
>>> direct builtin function calls for commands like sed [...] Pipes and
>>> the like would also have to be emulated
>>
>> For what do you need 'sed' or pipes to start/stop a daemon?
>>
> It appears at least 13 times in our current init system.
I think, nobody doubts that current initsystem is the worst one of
the major linux distributions.
Can the hyperbole please -- we know what we have otherwise we wouldn't
be having this discussion.
By changing paradigm from forking to
non-forking daemon you can avoid all the complicated 'stop' code;
e.g. 'start' will be
| pid = fork();
| if (pid==0) { /* ... */ execve(...); }
and 'stop' be
| kill(pid, SIGTERM); /* wait for timeout/sigchld */ kill(pid, SIGKILL);
That'd be all fine and dandy for daemons that simply need to be started
without any variable options or preparations and are obliging enough to
write pid files. I don't think that e.g. the postgresql or xendomains
start scripts would fit well into that scheme.
But python or other bloaty scripting languages are not a solution
and
completely unacceptable at this place.
"Bloaty" is something that could be solved, don't you think? If python
was split up in a base package that contained the directory structure,
the binaries, the (small) documentation and only basic modules (with no
additional requirements) and a package containing the rest of the
modules, much of the (dep-)bloat wouldn't be an issue if init scripts
(ehh modules) would be limited to that basic set. With the set of
modules I would choose, such a python-base package would have less
dependencies than bash and only account for roughly 2.6MB on the disk as
well -- bash takes up about 5.1MB.
Nils
--
Nils Philippsen / Red Hat / nphilipp(a)redhat.com
"Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety." -- B. Franklin, 1759
PGP fingerprint: C4A8 9474 5C4C ADE3 2B8F 656D 47D8 9B65 6951 3011