mirror of
https://github.com/golang/go
synced 2024-09-04 23:44:16 +00:00
os: clearer doc for Interrupt
I was confused by the juxtaposition of os.Interrupt docs, which are "guaranteed to exist on all platforms" in one sentence and then "not implemented" in the next sentence. Reading the code reveals "not implemented" refers specifically to the implementation of os.Process.Signal on Windows, not to the os.Interrupt variable itself. Reword the doc to make this distinction clearer. Fixes #27854. Change-Id: I5fe7cddea61fa1954cef2006dc51b8fa8ece4d6e Reviewed-on: https://go-review.googlesource.com/c/137336 Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
This commit is contained in:
parent
6a5c5f8486
commit
8ff04a9966
|
@ -10,10 +10,11 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The only signal values guaranteed to be present in the os package
|
// The only signal values guaranteed to be present in the os package on all
|
||||||
// on all systems are Interrupt (send the process an interrupt) and
|
// systems are os.Interrupt (send the process an interrupt) and os.Kill (force
|
||||||
// Kill (force the process to exit). Interrupt is not implemented on
|
// the process to exit). On Windows, sending os.Interrupt to a process with
|
||||||
// Windows; using it with os.Process.Signal will return an error.
|
// os.Process.Signal is not implemented; it will return an error instead of
|
||||||
|
// sending a signal.
|
||||||
var (
|
var (
|
||||||
Interrupt Signal = syscall.SIGINT
|
Interrupt Signal = syscall.SIGINT
|
||||||
Kill Signal = syscall.SIGKILL
|
Kill Signal = syscall.SIGKILL
|
||||||
|
|
Loading…
Reference in a new issue