Hacker News new | ask | show | jobs
by sotaan 3780 days ago
If you improve the perf/functionalities of init using Go, I will give this language a go right after. It seems promising tho.
1 comments

Is that possible to recode init in any other language using your technique? For instance can I try it in Ruby?
Since init is the first process that runs, you can't use an interpreted language like ruby (since the interpreter would have to run first, which is impossible if your program itself is init). Maybe there's a Ruby-compiler out there somewhere, but as-is Ruby would be impossible.
> Since init is the first process that runs, you can't use an interpreted language like ruby

Sure you can, you can even use a shell script: https://wiki.gentoo.org/wiki/Custom_Initramfs#Init

This is simply not true. It's not impossible and it works exactly like any program would.
No it wouldn't. Either hack a quick shim to start the interpreter or rely on the operating system to figure out how to run a script. The #! is there for a reason.
All you need is fork(), exec(), and signal handling. You could even write one in PHP.