Designing a new init: low level communication

Giacomo A. Catenazzi cate at debian.org
Mon Aug 29 13:13:03 UTC 2005


Erich Schubert wrote:

> 1. fifos.
> The traditional approach is the /dev/initctl FIFO used by sysvinit.
> This is a one-way link, and apps can lock() it to prevent interference
> of write calls.
> Minit does use two fifos, one for input, one for output. The semantics
> is that you acquire a write lock on the "in" fifo (to init), then open
> the "out" fifo for reading if you need/expect a reply. Example queries
> are "give me the PID of service foo".
> 
> I don't know about runit or initng. Can someone please elaborate?
> Afaict it has a plugin using sockets in /dev/initng (doesn't this
> require a writeable filesystem?) and a plugin for initctl support.
> 
> Drawbacks:
> - fifos need to be created before boot, so we don't need a writeable filesystem.
> - only one client at a time

I think I read something like that:
server: open a read pipe A
client: create a bidirectional pipe B
client: sent info of this pipe B to server (with the pipe A)
server <-> client (via pipe B).

I don't remember the details (on Stevens?) but IIRC there
was a trick with unamed pipe, so it can be used concurrently
on boot (pre write fs) time.

ciao
	cate



More information about the initscripts-ng-devel mailing list