Move from unix to syscall package for SIG* signals

To support cross compilation for SIG* signals perfer the syscall package over
the unix package.

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
This commit is contained in:
Justin Terry (VM)
2019-05-10 11:50:45 -07:00
parent e4ebb718c6
commit c1468cdeec
3 changed files with 6 additions and 6 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
package server
import (
"syscall"
"time"
"github.com/containerd/containerd"
@@ -25,7 +26,6 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
"golang.org/x/sys/unix"
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
@@ -149,7 +149,7 @@ func (c *criService) stopContainer(ctx context.Context, container containerstore
}
logrus.Infof("Kill container %q", id)
if err = task.Kill(ctx, unix.SIGKILL); err != nil && !errdefs.IsNotFound(err) {
if err = task.Kill(ctx, syscall.SIGKILL); err != nil && !errdefs.IsNotFound(err) {
return errors.Wrapf(err, "failed to kill container %q", id)
}