From 8f41e7cd818bf1deb955ae4c4eb9c48a8943a55f Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sat, 22 Sep 2012 05:54:14 +1000 Subject: [PATCH] [release-branch.go1] runtime: ignore signal 33 == SIGSETXID on GNU/Linux MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ««« backport bfa4e1f1027f runtime: ignore signal 33 == SIGSETXID on GNU/Linux When a cgo program calls setuid, setgid, etc., the GNU/Linux pthread library sends signal SIGSETXID to each thread to tell it to update its UID info. If Go is permitted to intercept the default SIGSETXID signal handler, the program will hang. This patch tells the runtime package to not try to intercept SIGSETXID on GNU/Linux. This will be odd if a Go program wants to try to use that signal, but it means that cgo programs that call setuid, etc., won't hang. Fixes #3871. R=rsc, r, minux.ma, bradfitz CC=golang-dev https://golang.org/cl/6455050 »»» --- src/pkg/runtime/signals_linux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/runtime/signals_linux.h b/src/pkg/runtime/signals_linux.h index 345a6c5d11..9c35670075 100644 --- a/src/pkg/runtime/signals_linux.h +++ b/src/pkg/runtime/signals_linux.h @@ -42,7 +42,7 @@ SigTab runtime·sigtab[] = { /* 30 */ N, "SIGPWR: power failure restart", /* 31 */ N, "SIGSYS: bad system call", /* 32 */ N, "signal 32", - /* 33 */ N, "signal 33", + /* 33 */ 0, "signal 33", /* SIGSETXID; see issue 3871 */ /* 34 */ N, "signal 34", /* 35 */ N, "signal 35", /* 36 */ N, "signal 36", -- 2.50.0