signals

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2017 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

SIGNIL is the nil signal.

View Source
var SignalLookup = map[string]os.Signal{
	"SIGABRT":  syscall.SIGABRT,
	"SIGALRM":  syscall.SIGALRM,
	"SIGBUS":   syscall.SIGBUS,
	"SIGCHLD":  syscall.SIGCHLD,
	"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,
	"SIGURG":   syscall.SIGURG,
	"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

type NilSignal

type NilSignal int

NilSignal is a special signal that is blank or "nil"

func (*NilSignal) Signal

func (s *NilSignal) Signal()

func (*NilSignal) String

func (s *NilSignal) String() string

Jump to

Keyboard shortcuts

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