mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
4058e117ca
When the crash catcher catch a signal it forks to collect data about its parent. In the process the child reinitialize the log file, which ends up empty.
23 lines
546 B
C++
23 lines
546 B
C++
#ifndef CRASHCATCHER_H
|
|
#define CRASHCATCHER_H
|
|
|
|
#include <string>
|
|
|
|
#if (defined(__APPLE__) || (defined(__linux) && !defined(ANDROID)) || (defined(__unix) && !defined(ANDROID)) || defined(__posix))
|
|
#define USE_CRASH_CATCHER 1
|
|
#else
|
|
#define USE_CRASH_CATCHER 0
|
|
#endif
|
|
|
|
constexpr char crash_switch[] = "--cc-handle-crash";
|
|
|
|
#if USE_CRASH_CATCHER
|
|
extern void crashCatcherInstall(int argc, char **argv, const std::string &crashLogPath);
|
|
#else
|
|
inline void crashCatcherInstall(int, char **, const std::string &crashLogPath)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif
|