signal_windows.go 834 B

12345678910111213141516171819202122232425262728
  1. // +build windows
  2. package signal
  3. import (
  4. "syscall"
  5. )
  6. // Signals used in cli/command (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. SIGPIPE = syscall.Signal(0xff)
  12. // DefaultStopSignal is the syscall signal used to stop a container in windows systems.
  13. DefaultStopSignal = "15"
  14. )
  15. // SignalMap is a map of "supported" signals. As per the comment in GOLang's
  16. // ztypes_windows.go: "More invented values for signals". Windows doesn't
  17. // really support signals in any way, shape or form that Unix does.
  18. //
  19. // We have these so that docker kill can be used to gracefully (TERM) and
  20. // forcibly (KILL) terminate a container on Windows.
  21. var SignalMap = map[string]syscall.Signal{
  22. "KILL": syscall.SIGKILL,
  23. "TERM": syscall.SIGTERM,
  24. }