]> granicus.if.org Git - pdns/commitdiff
prevent crash after --list-modules
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 9 May 2015 11:57:19 +0000 (13:57 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 9 May 2015 11:57:19 +0000 (13:57 +0200)
Probably caused by calls to destructors in dynamically loaded libraries. Just stop calling them.

(cherry picked from commit 44ac5977adaf092d10ae5ce3df572ff9c06e71cf)

pdns/receiver.cc

index 8387f88769fc555b856d31cb4ccf7706a50ee13d..a2f559165dfc57280c3ed7fa14eb995967fa2958 100644 (file)
@@ -503,11 +503,11 @@ int main(int argc, char **argv)
 
     if(::arg().mustDo("list-modules")) {
       vector<string>modules=BackendMakers().getModules();
-      cerr<<"Modules available:"<<endl;
+      cout<<"Modules available:"<<endl;
       for(vector<string>::const_iterator i=modules.begin();i!=modules.end();++i)
         cout<<*i<<endl;
 
-      exit(99);
+      _exit(99);
     }
 
     if(!::arg().asNum("local-port")) {