Skip to content

Commit

Permalink
os/exec: document Process.Kill behaviour
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yury Smolsky authored and bradfitz committed Mar 5, 2018
1 parent 32e459a commit adcf2d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/os/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit adcf2d5

Please sign in to comment.