mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1043112 - Allow b2g to core dump when signal permits. r=jld
This commit is contained in:
parent
a91b6d1f30
commit
fb1b6957d4
@ -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