:: Re: [DNG] Custom OS initiator. In n…
Pàgina inicial
Delete this message
Reply to this message
Autor: KatolaZ
Data:  
A: dng
Assumpte: Re: [DNG] Custom OS initiator. In need of some hints...
On Tue, Jun 14, 2016 at 12:13:12PM +0200, Irrwahn wrote:

[cut]

>
> Well, I was thinking about being able to shutdown or
> reboot the machine by sending signals to PID1. I am
> however aware it's debatable if that can still be
> considered a sane concept in the 21st century.
>
> And TBH, starting a shell from init via a call to
> system() is an ugly hack to say the least. Probably
> okay for a proof-of-concept throw-away kludge, but
> nothing more.


And that was exactly my point. Playing with a shell script (or a C
code, for that matter), and making something that calls rc might be
somehow istructive and fun, but it should be clear that this is not
"creating a simple OS initialiser" which can be used outside of a
sandbox.

Before coding an init system, I would probably start with coding a
shell, with basic command execution, environment management,
background processes, a few builtins, I/O redirection, pipes, and
proper signal management. That is a really instructive and fun
exercise, IMHO, but I admit that the definition of "instructive" and
"fun" is quite subjective :)

My2Cents

KatolaZ

-- 
[ ~.,_  Enzo Nicosia aka KatolaZ - GLUGCT -- Freaknet Medialab  ]  
[     "+.  katolaz [at] freaknet.org --- katolaz [at] yahoo.it  ]
[       @)   http://kalos.mine.nu ---  Devuan GNU + Linux User  ]
[     @@)  http://maths.qmul.ac.uk/~vnicosia --  GPG: 0B5F062F  ] 
[ (@@@)  Twitter: @KatolaZ - skype: katolaz -- github: KatolaZ  ]