diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-23 04:42:09 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-23 04:42:09 +0000 |
commit | 3498b414fef5ad852f6f1feb4ab22b8e7529186b (patch) | |
tree | cec25b76a29bb0eee3093c06dc1f16e49b741531 /libgo | |
parent | 7aa04c8dccb843c102612936b7fbb888e9fdf13f (diff) | |
download | gcc-3498b414fef5ad852f6f1feb4ab22b8e7529186b.tar.gz |
runtime: Ignore SIGPROF if not on a Go thread.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201154 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/runtime/go-signal.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c index 1e800578ffa..9771b71cfcf 100644 --- a/libgo/runtime/go-signal.c +++ b/libgo/runtime/go-signal.c @@ -166,21 +166,22 @@ runtime_sighandler (int sig, Siginfo *info, int i; m = runtime_m (); - if (m == NULL) - { - runtime_badsignal (sig); - return; - } #ifdef SIGPROF if (sig == SIGPROF) { - if (gp != runtime_m ()->g0 && gp != runtime_m ()->gsignal) + if (m != NULL && gp != m->g0 && gp != m->gsignal) runtime_sigprof (); return; } #endif + if (m == NULL) + { + runtime_badsignal (sig); + return; + } + for (i = 0; runtime_sigtab[i].sig != -1; ++i) { SigTab *t; |