Skip to content

Commit 3058ed0

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. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 346c80d commit 3058ed0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

signals.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,8 @@ func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach
112112
// and it should not be forwarded to the container.
113113
// Do nothing.
114114
default:
115-
us := s.(unix.Signal)
116-
logrus.Debugf("forwarding signal %d (%s) to %d", int(us), unix.SignalName(us), pid1)
117-
if err := unix.Kill(pid1, us); err != nil {
115+
logrus.Debugf("forwarding signal %s to container (pid: %d)", s, pid1)
116+
if err := process.Signal(s); err != nil {
118117
logrus.Error(err)
119118
}
120119
}

0 commit comments

Comments
 (0)