summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/containers.go
diff options
context:
space:
mode:
authorzhangguanzhang <zhangguanzhang@qq.com>2020-10-05 19:25:45 +0800
committerzhangguanzhang <zhangguanzhang@qq.com>2020-10-06 11:15:25 +0800
commitadde67c74f265c2f4c9245b975d531dd635dce8e (patch)
tree9ebf70b23e8d24eba50ccffacee62f6744920c64 /pkg/api/handlers/compat/containers.go
parentea02d9c2668207523611efac67a1699f776c9147 (diff)
downloadpodman-adde67c74f265c2f4c9245b975d531dd635dce8e.tar.gz
podman-adde67c74f265c2f4c9245b975d531dd635dce8e.tar.bz2
podman-adde67c74f265c2f4c9245b975d531dd635dce8e.zip
fix apiv2 /containers/$name/json return wrong value in `.Config.StopSignal`
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Diffstat (limited to 'pkg/api/handlers/compat/containers.go')
-rw-r--r--pkg/api/handlers/compat/containers.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go
index 3a904ba87..637d296e7 100644
--- a/pkg/api/handlers/compat/containers.go
+++ b/pkg/api/handlers/compat/containers.go
@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"net/http"
+ "strconv"
"strings"
"syscall"
@@ -385,7 +386,7 @@ func LibpodToContainerJSON(l *libpod.Container, sz bool) (*types.ContainerJSON,
MacAddress: "",
OnBuild: nil,
Labels: l.Labels(),
- StopSignal: string(l.StopSignal()),
+ StopSignal: strconv.Itoa(int(l.StopSignal())),
StopTimeout: &stopTimeout,
Shell: nil,
}