Documentation ¶
Overview ¶
Package process provides utilities for managing the current system process.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exit ¶
func Exit(code int)
Exit runs the registered exit handlers, as if the os.Interrupt signal had been sent, and then terminates the process with the given status code. Exit blocks until the process terminates if it has already been called elsewhere.
func SetExitHandler ¶
func SetExitHandler(handler func())
SetExitHandler registers the given handler function to run when receiving os.Interrupt or SIGTERM signals. Registered handlers are executed in reverse order of when they were set.
func SetSignalHandler ¶
SetSignalHandler registers the given handler function to run when receiving the specified signal. Registered handlers are executed in reverse order of when they were set.
Types ¶
This section is empty.