Skip to content

Commit 1afa1b8

Browse files
committed
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 <[email protected]>
1 parent 346c80d commit 1afa1b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

signals.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach
114114
default:
115115
us := s.(unix.Signal)
116116
logrus.Debugf("forwarding signal %d (%s) to %d", int(us), unix.SignalName(us), pid1)
117-
if err := unix.Kill(pid1, us); err != nil {
117+
if err := process.Signal(s); err != nil {
118118
logrus.Error(err)
119119
}
120120
}

0 commit comments

Comments
 (0)