:: Re: [DNG] Custom OS initiator. In n…
Forside
Slet denne besked
Besvar denne besked
Skribent: Didier Kryn
Dato:  
Til: dng
Emne: Re: [DNG] Custom OS initiator. In need of some hints...
Le 13/06/2016 22:49, Irrwahn a écrit :
> On Mon, 13 Jun 2016 15:47:49 -0400, Steve Litt wrote:
> [...]
>> Then I'd write a shellscript workalike for Suckless Init. In my
>> opinion, once you've done that, you should publicize it like the Autumn
>> leaves, because you've done a service to all of Linuxdom, and you've
>> especially done a service to Devuan, whose root story is that init
>> should be simple.
> [...]
>
> I'm probably missing something important here, so I have
> to ask: What would be the point in replacing an easily
> comprehensible, self-contained and statically linked piece
> of code[1] by some script, howsoever simple, that relies
> on an (in comparison) gigantic and potentially buggy blob
> like a shell[2]?
>
> To me that's not exactly KISS. Does your mileage vary that
> much, or am I simply missing the point?
>
> [1] E.g. Felker's init, or one of it's variations.
>
> [2] Dynamically linked bash would be the worst case scenario
>      here, I believe. Mksh linked statically with musl-libc
>      would be a much safer bet, but IMHO still far from ideal.

>
> Regards
> Urban
>
>


     Sure. But a shell-script init is a nice toy to explore the early 
OS, specially if it can run an interactive shell. It would become a big 
tangle if the intent was to wait() the zombies or "supervise" more than 
one other process :-)


     As long as this script does not make overly complex things (for a 
script) like supervision and trapping signals, it remains pretty small. 
When comparing to the executable produced by a compiled program, I'm not 
sure the small difference matters. You don't have to count the size of 
the interpreter and the dynamic library, since they are part of the 
system anyway. If your system is so tiny that it only runs Busybox, then 
you still have an interpreter.


     Didier