On 01/18/15 23:48, stephen Turner wrote:
> Ok, this is just a sanity check for me and not a feature request and you
> guys are the best I know.
> 
> Init obviously needs little to nothing in the way of code then calls rc.
I suggest you read through sysvinit - it's quite small and pretty much
the minimal PID 1.

It needs to (1) not die, (2) handle signals (mostly SIGCHLD because it
is the father of all other processes and (3) start the bootprocess of
userspace. (Usually this is defined as runlevels, but most distros only
actively use one runlevel and the rest is historical leftovers)


(1) is very important because the linux kernel gets very suicidal if
PID1 terminates. This is a conscious design decision, and one of the big
criticisms against systemd - PID1 must not crash.


> In the case of more modern service management it could call runit or
> daemon tools right? 
Yes, there are many ways to get booted. And you could even combine some
of them (e.g. monit + OpenRC, or runit + sysv-rc, or ... )

> Which then can start and restart tty and services?
tty is usually handled by init too, /etc/inittab defines what (a)getty
processes should be started. Services are usually started by a service
manager, which is started by sysvinit as part of the whole runlevel idea.

> Im not missing a process or step? Inittab can be replaced by daemontools
> or alike without complaints on proper unix usage?
Can, yes, but the advantage of sysvinit is that it'll respawn the ttys
properly.

inittab could be used for starting runit/monit/OpenRC/... as you require


Have fun,

Patrick
_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to