Signed-off-by: John Howard <jhoward@microsoft.com>
| ... | ... |
@@ -14,3 +14,14 @@ const ( |
| 14 | 14 |
// DefaultStopSignal is the syscall signal used to stop a container in windows systems. |
| 15 | 15 |
DefaultStopSignal = "15" |
| 16 | 16 |
) |
| 17 |
+ |
|
| 18 |
+// SignalMap is a map of "supported" signals. As per the comment in GOLang's |
|
| 19 |
+// ztypes_windows.go: "More invented values for signals". Windows doesn't |
|
| 20 |
+// really support signals in any way, shape or form that Unix does. |
|
| 21 |
+// |
|
| 22 |
+// We have these so that docker kill can be used to gracefully (TERM) and |
|
| 23 |
+// forcibly (KILL) terminate a container on Windows. |
|
| 24 |
+var SignalMap = map[string]syscall.Signal{
|
|
| 25 |
+ "KILL": syscall.SIGKILL, |
|
| 26 |
+ "TERM": syscall.SIGTERM, |
|
| 27 |
+} |