mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-04 20:51:44 +00:00
Properly handle 0 being passed as a signal
Docker-DCO-1.1-Signed-off-by: Matt Heon <mheon@redhat.com> (github: mheon)
This commit is contained in:
+3
-3
@@ -229,10 +229,10 @@ func (srv *Server) ContainerKill(job *engine.Job) engine.Status {
|
||||
if err != nil {
|
||||
// The signal is not a number, treat it as a string (either like "KILL" or like "SIGKILL")
|
||||
sig = uint64(signal.SignalMap[strings.TrimPrefix(job.Args[1], "SIG")])
|
||||
if sig == 0 {
|
||||
return job.Errorf("Invalid signal: %s", job.Args[1])
|
||||
}
|
||||
}
|
||||
|
||||
if sig == 0 {
|
||||
return job.Errorf("Invalid signal: %s", job.Args[1])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user