Commit 8881e032 authored by Shenghou Ma's avatar Shenghou Ma

[dev.power64] runtime: ignore rt_sigaction error if it's for SIGRTMAX.

Workaround a qemu linux user space emulation bug.
ref: http://git.qemu.org/?p=qemu.git;a=blob;f=linux-user/signal.c;h=1141054be2170128d6f7a340b41484b49a255936;hb=HEAD#l82

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/124900043
parent 26c9bbf7
...@@ -312,7 +312,8 @@ runtime·setsig(int32 i, GoSighandler *fn, bool restart) ...@@ -312,7 +312,8 @@ runtime·setsig(int32 i, GoSighandler *fn, bool restart)
if(fn == runtime·sighandler) if(fn == runtime·sighandler)
fn = (void*)runtime·sigtramp; fn = (void*)runtime·sigtramp;
sa.sa_handler = fn; sa.sa_handler = fn;
if(runtime·rt_sigaction(i, &sa, nil, sizeof(sa.sa_mask)) != 0) // Qemu rejects rt_sigaction of SIGRTMAX (64).
if(runtime·rt_sigaction(i, &sa, nil, sizeof(sa.sa_mask)) != 0 && i != 64)
runtime·throw("rt_sigaction failure"); runtime·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