[systemd-devel] [PATCH] virt: fix container detection when we're not PID 1

2014-12-10 Thread Jan Synacek
systemd-detect-virt would print none when using nspawn to run a shell inside a container and then running systemd-detect-virt in it, because the shell would be PID 1, not the actuall systemd-detect-virt process. --- src/shared/virt.c | 19 ++- 1 file changed, 6 insertions(+), 13

Re: [systemd-devel] [PATCH] virt: fix container detection when we're not PID 1

2014-12-10 Thread Lennart Poettering
On Wed, 10.12.14 09:21, Jan Synacek (jsyna...@redhat.com) wrote: systemd-detect-virt would print none when using nspawn to run a shell inside a container and then running systemd-detect-virt in it, because the shell would be PID 1, not the actuall systemd-detect-virt process. So, previously

Re: [systemd-devel] [PATCH] virt: fix container detection when we're not PID 1

2014-12-10 Thread Jan Synacek
Lennart Poettering lenn...@poettering.net writes: On Wed, 10.12.14 09:21, Jan Synacek (jsyna...@redhat.com) wrote: systemd-detect-virt would print none when using nspawn to run a shell inside a container and then running systemd-detect-virt in it, because the shell would be PID 1, not the

Re: [systemd-devel] [PATCH] virt: fix container detection when we're not PID 1

2014-12-10 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Dec 10, 2014 at 01:52:08PM +0100, Jan Synacek wrote: Lennart Poettering lenn...@poettering.net writes: On Wed, 10.12.14 09:21, Jan Synacek (jsyna...@redhat.com) wrote: systemd-detect-virt would print none when using nspawn to run a shell inside a container and then running

Re: [systemd-devel] [PATCH] virt: fix container detection when we're not PID 1

2014-12-10 Thread Lennart Poettering
On Wed, 10.12.14 13:52, Jan Synacek (jsyna...@redhat.com) wrote: Lennart Poettering lenn...@poettering.net writes: On Wed, 10.12.14 09:21, Jan Synacek (jsyna...@redhat.com) wrote: systemd-detect-virt would print none when using nspawn to run a shell inside a container and then running