summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/loader.go
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/boot/loader.go')
-rw-r--r--runsc/boot/loader.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go
index 7cac346c9..a9c549790 100644
--- a/runsc/boot/loader.go
+++ b/runsc/boot/loader.go
@@ -324,10 +324,14 @@ func New(args Args) (*Loader, error) {
// Handle signals by forwarding them to the root container process
// (except for panic signal, which should cause a panic).
l.startSignalForwarding = sighandling.PrepareHandler(func(sig linux.Signal) {
- // Panic signal should cause a panic.
+ // Tracing signals should cause their respective actions.
if args.Conf.PanicSignal != -1 && sig == linux.Signal(args.Conf.PanicSignal) {
panic("Signal-induced panic")
}
+ if args.Conf.TraceSignal != -1 && sig == linux.Signal(args.Conf.TraceSignal) {
+ log.TracebackAll("Signal-induced traceback")
+ return
+ }
// Otherwise forward to root container.
deliveryMode := DeliverToProcess