github.com/docker/engine@v22.0.0-20211208180946-d456264580cf+incompatible/pkg/signal/signal_deprecated.go (about)

     1  // Package signal provides helper functions for dealing with signals across
     2  // various operating systems.
     3  package signal // import "github.com/docker/docker/pkg/signal"
     4  
     5  import (
     6  	"github.com/docker/docker/pkg/stack"
     7  	msignal "github.com/moby/sys/signal"
     8  )
     9  
    10  var (
    11  	// DumpStacks appends the runtime stack into file in dir and returns full path
    12  	// to that file.
    13  	// Deprecated: use github.com/docker/docker/pkg/stack.Dump instead.
    14  	DumpStacks = stack.DumpToFile
    15  
    16  	// CatchAll catches all signals and relays them to the specified channel.
    17  	// SIGURG is not handled, as it's used by the Go runtime to support
    18  	// preemptable system calls.
    19  	// Deprecated: use github.com/moby/sys/signal.CatchAll instead
    20  	CatchAll = msignal.CatchAll
    21  
    22  	// StopCatch stops catching the signals and closes the specified channel.
    23  	// Deprecated: use github.com/moby/sys/signal.StopCatch instead
    24  	StopCatch = msignal.StopCatch
    25  
    26  	// ParseSignal translates a string to a valid syscall signal.
    27  	// It returns an error if the signal map doesn't include the given signal.
    28  	// Deprecated: use github.com/moby/sys/signal.ParseSignal instead
    29  	ParseSignal = msignal.ParseSignal
    30  
    31  	// ValidSignalForPlatform returns true if a signal is valid on the platform
    32  	// Deprecated: use github.com/moby/sys/signal.ValidSignalForPlatform instead
    33  	ValidSignalForPlatform = msignal.ValidSignalForPlatform
    34  
    35  	// SignalMap is a map of signals for the current platform.
    36  	// Deprecated: use github.com/moby/sys/signal.SignalMap instead
    37  	SignalMap = msignal.SignalMap
    38  )
    39  
    40  // Signals used in cli/command
    41  const (
    42  	// SIGCHLD is a signal sent to a process when a child process terminates, is interrupted, or resumes after being interrupted.
    43  	// Deprecated: use github.com/moby/sys/signal.SIGCHLD instead
    44  	SIGCHLD = msignal.SIGCHLD
    45  	// SIGWINCH is a signal sent to a process when its controlling terminal changes its size
    46  	// Deprecated: use github.com/moby/sys/signal.SIGWINCH instead
    47  	SIGWINCH = msignal.SIGWINCH
    48  	// SIGPIPE is a signal sent to a process when a pipe is written to before the other end is open for reading
    49  	// Deprecated: use github.com/moby/sys/signal.SIGPIPE instead
    50  	SIGPIPE = msignal.SIGPIPE
    51  
    52  	// DefaultStopSignal has been deprecated and removed. The default value is
    53  	// now defined in github.com/docker/docker/container. Clients should omit
    54  	// the container's stop-signal field if the default should be used.
    55  )