]> Cypherpunks repositories - gostls13.git/commitdiff
os: clarify docs on Interrupt and Kill
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 30 Nov 2017 16:36:34 +0000 (16:36 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sat, 2 Dec 2017 02:49:01 +0000 (02:49 +0000)
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 <iant@golang.org>
src/os/exec_plan9.go
src/os/exec_posix.go

index 676be36ac775e10b269d6164a1dbe87fde26f701..6b4d28c93da5f0aea58633104463b4fe1f69898d 100644 (file)
@@ -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")
index 3cf38b68add3cd5ade2fe26d45b190e91ee43305..fb220c8a5a27dac11b885d2f8afa3f2cae63f24c 100644 (file)
@@ -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