signal_windows.go 815 B

1234567891011121314151617181920212223242526
  1. package signal
  2. import (
  3. "syscall"
  4. )
  5. // Signals used in cli/command (no windows equivalent, use
  6. // invalid signals so they don't get handled)
  7. const (
  8. SIGCHLD = syscall.Signal(0xff)
  9. SIGWINCH = syscall.Signal(0xff)
  10. SIGPIPE = syscall.Signal(0xff)
  11. // DefaultStopSignal is the syscall signal used to stop a container in windows systems.
  12. DefaultStopSignal = "15"
  13. )
  14. // SignalMap is a map of "supported" signals. As per the comment in GOLang's
  15. // ztypes_windows.go: "More invented values for signals". Windows doesn't
  16. // really support signals in any way, shape or form that Unix does.
  17. //
  18. // We have these so that docker kill can be used to gracefully (TERM) and
  19. // forcibly (KILL) terminate a container on Windows.
  20. var SignalMap = map[string]syscall.Signal{
  21. "KILL": syscall.SIGKILL,
  22. "TERM": syscall.SIGTERM,
  23. }