Commit 8ff04a99 authored by Kevin Burke's avatar Kevin Burke

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/137336Reviewed-by: 's avatarAlex Brainman <alex.brainman@gmail.com>
parent 6a5c5f84
...@@ -10,10 +10,11 @@ import ( ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment