Skip to content

Commit

Permalink
Flush console buffer during ungraceful exit
Browse files Browse the repository at this point in the history
  • Loading branch information
srajaa committed Nov 28, 2022
1 parent 0ad5bff commit 8a2653f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions osquery/core/init.cpp
Expand Up @@ -684,6 +684,7 @@ class AlarmRunnable : public InterruptibleRunnable {
std::this_thread::sleep_for(std::chrono::milliseconds(200));
waited += 200;
if (waited > FLAGS_alarm_timeout * 1000) {
fflush(stdout);
Initializer::shutdownNow(EXIT_CATASTROPHIC);
}
}
Expand Down

0 comments on commit 8a2653f

Please sign in to comment.