From 82f15148955124c20cb756502036c4f231e5a8aa Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Tue, 29 Oct 2013 13:21:56 +1000 Subject: [PATCH] docker stop sends SIGTERM and SIGKILL, docker kill sends SIGKILL --- commands.go | 4 ++-- docs/sources/commandline/cli.rst | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/commands.go b/commands.go index 6987e8958..0f5c41a4d 100644 --- a/commands.go +++ b/commands.go @@ -491,7 +491,7 @@ func (cli *DockerCli) CmdInfo(args ...string) error { } func (cli *DockerCli) CmdStop(args ...string) error { - cmd := Subcmd("stop", "[OPTIONS] CONTAINER [CONTAINER...]", "Stop a running container") + cmd := Subcmd("stop", "[OPTIONS] CONTAINER [CONTAINER...]", "Stop a running container (Send SIGTERM, and then SIGKILL after grace period)") nSeconds := cmd.Int("t", 10, "Number of seconds to wait for the container to stop before killing it.") if err := cmd.Parse(args); err != nil { return nil @@ -850,7 +850,7 @@ func (cli *DockerCli) CmdRm(args ...string) error { // 'docker kill NAME' kills a running container func (cli *DockerCli) CmdKill(args ...string) error { - cmd := Subcmd("kill", "CONTAINER [CONTAINER...]", "Kill a running container") + cmd := Subcmd("kill", "CONTAINER [CONTAINER...]", "Kill a running container (send SIGKILL)") if err := cmd.Parse(args); err != nil { return nil } diff --git a/docs/sources/commandline/cli.rst b/docs/sources/commandline/cli.rst index 0badcd67c..b8816fe62 100644 --- a/docs/sources/commandline/cli.rst +++ b/docs/sources/commandline/cli.rst @@ -401,7 +401,9 @@ Insert file from github Usage: docker kill CONTAINER [CONTAINER...] - Kill a running container + Kill a running container (Send SIGKILL) + +The main process inside the container will be sent SIGKILL. .. _cli_login: @@ -704,9 +706,11 @@ to the newly created container. Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...] - Stop a running container + Stop a running container (Send SIGTERM, and then SIGKILL after grace period) -t=10: Number of seconds to wait for the container to stop before killing it. + +The main process inside the container will receive SIGTERM, and after a grace period, SIGKILL .. _cli_tag: