]> Cypherpunks repositories - gostls13.git/commit
runtime: signal forwarding
authorSrdjan Petrovic <spetrovic@google.com>
Thu, 9 Apr 2015 18:12:12 +0000 (11:12 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 24 Apr 2015 05:19:39 +0000 (05:19 +0000)
commit5c8fbc6f1e4ba78133c53ce73f82ad10e81b42f8
treed6e877ab0831d38259d2cf332236354de74f205d
parentb075d1fc2eaacde75261969372fb3275ef694668
runtime: signal forwarding

Forward signals to signal handlers installed before Go installs its own,
under certain circumstances.  In particular, as iant@ suggests, signals are
forwarded iff:
   (1) a non-SIG_DFL signal handler existed before Go, and
   (2) signal is synchronous (i.e., one of SIGSEGV, SIGBUS, SIGFPE), and
    (3a) signal occured on a non-Go thread, or
    (3b) signal occurred on a Go thread but in CGo code.

Supported only on Linux, for now.

Change-Id: I403219ee47b26cf65da819fb86cf1ec04d3e25f5
Reviewed-on: https://go-review.googlesource.com/8712
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/testsigfwd/main.go [new file with mode: 0644]
src/cmd/dist/test.go
src/runtime/os_linux.go
src/runtime/signal1_unix.go
src/runtime/signal_linux.go
src/runtime/sys_linux_386.s
src/runtime/sys_linux_amd64.s
src/runtime/sys_linux_arm.s
src/runtime/sys_linux_arm64.s
src/runtime/sys_linux_ppc64x.s