flush runtime diagnostics promptly
This commit is contained in:
@@ -1467,6 +1467,10 @@ void init_base_process()
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// systemd connects stdout to a pipe, which otherwise block-buffers child
|
||||
// diagnostics and assigns stale failures a misleading later journal time.
|
||||
setvbuf(stdout, 0, _IOLBF, 0);
|
||||
setvbuf(stderr, 0, _IONBF, 0);
|
||||
// Warm up libgcc's backtrace state so the first in-handler backtrace()
|
||||
// after a fault does not allocate.
|
||||
backtrace(request_fault_frames, 4);
|
||||
|
||||
Reference in New Issue
Block a user