mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
nit: do not use syscall package
In many places (not all of them though) we can use `unix.` instead of `syscall.` as these are indentical. In particular, x/sys/unix defines: ```go type Signal = syscall.Signal type Errno = syscall.Errno type SysProcAttr = syscall.SysProcAttr const ENODEV = syscall.Errno(0x13) ``` and unix.Exec() calls syscall.Exec(). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
+1
-2
@@ -5,7 +5,6 @@ package main
|
||||
import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall" // only for Signal
|
||||
|
||||
"github.com/opencontainers/runc/libcontainer"
|
||||
"github.com/opencontainers/runc/libcontainer/system"
|
||||
@@ -103,7 +102,7 @@ func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach
|
||||
}
|
||||
default:
|
||||
logrus.Debugf("sending signal to process %s", s)
|
||||
if err := unix.Kill(pid1, s.(syscall.Signal)); err != nil {
|
||||
if err := unix.Kill(pid1, s.(unix.Signal)); err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user