]> Cypherpunks repositories - gostls13.git/commit
runtime: minor simplifications to signal code
authorIan Lance Taylor <iant@golang.org>
Wed, 28 Sep 2016 05:24:51 +0000 (22:24 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 28 Sep 2016 13:12:47 +0000 (13:12 +0000)
commiteb268cb321edf6e2bbaa832acb2e61db6b081f98
tree7c2fd37a99424eec125732b6280f58d8af143072
parent594cddd62598dcfc1fe6ee1c3e5978063f498dc1
runtime: minor simplifications to signal code

Change setsig, setsigstack, getsig, raise, raiseproc to take uint32 for
signal number parameter, as that is the type mostly used for signal
numbers.  Same for dieFromSignal, sigInstallGoHandler, raisebadsignal.

Remove setsig restart parameter, as it is always either true or
irrelevant.

Don't check the handler in setsigstack, as the only caller does that
anyhow.

Don't bother to convert the handler from sigtramp to sighandler in
getsig, as it will never be called when the handler is sigtramp or
sighandler.

Don't check the return value from rt_sigaction in the GNU/Linux version
of setsigstack; no other setsigstack checks it, and it never fails.

Change-Id: I6bbd677e048a77eddf974dd3d017bc3c560fbd48
Reviewed-on: https://go-review.googlesource.com/29953
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
12 files changed:
src/runtime/os3_solaris.go
src/runtime/os_darwin.go
src/runtime/os_dragonfly.go
src/runtime/os_freebsd.go
src/runtime/os_linux.go
src/runtime/os_nacl.go
src/runtime/os_netbsd.go
src/runtime/os_openbsd.go
src/runtime/os_plan9.go
src/runtime/signal_sighandler.go
src/runtime/signal_unix.go
src/runtime/signal_windows.go