Revision: 222f14e048a2
Branch: default
Author: Ian Lance Taylor <
ia...@golang.org>
Date: Thu Feb 28 13:55:43 2013
Log: runtime: Don't block SIGTRAP while creating a new thread.
Thanks to Uros Bizjak.
R=iant
CC=gofrontend-dev
https://codereview.appspot.com/7417045
http://code.google.com/p/gofrontend/source/detail?r=222f14e048a2
Modified:
/libgo/runtime/proc.c
=======================================
--- /libgo/runtime/proc.c Thu Jan 31 09:24:55 2013
+++ /libgo/runtime/proc.c Thu Feb 28 13:55:43 2013
@@ -1256,6 +1256,12 @@
// 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);