File: fatal.cpp

package info (click to toggle)
mariadb 1%3A11.8.5-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 775,092 kB
  • sloc: ansic: 2,415,406; cpp: 1,796,627; asm: 381,336; perl: 62,933; sh: 50,567; pascal: 40,908; java: 39,363; python: 25,814; yacc: 20,444; sql: 17,907; xml: 12,354; ruby: 8,544; cs: 6,542; makefile: 6,146; ada: 1,879; lex: 1,194; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (29 lines) | stat: -rw-r--r-- 477 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

// vim:sw=2:ai

/*
 * Copyright (C) 2010 DeNA Co.,Ltd.. All rights reserved.
 * See COPYRIGHT.txt for details.
 */

#include <stdlib.h>
#include <stdio.h>
#include <syslog.h>
#include <unistd.h>

#include "fatal.hpp"

namespace dena {

const int opt_syslog = LOG_ERR | LOG_PID | LOG_CONS;

void
fatal_abort(const std::string& message)
{
  fprintf(stderr, "FATAL_COREDUMP: %s\n", message.c_str());
  syslog(opt_syslog, "FATAL_COREDUMP: %s", message.c_str());
  abort();
}

};