Commit d1067508 authored by Michael Hudson-Doyle's avatar Michael Hudson-Doyle Committed by Russ Cox

runtime: ignore rt_sigaction error if it is for SIGRTMAX

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/16853Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
parent d9588812
......@@ -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")
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment