Commit 0a2f103a by Ian Lance Taylor

runtime: Don't block SIGTRAP while creating a new thread.

Thanks to Uros Bizjak.

From-SVN: r196362
parent e664c61c
......@@ -1256,6 +1256,12 @@ runtime_newm(void)
// Block signals during pthread_create so that the new thread
// starts with signals disabled. It will enable them in minit.
sigfillset(&clear);
#ifdef SIGTRAP
// Blocking SIGTRAP reportedly breaks gdb on Alpha GNU/Linux.
sigdelset(&clear, SIGTRAP);
#endif
sigemptyset(&old);
sigprocmask(SIG_BLOCK, &clear, &old);
ret = pthread_create(&tid, &attr, runtime_mstart, mp);
......
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