Skip to content

Commit

Permalink
os: clarify docs on Interrupt and Kill
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bradfitz committed Dec 2, 2017
1 parent 4153495 commit 871b793
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/os/exec_plan9.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
7 changes: 4 additions & 3 deletions src/os/exec_posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 871b793

Please sign in to comment.