You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-09-06 22:06:40 +03:00
MCOL-1085 Add crash dump to daemons
This patch adds an automated crash dump which logs in /var/log/mariadb/columnstore/trace/ when one of the ColumnStore daemons crashes.
This commit is contained in:
@@ -26,6 +26,8 @@ namespace bi=boost::interprocess;
|
||||
|
||||
#include "IDBPolicy.h"
|
||||
|
||||
#include "crashtrace.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace messageqcpp;
|
||||
using namespace processmonitor;
|
||||
@@ -75,6 +77,14 @@ int main(int argc, char **argv)
|
||||
setuid(0); // set effective ID to root; ignore return status
|
||||
#endif
|
||||
|
||||
struct sigaction ign;
|
||||
|
||||
memset(&ign, 0, sizeof(ign));
|
||||
ign.sa_handler = fatalHandler;
|
||||
sigaction(SIGSEGV, &ign, 0);
|
||||
sigaction(SIGABRT, &ign, 0);
|
||||
sigaction(SIGFPE, &ign, 0);
|
||||
|
||||
if (argc > 1 && string(argv[1]) == "--daemon")
|
||||
{
|
||||
if (fork() != 0) return 0;
|
||||
|
Reference in New Issue
Block a user