package osutil
import "github.com/coreos/etcd/pkg/osutil"
Index ¶
- func Exit(code int)
- func HandleInterrupts()
- func RegisterInterruptHandler(h InterruptHandler)
- func Unsetenv(key string) error
- type InterruptHandler
Functions ¶
func Exit ¶
func Exit(code int)
Exit relays to os.Exit if no interrupt handlers are running, blocks otherwise.
func HandleInterrupts ¶
func HandleInterrupts()
HandleInterrupts calls the handler functions on receiving a SIGINT or SIGTERM.
func RegisterInterruptHandler ¶
func RegisterInterruptHandler(h InterruptHandler)
RegisterInterruptHandler registers a new InterruptHandler. Handlers registered after interrupt handing was initiated will not be executed.
func Unsetenv ¶
Types ¶
type InterruptHandler ¶
type InterruptHandler func()
InterruptHandler is a function that is called on receiving a SIGTERM or SIGINT signal.
Source Files ¶
- Version
- v2.2.5+incompatible
- Published
- Feb 1, 2016
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 8 minutes ago –
Tools for package owners.