aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec.go
diff options
context:
space:
mode:
authorYury Smolsky <yury@smolsky.by>2018-03-05 22:00:34 +0200
committerBrad Fitzpatrick <bradfitz@golang.org>2018-03-05 23:47:41 +0000
commitadcf2d59ec25e6a1f5fda7eb5c125302363657ea (patch)
tree782b8b3a7986af6a5f9d54123a3176f89b101f49 /src/os/exec.go
parent32e459a09cd2da967fc2c0accf197fecc7b658d5 (diff)
downloadgo-adcf2d59ec25e6a1f5fda7eb5c125302363657ea.tar.xz
os/exec: document Process.Kill behaviour
It is not clear from documentation what the Process.Kill does. And it leads to reccuring confusion about Cmd.Start/Wait methods. Fixes #24220 Change-Id: I66609d21d2954e195d13648014681530eed8ea6c Reviewed-on: https://go-review.googlesource.com/98715 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/os/exec.go')
-rw-r--r--src/os/exec.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/os/exec.go b/src/os/exec.go
index a7f8710b95..cab6a73d94 100644
--- a/src/os/exec.go
+++ b/src/os/exec.go
@@ -109,7 +109,9 @@ func (p *Process) Release() error {
return p.release()
}
-// Kill causes the Process to exit immediately.
+// Kill causes the Process to exit immediately. Kill does not wait until
+// the Process has actually exited. This only kills the Process itself,
+// not any other processes it may have started.
func (p *Process) Kill() error {
return p.kill()
}