diff --git a/signal/signal.go b/signal/signal.go index 106fe20..68bb77c 100644 --- a/signal/signal.go +++ b/signal/signal.go @@ -42,3 +42,13 @@ func ParseSignal(rawSignal string) (syscall.Signal, error) { } return signal, nil } + +// ValidSignalForPlatform returns true if a signal is valid on the platform +func ValidSignalForPlatform(sig syscall.Signal) bool { + for _, v := range SignalMap { + if v == sig { + return true + } + } + return false +}