On Sun, Dec 26, 2021 at 3:03 PM beroal <m...@beroal.in.ua> wrote:

> Hi. I have an autologin program which authenticates a user without asking
> for a password and starts a child process executing a user shell (for
> example, Bash, Xorg, or a Wayland compositor).
>
> This program is a systemd service. I discovered that systemd kills the
> autologin program, but does not kill the child of the autologin program. As
> I understand from the systemd documentation, systemd should kill both.
>

Systemd doesn't kill *child* processes when stopping a service – it only
kills processes found in the service's cgroup. As pam_systemd has
intentionally moved your processes to a separate per-session .slice cgroup,
they're no longer tied to the original .service's lifetime.

(I'm not very familiar with Wayland's requirements, but does your autologin
program do anything specific that the built-in [Service] PAMName= wouldn't
do anyway?)

-- 
Mantas Mikulėnas

Reply via email to