Re: systemd KillUserProcesses=yes and btrfs scrub
From: Chris Murphy <hidden>
Date: 2016-08-01 17:54:20
On Mon, Aug 1, 2016 at 11:19 AM, Austin S. Hemmelgarn [off-list ref] wrote:
On 2016-08-01 13:15, Chris Murphy wrote:
quoted
I've been using balance with &, and when I logout, the btrfs command continues to flip between status D and R, just like before logout and it appears to complete. I still get status messages of the balance after logout, in kernel messages.Interesting, maybe balance is explicitly white-listed? Either that, or it just ignores whatever signal systemd uses to kill stuff in this context (I initially thought SIGTERM, but SIGHUP would make more sense in this context), which wouldn't surprise me either.
I'm not aware of any program specific white listing method with KillUserProcesses=yes. However, there is KillExcludeUsers which by default is KillExcludeUsers=root. Everything I run as sudo appears in top and ps as use root. So are these processes exempt? And if so, why is btrfs scrub becoming a zombie process? I don't know if it's appropriate, but I asked about it (no response yet), whether all things sudo should just be moved out of the user session. In my own head I don't associate sudo commands with my user or my user session, and at least top and ps agree with the former, so why not have sudo'd processes put in a different scope from the outset? -- Chris Murphy