W dniu 6 lipca 2011 14:28 użytkownik Kay Sievers <kay.siev...@vrfy.org> napisał: > 2011/7/6 Michał Piotrowski <mkkp...@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/ _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel