aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcjhopman@chromium.org <cjhopman@chromium.org>2015-04-15 22:57:24 +0000
committercjhopman@chromium.org <cjhopman@chromium.org>2015-04-15 22:57:24 +0000
commit751453c3578255e95b7179f0c28d111658079106 (patch)
tree75a89c79cf7ad609bb980ead5a4cc953bda4f83e
parentMIPS64: Initial MIPS64 related change. (diff)
downloadbreakpad-751453c3578255e95b7179f0c28d111658079106.tar.xz
Fix call to rt_sigaction
Despite the fact that many places imply that sigaction and rt_sigaction are essentially the same, rt_sigaction's signature is actually different-- it takes the size of the kernel's sigset_t as an extra argument. BUG=473973 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1447 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r--src/client/linux/handler/exception_handler.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
index 3ddbe662..6a8849df 100644
--- a/src/client/linux/handler/exception_handler.cc
+++ b/src/client/linux/handler/exception_handler.cc
@@ -195,12 +195,12 @@ void InstallDefaultHandler(int sig) {
// to SIG_DFL is ignored. In that case, an infinite loop is entered as the
// signal is repeatedly sent to breakpad's signal handler.
// To work around this, directly call the system's sigaction.
- struct sigaction sa;
+ struct kernel_sigaction sa;
memset(&sa, 0, sizeof(sa));
- sigemptyset(&sa.sa_mask);
- sa.sa_handler = SIG_DFL;
+ sys_sigemptyset(&sa.sa_mask);
+ sa.sa_handler_ = SIG_DFL;
sa.sa_flags = SA_RESTART;
- syscall(__NR_rt_sigaction, sig, &sa, NULL);
+ sys_rt_sigaction(sig, &sa, NULL, sizeof(kernel_sigset_t));
#else
signal(sig, SIG_DFL);
#endif