]> granicus.if.org Git - icinga2/blobdiff - lib/base/application.cpp
Remove unused includes
[icinga2] / lib / base / application.cpp
index b06709d3e1c4cbeab7ba35785827d01c32025b80..573b92b3b15a06531476cb4c5190d8b6b79bade5 100644 (file)
@@ -31,8 +31,6 @@
 #include "base/convert.hpp"
 #include "base/scriptglobal.hpp"
 #include "base/process.hpp"
-#include <boost/algorithm/string/classification.hpp>
-#include <boost/algorithm/string/split.hpp>
 #include <boost/algorithm/string/trim.hpp>
 #include <boost/exception/errinfo_api_function.hpp>
 #include <boost/exception/errinfo_errno.hpp>
@@ -508,8 +506,7 @@ String Application::GetExePath(const String& argv0)
        if (!foundSlash) {
                const char *pathEnv = getenv("PATH");
                if (pathEnv) {
-                       std::vector<String> paths;
-                       boost::algorithm::split(paths, pathEnv, boost::is_any_of(":"));
+                       std::vector<String> paths = String(pathEnv).Split(":");
 
                        bool foundPath = false;
                        for (const String& path : paths) {
@@ -1018,6 +1015,11 @@ int Application::Run()
        return Main();
 }
 
+void Application::UpdatePidFile(const String& filename)
+{
+       UpdatePidFile(filename, Utility::GetPid());
+}
+
 /**
  * Grabs the PID file lock and updates the PID. Terminates the application
  * if the PID file is already locked by another instance of the application.