Skip to content

Commit 20a0536

Browse files
mwhudsonaclements
authored andcommitted
[release-branch.go1.5] 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/16853 Reviewed-by: Russ Cox <[email protected]> Reviewed-on: https://go-review.googlesource.com/16986 Run-TryBot: Austin Clements <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent a8e839b commit 20a0536

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/runtime/os1_linux.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ func setsig(i int32, fn uintptr, restart bool) {
293293
fn = funcPC(sigtramp)
294294
}
295295
sa.sa_handler = fn
296-
if rt_sigaction(uintptr(i), &sa, nil, unsafe.Sizeof(sa.sa_mask)) != 0 {
296+
// Qemu rejects rt_sigaction of SIGRTMAX (64).
297+
if rt_sigaction(uintptr(i), &sa, nil, unsafe.Sizeof(sa.sa_mask)) != 0 && i != 64 {
297298
throw("rt_sigaction failure")
298299
}
299300
}

0 commit comments

Comments
 (0)