From 8ff04a9966083f982ecaa57f7bcc786aa7316ec8 Mon Sep 17 00:00:00 2001 From: Kevin Burke Date: Tue, 25 Sep 2018 09:22:09 -0700 Subject: [PATCH] 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 --- src/os/exec_posix.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/os/exec_posix.go b/src/os/exec_posix.go index 1e60365dba..4c8261295c 100644 --- a/src/os/exec_posix.go +++ b/src/os/exec_posix.go @@ -10,10 +10,11 @@ import ( "syscall" ) -// The only signal values guaranteed to be present in the os package -// on all systems are Interrupt (send the process an interrupt) and -// Kill (force the process to exit). Interrupt is not implemented on -// Windows; using it with os.Process.Signal will return an error. +// The only signal values guaranteed to be present in the os package on all +// systems are os.Interrupt (send the process an interrupt) and os.Kill (force +// the process to exit). On Windows, sending os.Interrupt to a process with +// os.Process.Signal is not implemented; it will return an error instead of +// sending a signal. var ( Interrupt Signal = syscall.SIGINT Kill Signal = syscall.SIGKILL