1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #7212 from mheon/kill_zero

Properly handle 0 being passed as a signal number
This commit is contained in:
Victor Vieux 2014-07-24 11:42:16 -07:00
commit 2481e08e41

View file

@ -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])
}
}