|
1 From 20a053611b2ac6cdd760fd3d391e4f7ae2d72a77 Mon Sep 17 00:00:00 2001 |
|
2 From: Michael Hudson-Doyle <[email protected]> |
|
3 Date: Fri, 13 Nov 2015 08:55:44 +1300 |
|
4 Subject: [PATCH 43/63] [release-branch.go1.5] runtime: ignore rt_sigaction |
|
5 error if it is for SIGRTMAX |
|
6 |
|
7 A forward port of https://codereview.appspot.com/124900043/ which somehow |
|
8 got lost somewhere. |
|
9 |
|
10 Fixes #13024 |
|
11 |
|
12 Change-Id: Iab128899e65c51d90f6704e3e1b2fc9326e3a1c2 |
|
13 Reviewed-on: https://go-review.googlesource.com/16853 |
|
14 Reviewed-by: Russ Cox <[email protected]> |
|
15 Reviewed-on: https://go-review.googlesource.com/16986 |
|
16 Run-TryBot: Austin Clements <[email protected]> |
|
17 Reviewed-by: Ian Lance Taylor <[email protected]> |
|
18 --- |
|
19 src/runtime/os1_linux.go | 3 ++- |
|
20 1 file changed, 2 insertions(+), 1 deletion(-) |
|
21 |
|
22 diff --git a/src/runtime/os1_linux.go b/src/runtime/os1_linux.go |
|
23 index c23dc30..1cad8f7 100644 |
|
24 --- a/src/runtime/os1_linux.go |
|
25 +++ b/src/runtime/os1_linux.go |
|
26 @@ -293,7 +293,8 @@ func setsig(i int32, fn uintptr, restart bool) { |
|
27 fn = funcPC(sigtramp) |
|
28 } |
|
29 sa.sa_handler = fn |
|
30 - if rt_sigaction(uintptr(i), &sa, nil, unsafe.Sizeof(sa.sa_mask)) != 0 { |
|
31 + // Qemu rejects rt_sigaction of SIGRTMAX (64). |
|
32 + if rt_sigaction(uintptr(i), &sa, nil, unsafe.Sizeof(sa.sa_mask)) != 0 && i != 64 { |
|
33 throw("rt_sigaction failure") |
|
34 } |
|
35 } |
|
36 -- |
|
37 2.6.1 |
|
38 |