syscall: remove the Signal type on Plan 9
Instead use a new type, "Note", whose underlying
type is just a string. This change allows us to
remove the exported os.Plan9Note type.
R=bradfitz, seed, rsc
CC=golang-dev
https://golang.org/cl/6015046
diff --git a/src/pkg/syscall/syscall_plan9.go b/src/pkg/syscall/syscall_plan9.go
index c1f45f3..eab4cda 100644
--- a/src/pkg/syscall/syscall_plan9.go
+++ b/src/pkg/syscall/syscall_plan9.go
@@ -23,6 +23,16 @@
// NewError converts s to an ErrorString, which satisfies the Error interface.
func NewError(s string) error { return ErrorString(s) }
+// A Note is a string describing a process note.
+// It implements the os.Signal interface.
+type Note string
+
+func (n Note) Signal() {}
+
+func (n Note) String() string {
+ return string(n)
+}
+
var (
Stdin = 0
Stdout = 1
@@ -322,14 +332,6 @@
return make([]int, 0), nil
}
-type Signal int
-
-func (s Signal) Signal() {}
-
-func (s Signal) String() string {
- return ""
-}
-
//sys Dup(oldfd int, newfd int) (fd int, err error)
//sys Open(path string, mode int) (fd int, err error)
//sys Create(path string, mode int, perm uint32) (fd int, err error)