sigchain: make SIG_DFL handling less broken.
Abort with a message instead of reraising the signal, which will just
reenter the signal handler when we return.
Before the libsigchain rewrite, we would try to call SIG_IGN (i.e. 1)
as a function, with no error reporting, this improves it to an error
message.
Bug: http://b/32631264
Bug: http://b/36262089
Test: none
Change-Id: Ie0ba58b301dea48eaf3223a83883cd4af3d1576f
diff --git a/sigchainlib/sigchain.cc b/sigchainlib/sigchain.cc
index 8509b57..3de5990 100644
--- a/sigchainlib/sigchain.cc
+++ b/sigchainlib/sigchain.cc
@@ -231,7 +231,7 @@
if (handler == SIG_IGN) {
return;
} else if (handler == SIG_DFL) {
- raise(signo);
+ fatal("exiting due to SIG_DFL handler for signal %d", signo);
} else {
handler(signo);
}