sigcontext

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithSignalCancel

func WithSignalCancel(ctx context.Context, sigs ...os.Signal) (context.Context, context.CancelFunc)

WithSignalCancel is a context that will cancel itself when a signal is sent to the process. The cancel function returned is responsible for freeing the signal handlers used and must be called. If a caller wants to default the signal handlers to the go runtime then the cancel must be called as soon as the derived context is Done() (ie: a second ^C, SIGINT, will cause the process to terminate).

Types

This section is empty.

Jump to

Keyboard shortcuts

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