(If the mask size is wrong the system call fails.)
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
7305097
// under nohup and do not set explicit handler.
if(i == SIGHUP) {
runtime·memclr((byte*)&sa, sizeof sa);
- runtime·rt_sigaction(i, nil, &sa, sizeof(sa.sa_mask));
+ if(runtime·rt_sigaction(i, nil, &sa, sizeof(sa.sa_mask)) != 0)
+ runtime·throw("rt_sigaction read failure");
if(sa.k_sa_handler == SIG_IGN)
return;
}
// under nohup and do not set explicit handler.
if(i == SIGHUP) {
runtime·memclr((byte*)&sa, sizeof sa);
- runtime·rt_sigaction(i, nil, &sa, sizeof(sa.sa_mask));
+ if(runtime·rt_sigaction(i, nil, &sa, sizeof(sa.sa_mask)) != 0)
+ runtime·throw("rt_sigaction read failure");
if(sa.sa_handler == SIG_IGN)
return;
}