:: Re: [DNG] Mini init script written …
Kezdőlap
Delete this message
Reply to this message
Szerző: Lars Noodén
Dátum:  
Címzett: dng
Tárgy: Re: [DNG] Mini init script written in Perl boots.
On 06/16/2016 11:01 PM, Edward Bartolo wrote:
[snip]
> if (fork()) {
> # We are in the parent which must reap zombies.
>   while(1) {
>       $status = wait();
>     }    
> } else {
> # We are in the child which must load the operating system by executing a script

>
> exec("/sbin/osloader.sh");
> }


Thanks very much for this demo. I see that on devuan jessie what I have
is ps showing 22 processes with a PPID of 1. So, when you say that this
perl script is minimal, do you mean that it would contain other fork
actions if it is to more closely emulate package sysvinit-core's
/sbin/init ? And that that those forks (new processes), through a chain
of scripts or programs that use exec, end up as various daemons and such?

Regards,
Lars