osquery-1/osquery/examples
Stefano Bonicatti 62336ee8bb Fix a race condition during the shutdown of the worker process (#5943)
When a thread different from the main requests a shutdown
through Initializer::requestShutdown, it should not call
waitForShutdown; there's no reason to wait, moreover the function
doesn't only wait, but also actually stops other components and then
finally calls exit().

Since the main thread is already inside the waitForShutdown call
waiting on Dispatcher::joinServices or inside the shutdown() callable
on Windows, having a secondary thread do
the same work potentially at the same time is wrong.
Moreover calling exit() from a secondary thread is most of the time
incorrect.

The waitForShutdown function has been renamed to waitThenShutdown
to better represent what it's actually doing.
2019-10-27 17:09:50 -04:00
..
extension_group_example/src Update osquery licensing wording (#5452) 2019-02-19 10:59:48 -08:00
example_extension.cpp Fix a race condition during the shutdown of the worker process (#5943) 2019-10-27 17:09:50 -04:00
example_test.cpp Update osquery licensing wording (#5452) 2019-02-19 10:59:48 -08:00
example_writable_table.cpp Fix a race condition during the shutdown of the worker process (#5943) 2019-10-27 17:09:50 -04:00