service: drop a service's group when the configuration drops it

Changing a service from @alice:wheel to @alice and reloading kept the
service running as group wheel, also after a restart.

The group is only set when the configuration has one, and on reload
the service is updated in place, so the old one stayed.

Clear it before parsing, like a new service gets it.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
(cherry picked from commit bf42811a13)
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-17 08:03:50 +01:00
1 parent 5049c32c35
commit 8a5102e714
3 files changed
+33 -6

No files matched your search

+3
View File
@@ -39,6 +39,9 @@ All relevant changes are documented in this file.
characters. Groups dropped from a service's configuration are now
also dropped the next time it starts, before they lingered until
reboot
- Fix a service's group lingering after it was dropped from the
configuration, e.g. `@alice:wheel` changed to `@alice` kept running
as `wheel` until reboot
- Remove stale daemon-owned (`pid:!`) pidfiles after unclean exits.
When a daemon dies via SIGKILL/OOM/segfault, or exits early during
startup, its pidfile lingers and can prevent the next instance from