]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: define common notes on Plan 9
authorDavid du Colombier <0intro@gmail.com>
Sat, 24 Oct 2015 11:28:00 +0000 (13:28 +0200)
committerDavid du Colombier <0intro@gmail.com>
Mon, 26 Oct 2015 22:12:46 +0000 (22:12 +0000)
There is no signal list on Plan 9, since notes
are strings. However, some programs expect
signals to be defined in the syscall package.
Hence, we define a list of the most common notes.

Updates #11975.

Change-Id: I852e14fd98777c9595a406e04125be1cbebed0fb
Reviewed-on: https://go-review.googlesource.com/16301
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: David du Colombier <0intro@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/syscall/errors_plan9.go

index ede3d6a329e49997d608d57d57a611bd046c531c..d7634c995ed85f9bf5ae15414d98f5f708d48ab5 100644 (file)
@@ -46,3 +46,13 @@ var (
        EACCES       = NewError("access permission denied")
        EAFNOSUPPORT = NewError("address family not supported by protocol")
 )
+
+// Notes
+const (
+       SIGABRT = Note("abort")
+       SIGALRM = Note("alarm")
+       SIGHUP  = Note("hangup")
+       SIGINT  = Note("interrupt")
+       SIGKILL = Note("kill")
+       SIGTERM = Note("interrupt")
+)