mirror of
https://github.com/opencontainers/runc.git
synced 2025-09-26 19:41:35 +08:00
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 <kolyshkin@gmail.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user