signal_deprecated.go 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. import (
  5. "github.com/docker/docker/pkg/stack"
  6. msignal "github.com/moby/sys/signal"
  7. )
  8. var (
  9. // DumpStacks appends the runtime stack into file in dir and returns full path
  10. // to that file.
  11. // Deprecated: use github.com/docker/docker/pkg/stack.Dump instead.
  12. DumpStacks = stack.DumpToFile
  13. // CatchAll catches all signals and relays them to the specified channel.
  14. // SIGURG is not handled, as it's used by the Go runtime to support
  15. // preemptable system calls.
  16. // Deprecated: use github.com/moby/sys/signal.CatchAll instead
  17. CatchAll = msignal.CatchAll
  18. // StopCatch stops catching the signals and closes the specified channel.
  19. // Deprecated: use github.com/moby/sys/signal.StopCatch instead
  20. StopCatch = msignal.StopCatch
  21. // ParseSignal translates a string to a valid syscall signal.
  22. // It returns an error if the signal map doesn't include the given signal.
  23. // Deprecated: use github.com/moby/sys/signal.ParseSignal instead
  24. ParseSignal = msignal.ParseSignal
  25. // ValidSignalForPlatform returns true if a signal is valid on the platform
  26. // Deprecated: use github.com/moby/sys/signal.ValidSignalForPlatform instead
  27. ValidSignalForPlatform = msignal.ValidSignalForPlatform
  28. // SignalMap is a map of signals for the current platform.
  29. // Deprecated: use github.com/moby/sys/signal.SignalMap instead
  30. SignalMap = msignal.SignalMap
  31. )
  32. // Signals used in cli/command
  33. const (
  34. // SIGCHLD is a signal sent to a process when a child process terminates, is interrupted, or resumes after being interrupted.
  35. // Deprecated: use github.com/moby/sys/signal.SIGCHLD instead
  36. SIGCHLD = msignal.SIGCHLD
  37. // SIGWINCH is a signal sent to a process when its controlling terminal changes its size
  38. // Deprecated: use github.com/moby/sys/signal.SIGWINCH instead
  39. SIGWINCH = msignal.SIGWINCH
  40. // SIGPIPE is a signal sent to a process when a pipe is written to before the other end is open for reading
  41. // Deprecated: use github.com/moby/sys/signal.SIGPIPE instead
  42. SIGPIPE = msignal.SIGPIPE
  43. // DefaultStopSignal is the syscall signal used to stop a container in unix systems.
  44. // Deprecated: use github.com/moby/sys/signal.DefaultStopSignal instead
  45. DefaultStopSignal = msignal.DefaultStopSignal
  46. )