]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
fix crash at exit, fix history appending
authorbert hubert <bert.hubert@netherlabs.nl>
Wed, 25 Feb 2015 21:33:31 +0000 (22:33 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Wed, 25 Feb 2015 21:33:31 +0000 (22:33 +0100)
pdns/dnsdist.cc

index 1f8d51494ebd6ead090e745740d7933cbf07035d..98dbe9fcd7a898c131c26aee3cb666368be4702a 100644 (file)
@@ -981,7 +981,7 @@ try
     while(getline(history, line))
       add_history(line.c_str());
   }
-  ofstream history(".history");
+  ofstream history(".history", std::ios_base::app);
   string lastline;
   for(;;) {
     char* sline = readline("> ");
@@ -996,7 +996,6 @@ try
     }
     lastline=line;
     free(sline);
-
     
     if(line=="quit")
       break;
@@ -1010,7 +1009,7 @@ try
     }
     
   }
-
+  _exit(EXIT_SUCCESS);
   // stattid.join();
 }