Re: [PATCH] Implement stage 4 (execve handoff)

From: Jan Pobrislo <>
Date: Sat, 2 Aug 2014 16:20:03 +0200

On Fri, 1 Aug 2014 10:20:10 +0000
Gerrit Pape <> wrote:

> On Tue, Jul 29, 2014 at 12:01:36PM -0700, Ryan Finnie wrote:
> > This patch adds stage 4, an optional stage which is run after stage
> > 3. If /etc/runit/4 is found and executable, runit will execve()
> > into it, giving it control of PID 1. Finnix
> > ( uses runit as its init system, and uses
> > this patch as a way to pivot root back into a ramdisk upon
> > shutdown, so it may cleanly umount the union mount which houses
> > runit.
> Hi Ryan, I'm not sure how interesting this is for general use. It's
> the first time I hear about the need for a stage 4.

This is handy for more than just union mounts, for example if you want
to issue hard-drive shutdowns like sysvinit's halt does or any other
necessary teardown that requires that there's no remaining process
acessing the storage. Quite possibly you could even migrate to
different root with this and all other kinds of interesting
init-switching setups. This is a definite do-want for me.
> And actually I wouldn't call it so, because runit no longer runs but
> got replaced.

Indeed, it's a kind of misnomer, but coincidentaly that's exactly what
I called it in my head when I considered writing such feature.
Received on Sat Aug 02 2014 - 14:20:03 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:18 UTC