runtime: Ignore SIGPROF if not on a Go thread.
From-SVN: r201154
This commit is contained in:
parent
433cc7b037
commit
5f9ae7f2d6
1 changed files with 10 additions and 9 deletions
|
@ -166,21 +166,22 @@ runtime_sighandler (int sig, Siginfo *info,
|
|||
int i;
|
||||
|
||||
m = runtime_m ();
|
||||
|
||||
#ifdef SIGPROF
|
||||
if (sig == SIGPROF)
|
||||
{
|
||||
if (m != NULL && gp != m->g0 && gp != m->gsignal)
|
||||
runtime_sigprof ();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m == NULL)
|
||||
{
|
||||
runtime_badsignal (sig);
|
||||
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)
|
||||
{
|
||||
SigTab *t;
|
||||
|
|
Loading…
Add table
Reference in a new issue