signal_windows.go 800 B

123456789101112131415161718192021222324252627
  1. // +build windows
  2. package signal
  3. import (
  4. "syscall"
  5. )
  6. // Signals used in api/client (no windows equivalent, use
  7. // invalid signals so they don't get handled)
  8. const (
  9. SIGCHLD = syscall.Signal(0xff)
  10. SIGWINCH = 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. }