diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2017-11-30 16:36:34 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2017-12-02 02:49:01 +0000 |
| commit | 871b79316ad7f2b10f1347f8d9077713afaff451 (patch) | |
| tree | 0ad656859623d20c64d67b991971ba0584c3a5da | |
| parent | 415349575dec277fbadf08b9d690d07fe313b288 (diff) | |
| download | go-871b79316ad7f2b10f1347f8d9077713afaff451.tar.xz | |
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 <iant@golang.org>
| -rw-r--r-- | src/os/exec_plan9.go | 7 | ||||
| -rw-r--r-- | src/os/exec_posix.go | 7 |
2 files changed, 8 insertions, 6 deletions
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 |
