summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2019-06-08 06:12:16 +0200
committerAllan McRae <allan@archlinux.org>2019-08-05 10:10:31 +0200
commite7156e78b80899a1f434d65e558e0d9471828928 (patch)
treeacc2d3af9520a7cbc052502960fe522f97b9e071 /src
parent0e67ee55bd0f41ed8f62cc574c03ee27625be317 (diff)
downloadpacman-e7156e78b80899a1f434d65e558e0d9471828928.tar.gz
pacman-e7156e78b80899a1f434d65e558e0d9471828928.tar.xz
sighandler: block signals while handling SIGSEGV
If we get SIGSEGV we need to bail out quickly, leaving other signals unblocked could lead to other signal handlers getting triggered. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/sighandler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pacman/sighandler.c b/src/pacman/sighandler.c
index ebcdebae..a4849a0c 100644
--- a/src/pacman/sighandler.c
+++ b/src/pacman/sighandler.c
@@ -96,7 +96,7 @@ void install_segv_handler(void)
{
struct sigaction new_action;
new_action.sa_handler = segv_handler;
- sigemptyset(&new_action.sa_mask);
+ sigfillset(&new_action.sa_mask);
new_action.sa_flags = SA_RESTART;
sigaction(SIGSEGV, &new_action, NULL);
}