From 1afa1b8662349d4c1ec1f8159aa5f022596a651f Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Fri, 7 Mar 2025 13:10:54 -0800 Subject: [PATCH] signals: replace unix.Kill with process.Signal This way, given a recent Go and Linux version, pidfd_send_signal will be used under the hood. Keep unix.Signal and unix.SignalName for logging (it is way more readable than what os.Signal.String() provides). Signed-off-by: Kir Kolyshkin --- signals.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/signals.go b/signals.go index a992dc4ab..936d751f6 100644 --- a/signals.go +++ b/signals.go @@ -114,7 +114,7 @@ func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach default: us := s.(unix.Signal) logrus.Debugf("forwarding signal %d (%s) to %d", int(us), unix.SignalName(us), pid1) - if err := unix.Kill(pid1, us); err != nil { + if err := process.Signal(s); err != nil { logrus.Error(err) } }