6 ms·
If you improve the perf/functionalities of init using Go, I will give this language a go right after. It seems promising tho.
by sotaan 11y ago
If you improve the perf/functionalities of init using Go, I will give this language a go right after. It seems promising tho.
- sotaan 11y agoIs that possible to recode init in any other language using your technique? For instance can I try it in Ruby?
- tronje 11y agoSince 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.
- justinsaccount 11y agoThis is simply not true. It's not impossible and it works exactly like any program would.
- mveety 11y agoNo 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.
- deleted 11y ago[deleted]
- masklinn 11y ago> 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 https://wiki.gentoo.org/wiki/Custom_Initramfs#Init
- xena 11y agoAll you need is fork(), exec(), and signal handling. You could even write one in PHP.