]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: unify sigTabT type across Unix systems
authorIan Lance Taylor <iant@golang.org>
Fri, 25 Aug 2017 20:18:30 +0000 (13:18 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 25 Aug 2017 21:42:33 +0000 (21:42 +0000)
Change-Id: I8e8a3a118b1216f191c9076b70a88f6f3f19f79f
Reviewed-on: https://go-review.googlesource.com/59150
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/runtime2.go
src/runtime/signal_darwin.go
src/runtime/signal_dragonfly.go
src/runtime/signal_freebsd.go
src/runtime/signal_netbsd.go
src/runtime/signal_openbsd.go
src/runtime/signal_solaris.go
src/runtime/signal_unix.go
src/runtime/sigtab_linux_generic.go
src/runtime/sigtab_linux_mipsx.go

index e4b4f91b5e4223073da1e81a1380d2351a6e218f..366dfc9f4569245f140c793f71d25ce567f3c604 100644 (file)
@@ -594,6 +594,7 @@ const (
        _LockInternal = 2
 )
 
+// Values for the flags field of a sigTabT.
 const (
        _SigNotify   = 1 << iota // let signal.Notify have signal, even if from kernel
        _SigKill                 // if signal.Notify doesn't take it, exit quietly
index 0c5481a2ef4bd8662ca111fd96f7ffeac32c92cd..581b4d04fb926b525c4332588cc8e92f106ca57b 100644 (file)
@@ -4,11 +4,6 @@
 
 package runtime
 
-type sigTabT struct {
-       flags int32
-       name  string
-}
-
 var sigtable = [...]sigTabT{
        /* 0 */ {0, "SIGNONE: no trap"},
        /* 1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
index 8e9ce17c86bc3503d1159d242abdf11ba16030b6..aae46e75d02a0c85e94bb4166c641171b6be061a 100644 (file)
@@ -4,11 +4,6 @@
 
 package runtime
 
-type sigTabT struct {
-       flags int32
-       name  string
-}
-
 var sigtable = [...]sigTabT{
        /* 0 */ {0, "SIGNONE: no trap"},
        /* 1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
index 7ce7217e07661bf5292142cc7f920f764816552c..0bbbd2a809d135804fa727bfec998173221638c4 100644 (file)
@@ -4,11 +4,6 @@
 
 package runtime
 
-type sigTabT struct {
-       flags int32
-       name  string
-}
-
 var sigtable = [...]sigTabT{
        /* 0 */ {0, "SIGNONE: no trap"},
        /* 1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
index 30a3b8e1a922b3d1b6659e213750c74ee469663a..32a9bb0b83c8bdf9cc48706d76987d9c38adde17 100644 (file)
@@ -4,11 +4,6 @@
 
 package runtime
 
-type sigTabT struct {
-       flags int32
-       name  string
-}
-
 var sigtable = [...]sigTabT{
        /*  0 */ {0, "SIGNONE: no trap"},
        /*  1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
index 30a3b8e1a922b3d1b6659e213750c74ee469663a..32a9bb0b83c8bdf9cc48706d76987d9c38adde17 100644 (file)
@@ -4,11 +4,6 @@
 
 package runtime
 
-type sigTabT struct {
-       flags int32
-       name  string
-}
-
 var sigtable = [...]sigTabT{
        /*  0 */ {0, "SIGNONE: no trap"},
        /*  1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
index c931c222d68013c300a86208cd1808fa70a754a4..dc1db76406188a364b7b6a7d76b3ecddd3d9e76e 100644 (file)
@@ -4,11 +4,6 @@
 
 package runtime
 
-type sigTabT struct {
-       flags int32
-       name  string
-}
-
 var sigtable = [...]sigTabT{
        /* 0 */ {0, "SIGNONE: no trap"},
        /* 1 */ {_SigNotify + _SigKill, "SIGHUP: hangup"},
index a6385a0a5e54c4dba1d3475fe13b6a562081afa5..973e5f924f1e88c03bcf9136e0d5691214735fee 100644 (file)
@@ -11,6 +11,16 @@ import (
        "unsafe"
 )
 
+// sigTabT is the type of an entry in the global sigtable array.
+// sigtable is inherently system dependent, and appears in OS-specific files,
+// but sigTabT is the same for all Unixy systems.
+// The sigtable array is indexed by a system signal number to get the flags
+// and printable name of each signal.
+type sigTabT struct {
+       flags int32
+       name  string
+}
+
 //go:linkname os_sigpipe os.sigpipe
 func os_sigpipe() {
        systemstack(sigpipe)
index 874148e1d25913c053d35955f6a45c001ab895a1..9a8e58f49132df3514c0c28c6e1d4ac02fee7e7c 100644 (file)
 
 package runtime
 
-type sigTabT struct {
-       flags int32
-       name  string
-}
-
 var sigtable = [...]sigTabT{
        /* 0 */ {0, "SIGNONE: no trap"},
        /* 1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
index 8d9fb0670448bcbd54dc0fce99553fbf4cfae774..9f6e259cdb3c754e6b1bf92933459dd6b60c5499 100644 (file)
@@ -7,11 +7,6 @@
 
 package runtime
 
-type sigTabT struct {
-       flags int32
-       name  string
-}
-
 var sigtable = [...]sigTabT{
        /*  0 */ {0, "SIGNONE: no trap"},
        /*  1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},