log when mox root process cannot forward signals to unprivileged child

and give the mox.service permissions to send such signals.
This commit is contained in:
Mechiel Lukkien
2024-11-21 21:59:36 +01:00
parent 3d4cd00430
commit 32d4e9a14c
2 changed files with 6 additions and 3 deletions

View File

@ -59,8 +59,11 @@ func ForkExecUnprivileged() {
sigc := make(chan os.Signal, 1)
signal.Notify(sigc, os.Interrupt, syscall.SIGTERM)
go func() {
sig := <-sigc
p.Signal(sig)
for {
sig := <-sigc
err := p.Signal(sig)
pkglog.Check(err, "forwarding signal root to unprivileged process")
}
}()
st, err := p.Wait()