mirror of
https://github.com/mjl-/mox.git
synced 2025-07-13 17:34:37 +03:00
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:
@ -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()
|
||||
|
Reference in New Issue
Block a user