runtime: Ignore SIGPROF if not on a Go thread.

From-SVN: r201154
This commit is contained in:
Ian Lance Taylor 2013-07-23 04:42:09 +00:00
parent 433cc7b037
commit 5f9ae7f2d6
1 changed files with 10 additions and 9 deletions

View File

@ -166,21 +166,22 @@ runtime_sighandler (int sig, Siginfo *info,
int i; int i;
m = runtime_m (); m = runtime_m ();
#ifdef SIGPROF
if (sig == SIGPROF)
{
if (m != NULL && gp != m->g0 && gp != m->gsignal)
runtime_sigprof ();
return;
}
#endif
if (m == NULL) if (m == NULL)
{ {
runtime_badsignal (sig); runtime_badsignal (sig);
return; return;
} }
#ifdef SIGPROF
if (sig == SIGPROF)
{
if (gp != runtime_m ()->g0 && gp != runtime_m ()->gsignal)
runtime_sigprof ();
return;
}
#endif
for (i = 0; runtime_sigtab[i].sig != -1; ++i) for (i = 0; runtime_sigtab[i].sig != -1; ++i)
{ {
SigTab *t; SigTab *t;