Re: [PATCH] s6-supervise: Optionally run child in a new pid namespace

2017-07-16 Thread Jesse Young
On Sun, 16 Jul 2017 08:41:03 + "Laurent Bercot" wrote: > As I told Jesse on IRC, the patch isn't going in. I'm not including > OS-specific code into s6, even with a compile-time option. The main > reason for it is that it changes the API: the choice to spawn the > service in a new namespace

Re: [PATCH] s6-supervise: Optionally run child in a new pid namespace

2017-07-16 Thread Laurent Bercot
As I told Jesse on IRC, the patch isn't going in. I'm not including OS-specific code into s6, even with a compile-time option. The main reason for it is that it changes the API: the choice to spawn the service in a new namespace or not should be made at run time, so it would introduce a new file

Re: [PATCH] s6-supervise: Optionally run child in a new pid namespace

2017-07-15 Thread Olivier Brunel
On Sat, 15 Jul 2017 20:24:25 + "John O'Meara" wrote: > You can achieve a PID namespace (and others) using the unshare > program from util-linux without patching s6. Put the following at the > top of your run script: > > unshare -fp --mount-proc > > this also has the advantage of clearly s

Re: [PATCH] s6-supervise: Optionally run child in a new pid namespace

2017-07-15 Thread John O'Meara
You can achieve a PID namespace (and others) using the unshare program from util-linux without patching s6. Put the following at the top of your run script: unshare -fp --mount-proc this also has the advantage of clearly showing which services are in their own namespaces when looking at a ps li

[PATCH] s6-supervise: Optionally run child in a new pid namespace

2017-07-15 Thread Jesse Young
This patch modifies s6-supervise to use the Linux specific clone() system call to enable the child process to become the pid 1 of a new pid namespace. To enable it, compile with -DWANT_CLONE_NEWPID and make the ./clone-newpid file readable to s6-supervise in the desired service directories. I ask