Re: [dev] Announcing sinit - the suckless init

From: sin <>
Date: Fri, 7 Feb 2014 13:02:07 +0000

On Fri, Feb 07, 2014 at 01:42:36PM +0100, Eckehard Berns wrote:
> On Fri, Feb 07, 2014 at 12:03:03PM +0000, sin wrote:
> > I've fixed the issues you mentioned except the case when rootfs is mounted
> > as ro.
> >
> > How would you tackle that?
> I thought about this a bit. If the fifo is present when booting the
> ro root fs everything should be fine. You wouldn't be able to unlink
> fifopath or create it, but since it's already there the call to open()
> should succeed. You'd have to ignore errors for unlink() and mkfifo()
> and only check open() for errors. I can't test this at the moment, but I
> think this might work.


I refactored the code and this is what I have now:

From the commit message:

"We no longer have two processes, one for reaping children and
another for handling the FIFO.

Use signalfd() to multiplex signal handling and reading from the

This setup will also allow us to capture ctrl-alt-del and to work
with a read-only rootfs.

To create the FIFO, we send a SIGHUP signal to init from our init

Yes, I realize signalfd() is Linux specific... aw well.

Received on Fri Feb 07 2014 - 14:02:07 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 07 2014 - 14:12:07 CET