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>
This commit is contained in:
parent
0e67ee55bd
commit
e7156e78b8
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ void install_segv_handler(void)
|
||||||
{
|
{
|
||||||
struct sigaction new_action;
|
struct sigaction new_action;
|
||||||
new_action.sa_handler = segv_handler;
|
new_action.sa_handler = segv_handler;
|
||||||
sigemptyset(&new_action.sa_mask);
|
sigfillset(&new_action.sa_mask);
|
||||||
new_action.sa_flags = SA_RESTART;
|
new_action.sa_flags = SA_RESTART;
|
||||||
sigaction(SIGSEGV, &new_action, NULL);
|
sigaction(SIGSEGV, &new_action, NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue