Skip to content

Commit

Permalink
Fix disable_watcher flag
Browse files Browse the repository at this point in the history
Summary:
Working to offering thrift service validating queries. It will be used by query canary service and helldriver.

For that, I need to execute osqueryd -S with the given query. However, osqueryd -S (with extension) crashes while it exits. I can filter out crash output, but it means, I will not be able to catch if query really crashes the osqueryd.

I also don't want to really fix osquery watcher, as we have the watcher 2.0 as an intern project.

Fixing the current problem by stopping osquery to ignore FLAGS_disable_watchdog flag when extension is avaliable.

Reviewed By: marekcirkos

Differential Revision: D14577520

fbshipit-source-id: 588c31319b875b8af9d73da6d691f22bcfdb8fc9
  • Loading branch information
George Guliashvili authored and facebook-github-bot committed Mar 22, 2019
1 parent 645e253 commit 08dc11b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion osquery/core/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ void Initializer::initWatcher() const {

// Add a watcher service thread to start/watch an optional worker and list
// of optional extensions from the autoload paths.
if (Watcher::get().hasManagedExtensions() || !FLAGS_disable_watchdog) {
if (!FLAGS_disable_watchdog) {
Dispatcher::addService(
std::make_shared<WatcherRunner>(*argc_, *argv_, isWatcher()));
}
Expand Down

0 comments on commit 08dc11b

Please sign in to comment.