From 44a3187830aa634a8a7bf7f2985d17a4d7927c97 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 19 Dec 2017 14:41:23 -0500 Subject: Finish implementing stop signal parsing Stop Signal from kpod create/run was not fully plumbed in, This will pass the stopsignal into the container database on create and run of containers. Signed-off-by: Daniel J Walsh Closes: #156 Approved by: mheon --- libpod/options.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libpod') diff --git a/libpod/options.go b/libpod/options.go index 8720c3639..a0894c0e3 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -3,6 +3,7 @@ package libpod import ( "fmt" "path/filepath" + "syscall" "github.com/containers/storage" "github.com/containers/storage/pkg/idtools" @@ -396,7 +397,7 @@ func WithName(name string) CtrCreateOption { } // WithStopSignal sets the signal that will be sent to stop the container -func WithStopSignal(signal uint) CtrCreateOption { +func WithStopSignal(signal syscall.Signal) CtrCreateOption { return func(ctr *Container) error { if ctr.valid { return ErrCtrFinalized @@ -408,7 +409,7 @@ func WithStopSignal(signal uint) CtrCreateOption { return errors.Wrapf(ErrInvalidArg, "stop signal cannot be greater than 64 (SIGRTMAX)") } - ctr.config.StopSignal = signal + ctr.config.StopSignal = uint(signal) return nil } -- cgit v1.2.3-54-g00ecf