This is an interesting Linux init example with proof of concept code written in Ruby.
In this blog post I will go step by step showing what an init system must do to be functional. I will ignore all the legacy SysVinit stuff, and technical nuances, and just concentrate on what’s really important.
First of all, what is ‘
init‘? In it’s essence it’s a process that must be running at all times, if this process ends, the kernel enters into a panic mode, after which you cannot do anything else, except rebooting.
This process doesn’t need to do anything special, you can use
/bin/sh as your init, or even
/bin/yes (although the latter wouldn’t be very useful).
So let’s write our very first init.
View original post 2,297 more words