mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1043112 - Allow b2g to core dump when signal permits. r=jld
This commit is contained in:
parent
6dcf37294c
commit
85ae2e3a88
@ -34,6 +34,10 @@
|
||||
#include <rmsdef.h>
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_B2G) && !defined(MOZ_CRASHREPORTER)
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
|
||||
// **********************************************************************
|
||||
// class nsProfileLock
|
||||
//
|
||||
@ -192,6 +196,27 @@ void nsProfileLock::FatalSignalHandler(int signo
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
switch (signo) {
|
||||
case SIGQUIT:
|
||||
case SIGILL:
|
||||
case SIGABRT:
|
||||
case SIGSEGV:
|
||||
#ifndef MOZ_CRASHREPORTER
|
||||
// Retrigger the signal for those that can generate a core dump
|
||||
signal(signo, SIG_DFL);
|
||||
if (info->si_code <= 0) {
|
||||
if (syscall(__NR_tgkill, getpid(), syscall(__NR_gettid), signo) < 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Backstop exit call, just in case.
|
||||
_exit(signo);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user