Re: [dev] Announcing sinit - the suckless init

From: sin <>
Date: Fri, 7 Feb 2014 21:00:34 +0000

On Fri, Feb 07, 2014 at 09:56:17PM +0100, Eckehard Berns wrote:
> On Fri, Feb 07, 2014 at 04:24:03PM +0000, sin wrote:
> > Well, I completely removed the FIFO code :)
> That simplifies things :)
> I tested v0.3 and besides some glitches due to my system everything
> worked fine. I'm using fgetty (yeah, freeing a couple more kb might
> not be worth using it, but I tried it some time ago and kept it) and
> it complains about file descriptor 3 when I try to log in. Aparently
> (haven't checked the fgetty code) it uses file descriptor 3 for internal
> communication of some sort and that would be sinit's sigfd. I added
> a line to spawn() to close sigfd in the first child (if sigfd >= 0)
> and I could log in again.

Aha, I see. I will try testing with fgetty as well.

> Speaking of children, I think you could drop the double fork in spawn
> now, since pid 1 already waits for children.

Makes sense.

> And since sinit uses Linux specific code anyway you might consider
> calling reboot(0) to tell the kernel to send SIGINT to pid 1 on
> ctrl-alt-del.

I implemented ctrlaltdel(8) in ubase and I call it in my init scripts
to set the ctrl-alt-del behaviour.
Received on Fri Feb 07 2014 - 22:00:34 CET

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