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:
Kir Kolyshkin
2020-04-18 16:05:10 -07:00
parent bf0a8e1747
commit af6b9e7fa9
9 changed files with 17 additions and 26 deletions
+1 -2
View File
@@ -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)
}
}