signal

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Signal handling for Linux only.

Index

Constants

View Source
const (
	SIGWINCH = syscall.SIGWINCH // For cross-compilation with Windows
)

Variables

This section is empty.

Functions

func CatchAll

func CatchAll(sigc chan os.Signal)

CatchAll catches all signals and relays them to the specified channel.

func ParseSignal

func ParseSignal(rawSignal string) (syscall.Signal, error)

ParseSignal translates a string to a valid syscall signal. It returns an error if the signal map doesn't include the given signal.

func ParseSignalNameOrNumber added in v1.9.0

func ParseSignalNameOrNumber(rawSignal string) (syscall.Signal, error)

ParseSignalNameOrNumber translates a string to a valid syscall signal. Input can be a name or number representation i.e. "KILL" "9"

func StopCatch

func StopCatch(sigc chan os.Signal)

StopCatch stops catching the signals and closes the specified channel.

Types

This section is empty.

Jump to

Keyboard shortcuts

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