From: Brad Fitzpatrick Date: Thu, 30 Nov 2017 16:36:34 +0000 (+0000) Subject: os: clarify docs on Interrupt and Kill X-Git-Tag: go1.10beta1~46 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=871b79316ad7f2b10f1347f8d9077713afaff451;p=gostls13.git os: clarify docs on Interrupt and Kill Note that Interrupt will compile but not work on Windows. Fixes #22454 Change-Id: If011c32211f4bb45d458317e113b9794d5b4a4b1 Reviewed-on: https://go-review.googlesource.com/81035 Reviewed-by: Ian Lance Taylor --- diff --git a/src/os/exec_plan9.go b/src/os/exec_plan9.go index 676be36ac7..6b4d28c93d 100644 --- a/src/os/exec_plan9.go +++ b/src/os/exec_plan9.go @@ -11,9 +11,10 @@ import ( "time" ) -// The only signal values guaranteed to be present on all systems -// are Interrupt (send the process an interrupt) and Kill (force -// the process to exit). +// 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. var ( Interrupt Signal = syscall.Note("interrupt") Kill Signal = syscall.Note("kill") diff --git a/src/os/exec_posix.go b/src/os/exec_posix.go index 3cf38b68ad..fb220c8a5a 100644 --- a/src/os/exec_posix.go +++ b/src/os/exec_posix.go @@ -10,9 +10,10 @@ import ( "syscall" ) -// The only signal values guaranteed to be present on all systems -// are Interrupt (send the process an interrupt) and Kill (force -// the process to exit). +// 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. var ( Interrupt Signal = syscall.SIGINT Kill Signal = syscall.SIGKILL