summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--runsc/boot/controller.go12
-rw-r--r--runsc/boot/loader.go1
2 files changed, 13 insertions, 0 deletions
diff --git a/runsc/boot/controller.go b/runsc/boot/controller.go
index 6dd7fadd9..96a848197 100644
--- a/runsc/boot/controller.go
+++ b/runsc/boot/controller.go
@@ -445,6 +445,18 @@ const (
DeliverToForegroundProcessGroup
)
+func (s SignalDeliveryMode) String() string {
+ switch s {
+ case DeliverToProcess:
+ return "Process"
+ case DeliverToAllProcesses:
+ return "All"
+ case DeliverToForegroundProcessGroup:
+ return "Foreground Process Group"
+ }
+ return fmt.Sprintf("unknown signal delivery mode: %d", s)
+}
+
// SignalArgs are arguments to the Signal method.
type SignalArgs struct {
// CID is the container ID.
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go
index 380fa3fbf..10fec5b59 100644
--- a/runsc/boot/loader.go
+++ b/runsc/boot/loader.go
@@ -336,6 +336,7 @@ func New(args Args) (*Loader, error) {
// properly.
deliveryMode = DeliverToForegroundProcessGroup
}
+ log.Infof("Received external signal %d, mode: %v", sig, deliveryMode)
if err := l.signal(args.ID, 0, int32(sig), deliveryMode); err != nil {
log.Warningf("error sending signal %v to container %q: %v", sig, args.ID, err)
}