mirror of
https://github.com/rui314/mold.git
synced 2024-10-26 13:10:46 +03:00
Re-throw a signal
Previously, mold exists silently when it gets killed by SIGSEGV. This change makes it verbose; now the parent process would report an error.
This commit is contained in:
parent
c85dd8881b
commit
c4b69a1077
@ -130,6 +130,7 @@ static void sighandler(int signo, siginfo_t *info, void *ucontext) {
|
||||
static std::mutex mu;
|
||||
std::scoped_lock lock{mu};
|
||||
|
||||
// Handle disk full error
|
||||
switch (signo) {
|
||||
case SIGSEGV:
|
||||
case SIGBUS:
|
||||
@ -145,7 +146,12 @@ static void sighandler(int signo, siginfo_t *info, void *ucontext) {
|
||||
}
|
||||
}
|
||||
|
||||
_exit(1);
|
||||
// Re-throw the signal
|
||||
signal(SIGSEGV, SIG_DFL);
|
||||
signal(SIGBUS, SIG_DFL);
|
||||
signal(SIGABRT, SIG_DFL);
|
||||
|
||||
raise(signo);
|
||||
}
|
||||
|
||||
void install_signal_handler() {
|
||||
|
Loading…
Reference in New Issue
Block a user