Documentation ¶
Overview ¶
Package sighandling contains helpers for handling signals to applications.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IgnoreChildStop ¶
func IgnoreChildStop() error
IgnoreChildStop sets the SA_NOCLDSTOP flag, causing child processes to not generate SIGCHLD when they stop.
func ReplaceSignalHandler ¶
ReplaceSignalHandler replaces the existing signal handler for the provided signal with the function pointer at `handler`. This bypasses the Go runtime signal handlers, and should only be used for low-level signal handlers where use of signal.Notify is not appropriate.
It stores the value of the previously set handler in previous.
func StartSignalForwarding ¶
StartSignalForwarding ensures that synchronous signals are passed to the given handler function and returns a callback that stops signal delivery.
Note that this function permanently takes over signal handling. After the stop callback, signals revert to the default Go runtime behavior, which cannot be overridden with external calls to signal.Notify.
Types ¶
This section is empty.