diff options
| author | Shenghou Ma <minux.ma@gmail.com> | 2013-07-12 04:39:39 +0800 |
|---|---|---|
| committer | Shenghou Ma <minux.ma@gmail.com> | 2013-07-12 04:39:39 +0800 |
| commit | 2f1ead709548873463b93de549839d3acbd27633 (patch) | |
| tree | ce477e0b85560f067e4c77d1216d39e6de314172 /src/pkg/runtime/os_linux.c | |
| parent | 2a983aa3117a1647be2759edad8643cfdd5c7398 (diff) | |
| download | go-2f1ead709548873463b93de549839d3acbd27633.tar.xz | |
runtime: correctly handle signals received on foreign threads
Fixes #3250.
R=rsc
CC=golang-dev
https://golang.org/cl/10757044
Diffstat (limited to 'src/pkg/runtime/os_linux.c')
| -rw-r--r-- | src/pkg/runtime/os_linux.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/pkg/runtime/os_linux.c b/src/pkg/runtime/os_linux.c index 2ae33af2d9..b27239d46f 100644 --- a/src/pkg/runtime/os_linux.c +++ b/src/pkg/runtime/os_linux.c @@ -284,30 +284,6 @@ runtime·setprof(bool on) USED(on); } -#pragma dataflag 16 // no pointers -static int8 badsignal[] = "runtime: signal received on thread not created by Go: "; - -// This runs on a foreign stack, without an m or a g. No stack split. -#pragma textflag 7 -void -runtime·badsignal(int32 sig) -{ - int32 len; - - if (sig == SIGPROF) { - return; // Ignore SIGPROFs intended for a non-Go thread. - } - runtime·write(2, badsignal, sizeof badsignal - 1); - if (0 <= sig && sig < NSIG) { - // Can't call findnull() because it will split stack. - for(len = 0; runtime·sigtab[sig].name[len]; len++) - ; - runtime·write(2, runtime·sigtab[sig].name, len); - } - runtime·write(2, "\n", 1); - runtime·exit(1); -} - #ifdef GOARCH_386 #define sa_handler k_sa_handler #endif |
