]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.5] runtime: unblock special glibc signals on each thread
authorIan Lance Taylor <iant@golang.org>
Fri, 4 Sep 2015 17:58:42 +0000 (10:58 -0700)
committerAustin Clements <austin@google.com>
Tue, 17 Nov 2015 02:20:21 +0000 (02:20 +0000)
commita89768461f20fc66f28420cc49df9ce765cf8253
treeb631ab9a6a9a4d16842b088ae767ba3320a2cf7f
parent2cfde4152050063d8fa66b8c28f3b4b137d08a7a
[release-branch.go1.5] runtime: unblock special glibc signals on each thread

Glibc uses some special signals for special thread operations.  These
signals will be used in programs that use cgo and invoke certain glibc
functions, such as setgid.  In order for this to work, these signals
need to not be masked by any thread.  Before this change, they were
being masked by programs that used os/signal.Notify, because it
carefully masks all non-thread-specific signals in all threads so that a
dedicated thread will collect and report those signals (see ensureSigM
in signal1_unix.go).

This change adds the two glibc special signals to the set of signals
that are unmasked in each thread.

Fixes #12498.

Change-Id: I797d71a099a2169c186f024185d44a2e1972d4ad
Reviewed-on: https://go-review.googlesource.com/14297
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-on: https://go-review.googlesource.com/16967
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
misc/cgo/test/setgid_linux.go
src/runtime/signal_linux.go