mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 17:22:33 +00:00
Merge pull request #5991 from dcantah/darwin-sigs
runtime: Define Darwin handled signals list
This commit is contained in:
commit
2c10b37172
@ -23,21 +23,6 @@ var signalLog = logrus.WithField("default-signal-logger", true)
|
|||||||
// or a fatal signal is received.
|
// or a fatal signal is received.
|
||||||
var CrashOnError = false
|
var CrashOnError = false
|
||||||
|
|
||||||
// List of handled signals.
|
|
||||||
//
|
|
||||||
// The value is true if receiving the signal should be fatal.
|
|
||||||
var handledSignalsMap = map[syscall.Signal]bool{
|
|
||||||
syscall.SIGABRT: true,
|
|
||||||
syscall.SIGBUS: true,
|
|
||||||
syscall.SIGILL: true,
|
|
||||||
syscall.SIGQUIT: true,
|
|
||||||
syscall.SIGSEGV: true,
|
|
||||||
syscall.SIGSTKFLT: true,
|
|
||||||
syscall.SIGSYS: true,
|
|
||||||
syscall.SIGTRAP: true,
|
|
||||||
syscall.SIGUSR1: false,
|
|
||||||
}
|
|
||||||
|
|
||||||
// DieCb is the callback function type that needs to be defined for every call
|
// DieCb is the callback function type that needs to be defined for every call
|
||||||
// into the Die() function. This callback will be run as the first function of
|
// into the Die() function. This callback will be run as the first function of
|
||||||
// the Die() implementation.
|
// the Die() implementation.
|
||||||
|
22
src/runtime/pkg/signals/signals_darwin.go
Normal file
22
src/runtime/pkg/signals/signals_darwin.go
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// Copyright (c) 2023 Apple Inc.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
//
|
||||||
|
|
||||||
|
package signals
|
||||||
|
|
||||||
|
import "syscall"
|
||||||
|
|
||||||
|
// List of handled signals.
|
||||||
|
//
|
||||||
|
// The value is true if receiving the signal should be fatal.
|
||||||
|
var handledSignalsMap = map[syscall.Signal]bool{
|
||||||
|
syscall.SIGABRT: true,
|
||||||
|
syscall.SIGBUS: true,
|
||||||
|
syscall.SIGILL: true,
|
||||||
|
syscall.SIGQUIT: true,
|
||||||
|
syscall.SIGSEGV: true,
|
||||||
|
syscall.SIGSYS: true,
|
||||||
|
syscall.SIGTRAP: true,
|
||||||
|
syscall.SIGUSR1: false,
|
||||||
|
}
|
23
src/runtime/pkg/signals/signals_linux.go
Normal file
23
src/runtime/pkg/signals/signals_linux.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// Copyright 2018 Intel Corporation.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
//
|
||||||
|
|
||||||
|
package signals
|
||||||
|
|
||||||
|
import "syscall"
|
||||||
|
|
||||||
|
// List of handled signals.
|
||||||
|
//
|
||||||
|
// The value is true if receiving the signal should be fatal.
|
||||||
|
var handledSignalsMap = map[syscall.Signal]bool{
|
||||||
|
syscall.SIGABRT: true,
|
||||||
|
syscall.SIGBUS: true,
|
||||||
|
syscall.SIGILL: true,
|
||||||
|
syscall.SIGQUIT: true,
|
||||||
|
syscall.SIGSEGV: true,
|
||||||
|
syscall.SIGSTKFLT: true,
|
||||||
|
syscall.SIGSYS: true,
|
||||||
|
syscall.SIGTRAP: true,
|
||||||
|
syscall.SIGUSR1: false,
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user