Re: [dev] Announcing sinit - the suckless init

From: sin <sin_AT_2f30.org>
Date: Thu, 6 Feb 2014 21:54:44 +0000

On Thu, Feb 06, 2014 at 09:36:23PM +0100, Eckehard Berns wrote:
> On Thu, Feb 06, 2014 at 12:32:59PM +0000, sin wrote:
> > As part of experimenting with a toy distro I wanted to get rid of
> > busybox's init, so I hacked together sinit[1]. sinit is based on Strake's
> > init[2].
> > [...]
> > Let me know what you guys think, I am looking forward to use this with sta.li.
>
> I now had time to test sinit. I first had trouble getting the FIFO
> to work. When booting with the root fs mounted read-only, the child
> dealing with the FIFO would segfault. When booting with my root fs
> mounted read-write my rcinitcmd would become a zombe since the FIFO code
> never reaps children.

Thanks for testing!

I think the segfault could have been caused because there was no error
checking for open(2). I added that in later.

Hm yes, you are right, the FIFO code never reaps children. We could
probably use the double fork trick + killing the parent to force it to
be reaped by the original process (the parent of the FIFO code).

> So I changed spawn() to wait for its child. Now I can mount my root fs
> read-write in my rcinitcmd or even setup a tmpfs, and my rcinitcmd will
> have its exit status checked and not become a zombie. This means though
> that you can't use the FIFO until the rcinitcmd exited (which means
> you might want to chane your rc.svc to background the agetty loop).

Yeah something did not feel right with having the rc script block.
I presume if we use the aforementioned double fork trick, we'll be able
to continue even if rc.svc doesn't exit (I may be hallucinating right
now, I will check tomorrow if what I am saying makes sense).

> Also, would it be worth it to deal with x86 Linux's ctrl-alt-del? It would
> pull in OS specific code, and maybe people don't care for ctrl-alt-del
> on the console, since everybody lives in X anyway.

Hm, not sure. What you guys think?
Received on Thu Feb 06 2014 - 22:54:44 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 06 2014 - 23:00:11 CET