[systemd-devel] F15: wrong cgroup?
Michał Piotrowski
mkkp4x4 at gmail.com
Wed Jul 6 05:41:10 PDT 2011
W dniu 6 lipca 2011 14:28 użytkownik Kay Sievers <kay.sievers at vrfy.org> napisał:
> 2011/7/6 Michał Piotrowski <mkkp4x4 at gmail.com>:
>> I use sudo to start my deamons.
>>
>> $ ps xawf -eo pid,user,cgroup,args
>>
>> show that daemons are in my personal cgroups /sys/fs/cgroup/systemd/user/michal
>>
>> 1483 root name=systemd:/user/michal/4 python daemon_foo1
>
>> If I'm using sudo why daemons are binded to my personal cgroups not root?
>
> Because your daemon inherits all process properties from your login
> shell, including the cgroup of your user. Systemd doesn't do that for
> daemons/services, it starts all services as children in a clean and
> proeprly prepared environment of pid 1.
>
> If you want a proper cgroup, you need to create service files for you
> daemons and tell systemd to start the service on your behalf, instead
> of forking them yourself.
>
> Kay
>
Thanks for the explanation.
--
Best regards,
Michal
http://eventhorizon.pl/
More information about the systemd-devel
mailing list