fix: Flush log on sigterm

main
Sean McBride 4 years ago
parent ad3ea2f0ac
commit 8dd53dfd96

@ -182,9 +182,18 @@ runtime_start_runtime_worker_threads()
debuglog("Sandboxing environment ready!\n");
}
void
runtime_cleanup()
{
if (runtime_sandbox_perf_log != NULL) fflush(runtime_sandbox_perf_log);
exit(EXIT_SUCCESS);
}
void
runtime_configure()
{
signal(SIGTERM, runtime_cleanup);
/* Scheduler Policy */
char *scheduler_policy = getenv("SLEDGE_SCHEDULER");
if (scheduler_policy == NULL) scheduler_policy = "FIFO";

Loading…
Cancel
Save