Skip to content

Commit

Permalink
[release-branch.go1.5] runtime: ignore rt_sigaction error if it is fo…
Browse files Browse the repository at this point in the history
…r 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]>
  • Loading branch information
mwhudson authored and aclements committed Nov 17, 2015
1 parent a8e839b commit 20a0536
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runtime/os1_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
Expand Down

0 comments on commit 20a0536

Please sign in to comment.