mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
os/signal, runtime: implement notes on Plan 9
This change is an implementation of the signal runtime and os/signal package on Plan 9. Contrary to Unix, on Plan 9 a signal is called a note and is represented by a string. For this reason, the sigsend and signal_recv functions had to be reimplemented specifically for Plan 9. In order to reuse most of the code and internal interface of the os/signal package, the note strings are mapped to integers. Thanks to Russ Cox for the early review. Change-Id: I95836645efe21942bb1939f43f87fb3c0eaaef1a Reviewed-on: https://go-review.googlesource.com/2164 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
1b523384dc
commit
d5d4ab7819
7 changed files with 356 additions and 22 deletions
|
|
@ -24,6 +24,8 @@
|
|||
// unnecessary rechecks of sig.mask, but it cannot lead to missed signals
|
||||
// nor deadlocks.
|
||||
|
||||
// +build !plan9
|
||||
|
||||
package runtime
|
||||
|
||||
import "unsafe"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue