Skip to content

Commit

Permalink
Flush console buffer during ungraceful exit (#7829)
Browse files Browse the repository at this point in the history
  • Loading branch information
srajaa committed Dec 13, 2022
1 parent aaf2853 commit f9a16e1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions osquery/core/init.cpp
Expand Up @@ -822,6 +822,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 f9a16e1

Please sign in to comment.