From 2d028a0449b4e1e8b1a35ff68f531e5b6ca7c75f Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Thu, 10 Aug 2017 09:34:43 +0200 Subject: Resolver didn't work when it was created before fork() and used after The pipe that resolver sets up to communicate with the threads gets duplicated by the fork() leading to it all breaking down. So make it possible to create a Resolver without actually initializing it so we can do that *after* fork() (fork is called bu daemon()) --- src/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.cc') diff --git a/src/main.cc b/src/main.cc index d03dd45..cd73833 100644 --- a/src/main.cc +++ b/src/main.cc @@ -172,7 +172,7 @@ int main(int argc, char** argv) { auto foreground = config->get("foreground", false); auto cwd = get_cwd(); std::unique_ptr looper(Looper::create()); - std::unique_ptr resolver(Resolver::create(looper.get())); + std::unique_ptr resolver(Resolver::create(looper.get(), true)); std::unique_ptr proxy( Proxy::create(config.get(), cwd, configfile, foreground ? "bogus" : -- cgit v1.2.3-70-g09d2