components/golang/patches/0043-release-branch.go1.5-runtime-ignore-rt_sigaction-err.patch
author Shawn Walker-Salas <shawn.walker@oracle.com>
Thu, 21 Jan 2016 09:20:59 -0800
changeset 5331 9c955076ffe3
permissions -rw-r--r--
PSARC/2015/203 Google Go version 1.5 21480408 sample-manifest COMPONENT_VERSION transforms cause erroneous results 22297561 we should add Go to userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5331
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     1
From 20a053611b2ac6cdd760fd3d391e4f7ae2d72a77 Mon Sep 17 00:00:00 2001
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     2
From: Michael Hudson-Doyle <[email protected]>
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     3
Date: Fri, 13 Nov 2015 08:55:44 +1300
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     4
Subject: [PATCH 43/63] [release-branch.go1.5] runtime: ignore rt_sigaction
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     5
 error if it is for SIGRTMAX
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     6
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     7
A forward port of https://codereview.appspot.com/124900043/ which somehow
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     8
got lost somewhere.
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     9
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    10
Fixes #13024
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    11
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    12
Change-Id: Iab128899e65c51d90f6704e3e1b2fc9326e3a1c2
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    13
Reviewed-on: https://go-review.googlesource.com/16853
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    14
Reviewed-by: Russ Cox <[email protected]>
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    15
Reviewed-on: https://go-review.googlesource.com/16986
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    16
Run-TryBot: Austin Clements <[email protected]>
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    17
Reviewed-by: Ian Lance Taylor <[email protected]>
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    18
---
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    19
 src/runtime/os1_linux.go | 3 ++-
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    20
 1 file changed, 2 insertions(+), 1 deletion(-)
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    21
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    22
diff --git a/src/runtime/os1_linux.go b/src/runtime/os1_linux.go
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    23
index c23dc30..1cad8f7 100644
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    24
--- a/src/runtime/os1_linux.go
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    25
+++ b/src/runtime/os1_linux.go
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    26
@@ -293,7 +293,8 @@ func setsig(i int32, fn uintptr, restart bool) {
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    27
 		fn = funcPC(sigtramp)
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    28
 	}
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    29
 	sa.sa_handler = fn
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    30
-	if rt_sigaction(uintptr(i), &sa, nil, unsafe.Sizeof(sa.sa_mask)) != 0 {
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    31
+	// Qemu rejects rt_sigaction of SIGRTMAX (64).
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    32
+	if rt_sigaction(uintptr(i), &sa, nil, unsafe.Sizeof(sa.sa_mask)) != 0 && i != 64 {
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    33
 		throw("rt_sigaction failure")
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    34
 	}
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    35
 }
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    36
-- 
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    37
2.6.1
9c955076ffe3 PSARC/2015/203 Google Go version 1.5
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    38