2 ms·
All init should do, arguably, is start the RC, start up the system, shut down the system, and reap zombies. Shutdown should be handled by the RC, and then passe
by qwertyuiop924 10y ago
All init should do, arguably, is start the RC, start up the system, shut down the system, and reap zombies. Shutdown should be handled by the RC, and then passed back through to init, which does the kill and actually properly shuts down the system. As such, it should be exposed via a pipe, or other mechanism to only that trusted program. That handoff would happen during boot. Reaping zombies and startup only receive input from the kernel, or indirectly from the user in the form of processes.
If you want your init to integrate RC or process management (many do), sure, write it in a more complex language (but depend on external libraries minimally, and make sure it's statically linked!), but for the idea, minimal init, C is perfectly fine.