Backward: Also print stack trace to OpenClonk.log

People usually send the log file when something is wrong, so it's a good
thing to actually have relevant information about the crash there.
alut-include-path
Lukas Werling 2017-03-21 18:48:01 +01:00
parent 19b00b7862
commit b9a4345071
1 changed files with 8 additions and 0 deletions

View File

@ -1955,6 +1955,14 @@ private:
printer.address = true;
printer.print(st, stderr);
// OpenClonk modification: also print to the log file
if (GetLogFD() > -1)
{
auto f = fdopen(GetLogFD(), "ab");
printer.print(st, f);
fclose(f);
}
#if _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L
psiginfo(info, 0);
#endif