Commit cdce7325 authored by Devon H. O'Dell's avatar Devon H. O'Dell Committed by Russ Cox

When SA_SIGINFO is set, we should use __sa_sigaction on FreeBSD

R=rsc
CC=golang-dev
https://golang.org/cl/165097
parent b73b43ea
......@@ -92,9 +92,9 @@ initsig(void)
for(i = 0; i < NSIG; i++) {
if(sigtab[i].flags) {
if(sigtab[i].flags & SigCatch)
sa.__sigaction_u.__sa_handler = (void*) sigtramp;
sa.__sigaction_u.__sa_sigaction = (void*) sigtramp;
else
sa.__sigaction_u.__sa_handler = (void*) sigignore;
sa.__sigaction_u.__sa_sigaction = (void*) sigignore;
if(sigtab[i].flags & SigRestart)
sa.sa_flags |= SA_RESTART;
......
......@@ -100,9 +100,9 @@ initsig(void)
for(i = 0; i < NSIG; i++) {
if(sigtab[i].flags) {
if(sigtab[i].flags & SigCatch)
sa.__sigaction_u.__sa_handler = (void*) sigtramp;
sa.__sigaction_u.__sa_sigaction = (void*) sigtramp;
else
sa.__sigaction_u.__sa_handler = (void*) sigignore;
sa.__sigaction_u.__sa_sigaction = (void*) sigignore;
if(sigtab[i].flags & SigRestart)
sa.sa_flags |= SA_RESTART;
......
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