]> Cypherpunks repositories - gostls13.git/commitdiff
os/exec: document Process.Kill behaviour
authorYury Smolsky <yury@smolsky.by>
Mon, 5 Mar 2018 20:00:34 +0000 (22:00 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 5 Mar 2018 23:47:41 +0000 (23:47 +0000)
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>
src/os/exec.go

index a7f8710b955db572679762e03ee3c99ec8a69fe5..cab6a73d94ed8558a7860a6611ae7bd2ce54e974 100644 (file)
@@ -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()
 }