Hello, In order to restart updated daemons on filesystems, I created a script[1] which lists all PID by service and look for updated files in /proc/$pid/maps.
To get all PIDs of a service, I use "systemctl show -p ControlGroup" to craft a path to the "tasks" file. But something wrong happen with escaping with some units (e.g serial -getty) This works: #cat /sys/fs/cgroup/systemd/$(systemctl show systemd-logind.service -p ControlGroup|cut -f2 -d=)/tasks 286 This not: #cat /sys/fs/cgroup/systemd/$(systemctl show serial-getty@ttyS0.service -p ControlGroup|cut -f2 -d=)/tasks /sys/fs/cgroup/systemd/$(systemctl show -p ControlGroup|cut -f2 -d=) cat: /sys/fs/cgroup/systemd//system.slice/system-serial\ x5cx2dgetty.slice/serial-getty@ttyS0.service/tasks: No such file or directory What's the right way to get all pid belonging to a service? How can I unescape strings from systemctl? This is happening since a long time. I made these tests on systemd v220 et v219. Cheers, [1] https://github.com/seblu/archutils/blob/master/checkservices -- Sébastien "Seblu" Luttringer https://seblu.net | Twitter: @seblu42 GPG: 0x2072D77A
signature.asc
Description: This is a digitally signed message part
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel