]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: ignore rt_sigaction error if it is for SIGRTMAX
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Thu, 12 Nov 2015 19:55:44 +0000 (08:55 +1300)
committerRuss Cox <rsc@golang.org>
Thu, 12 Nov 2015 20:05:49 +0000 (20:05 +0000)
A forward port of https://codereview.appspot.com/124900043/ which somehow
got lost somewhere.

Fixes #13024

Change-Id: Iab128899e65c51d90f6704e3e1b2fc9326e3a1c2
Reviewed-on: https://go-review.googlesource.com/16853
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/os1_linux.go

index d59ca3915efa8773440deb32495c295ec9d1852b..aa62faa0f1d0beb0f9c2f1bf5d624a74ad9265d8 100644 (file)
@@ -293,7 +293,8 @@ func setsig(i int32, fn uintptr, restart bool) {
                fn = funcPC(sigtramp)
        }
        sa.sa_handler = fn
-       if rt_sigaction(uintptr(i), &sa, nil, unsafe.Sizeof(sa.sa_mask)) != 0 {
+       // Qemu rejects rt_sigaction of SIGRTMAX (64).
+       if rt_sigaction(uintptr(i), &sa, nil, unsafe.Sizeof(sa.sa_mask)) != 0 && i != 64 {
                throw("rt_sigaction failure")
        }
 }