diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-02-28 21:56:14 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-02-28 21:56:14 +0000 |
commit | 0a2f103a45756ce3d0565249faf2da041e22df6d (patch) | |
tree | fd28ce5047f23384c6a3f80900cb0576ada467b0 /libgo | |
parent | e664c61c84f9b5ec65fe987ccba8e880ff19cddf (diff) | |
download | gcc-0a2f103a45756ce3d0565249faf2da041e22df6d.tar.gz |
runtime: Don't block SIGTRAP while creating a new thread.
Thanks to Uros Bizjak.
From-SVN: r196362
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/runtime/proc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index b59f4acf0dc..9b563a50946 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -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); |