signals

package
v0.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2023 License: MPL-2.0 Imports: 7 Imported by: 316

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MonitoredSignals []os.Signal
View Source
var SIGNULL os.Signal = syscall.Signal(0)

SIGNULL is the nil/zero signal.

View Source
var SignalLookup = map[string]os.Signal{
	"SIGNULL":  SIGNULL,
	"SIGABRT":  syscall.SIGABRT,
	"SIGALRM":  syscall.SIGALRM,
	"SIGBUS":   syscall.SIGBUS,
	"SIGCONT":  syscall.SIGCONT,
	"SIGFPE":   syscall.SIGFPE,
	"SIGHUP":   syscall.SIGHUP,
	"SIGILL":   syscall.SIGILL,
	"SIGINT":   syscall.SIGINT,
	"SIGIO":    syscall.SIGIO,
	"SIGIOT":   syscall.SIGIOT,
	"SIGKILL":  syscall.SIGKILL,
	"SIGPIPE":  syscall.SIGPIPE,
	"SIGPROF":  syscall.SIGPROF,
	"SIGQUIT":  syscall.SIGQUIT,
	"SIGSEGV":  syscall.SIGSEGV,
	"SIGSTOP":  syscall.SIGSTOP,
	"SIGSYS":   syscall.SIGSYS,
	"SIGTERM":  syscall.SIGTERM,
	"SIGTRAP":  syscall.SIGTRAP,
	"SIGTSTP":  syscall.SIGTSTP,
	"SIGTTIN":  syscall.SIGTTIN,
	"SIGTTOU":  syscall.SIGTTOU,
	"SIGUSR1":  syscall.SIGUSR1,
	"SIGUSR2":  syscall.SIGUSR2,
	"SIGWINCH": syscall.SIGWINCH,
	"SIGXCPU":  syscall.SIGXCPU,
	"SIGXFSZ":  syscall.SIGXFSZ,
}
View Source
var ValidSignals []string

ValidSignals is the list of all valid signals. This is built at runtime because it is OS-dependent.

Functions

func Parse

func Parse(s string) (os.Signal, error)

Parse parses the given string as a signal. If the signal is not found, an error is returned.

func StringToSignalFunc

func StringToSignalFunc() mapstructure.DecodeHookFunc

StringToSignalFunc parses a string as a signal based on the signal lookup table. If the user supplied an empty string or nil, a special "nil signal" is returned. Clients should check for this value and set the response back nil after mapstructure finishes parsing.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL