mirror of
https://github.com/docker/docs.git
synced 2026-04-12 06:19:22 +07:00
Merge pull request #7212 from mheon/kill_zero
Properly handle 0 being passed as a signal number
This commit is contained in:
@@ -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