Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(117)

Issue 6455050: code review 6455050: runtime: ignore signal 33 == SIGSETXID on GNU/Linux (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 9 months ago by iant
Modified:
11 years, 9 months ago
Reviewers:
iant2
CC:
rsc, r, minux1, bradfitzgoog, golang-dev
Visibility:
Public.

Description

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 issue 3871.

Patch Set 1 #

Patch Set 2 : diff -r 7f6a0510d3c9 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M src/pkg/runtime/signals_linux.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7
iant
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 9 months ago (2012-07-27 04:28:22 UTC) #1
r
s/intecept/intercept/ in the CL. otherwise LGTM but i am no expert. -rob
11 years, 9 months ago (2012-07-27 04:30:19 UTC) #2
rsc
LGTM
11 years, 9 months ago (2012-07-27 04:57:25 UTC) #3
minux1
do you consider adding a test to /misc/cgo/test?
11 years, 9 months ago (2012-07-27 05:19:48 UTC) #4
bradfitzgoog
Wouldn't it only work if the tests ran as root? Seems rare. On Jul 26, ...
11 years, 9 months ago (2012-07-27 05:20:46 UTC) #5
iant
*** Submitted as http://code.google.com/p/go/source/detail?r=bfa4e1f1027f *** runtime: ignore signal 33 == SIGSETXID on GNU/Linux When a ...
11 years, 9 months ago (2012-07-27 05:46:31 UTC) #6
iant2
11 years, 9 months ago (2012-07-27 05:51:09 UTC) #7
On Thu, Jul 26, 2012 at 10:19 PM,  <minux.ma@gmail.com> wrote:
> do you consider adding a test to /misc/cgo/test?

http://codereview.appspot.com/6445049

On Thu, Jul 26, 2012 at 10:20 PM, Brad Fitzpatrick <bradfitz@google.com> wrote:
> Wouldn't it only work if the tests ran as root? Seems rare.

The bug occurs even when non-root.  It's true that the call to setgid
fails, but it still tries to get every thread to fail individually.

Ian
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b