[systemd-devel] [PATCH] Allow PID 1 systemd --user instances to exit

Vito Caputo vito.caputo at coreos.com
Thu Nov 6 16:26:12 PST 2014


Imagine running systemd --user post-CLONE_NEWPID to manage services in the
new namespace.

Cheers,
Vito Caputo

On Thu, Nov 6, 2014 at 2:56 PM, Lennart Poettering <lennart at poettering.net>
wrote:

> On Thu, 06.11.14 14:44, Vito Caputo (vito.caputo at coreos.com) wrote:
>
> Hmm? What is this about? Why would you want to run systemd --user as
> PID 1?
>
> > diff --git a/src/core/main.c b/src/core/main.c
> > index d48604e..cd9d6ee 100644
> > --- a/src/core/main.c
> > +++ b/src/core/main.c
> > @@ -2013,7 +2013,7 @@ finish:
> >                            getpid() == 1 ? "freezing" : "quitting");
> >          }
> >
> > -        if (getpid() == 1)
> > +        if (arg_running_as != SYSTEMD_USER && getpid() == 1)
> >                  freeze();
> >
> >          return retval;
> > --
> > 2.1.1
>
> > _______________________________________________
> > systemd-devel mailing list
> > systemd-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
>
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141106/eef461a7/attachment.html>


More information about the systemd-devel mailing list