forked from Mirrors/openclonk
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
parent
19b00b7862
commit
b9a4345071
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue