mirror of
https://github.com/systemd/systemd.git
synced 2025-02-09 13:57:42 +03:00
basic: Propagate SIGBUS signal info when re-raising signals
raise() won't propagate the siginfo information of the signal that's re-raised. rt_sigqueueinfo() allows us to provide the original siginfo struct which makes sure it is propagated to the next signal handler (or to the coredump).
This commit is contained in:
parent
db6f9b02a7
commit
647475c7df
@ -7,6 +7,8 @@
|
||||
|
||||
#include "macro.h"
|
||||
#include "memory-util.h"
|
||||
#include "missing_syscall.h"
|
||||
#include "process-util.h"
|
||||
#include "sigbus.h"
|
||||
|
||||
#define SIGBUS_QUEUE_MAX 64
|
||||
@ -88,7 +90,7 @@ static void sigbus_handler(int sn, siginfo_t *si, void *data) {
|
||||
|
||||
if (si->si_code != BUS_ADRERR || !si->si_addr) {
|
||||
assert_se(sigaction(SIGBUS, &old_sigaction, NULL) == 0);
|
||||
raise(SIGBUS);
|
||||
rt_sigqueueinfo(getpid_cached(), SIGBUS, si);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user