Commit 5f9ae7f2 by Ian Lance Taylor

runtime: Ignore SIGPROF if not on a Go thread.

From-SVN: r201154
parent 433cc7b0
...@@ -166,21 +166,22 @@ runtime_sighandler (int sig, Siginfo *info, ...@@ -166,21 +166,22 @@ runtime_sighandler (int sig, Siginfo *info,
int i; int i;
m = runtime_m (); m = runtime_m ();
if (m == NULL)
{
runtime_badsignal (sig);
return;
}
#ifdef SIGPROF #ifdef SIGPROF
if (sig == SIGPROF) if (sig == SIGPROF)
{ {
if (gp != runtime_m ()->g0 && gp != runtime_m ()->gsignal) if (m != NULL && gp != m->g0 && gp != m->gsignal)
runtime_sigprof (); runtime_sigprof ();
return; return;
} }
#endif #endif
if (m == NULL)
{
runtime_badsignal (sig);
return;
}
for (i = 0; runtime_sigtab[i].sig != -1; ++i) for (i = 0; runtime_sigtab[i].sig != -1; ++i)
{ {
SigTab *t; SigTab *t;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment