Closed RebeccaMahany closed 2 months ago
Relates to https://github.com/kolide/launcher/pull/1692
When we call os.Exit, deferred functions will not execute, which means e.g. the event log writer on windows won't get closed. For a more graceful shutdown, we wrap main as runMain and disallow os.Exit calls outside of the new main.
runMain
os.Exit
main
Relates to https://github.com/kolide/launcher/pull/1692
When we call os.Exit, deferred functions will not execute, which means e.g. the event log writer on windows won't get closed. For a more graceful shutdown, we wrap main as
runMain
and disallowos.Exit
calls outside of the newmain
.