diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8c9dbc1..2d14e1c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -36,7 +36,6 @@ set(SOURCES anbox/daemon.cpp anbox/config.cpp anbox/not_reachable.cpp - anbox/pid_persister.cpp anbox/namespace_attacher.cpp anbox/container.cpp anbox/container_connector.cpp diff --git a/src/anbox/pid_persister.cpp b/src/anbox/pid_persister.cpp deleted file mode 100644 index c56ca27..0000000 --- a/src/anbox/pid_persister.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2016 Simon Fels - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 3, as published - * by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranties of - * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - * - */ - -#include - -#include - -#include "anbox/config.h" -#include "anbox/utils.h" -#include "anbox/pid_persister.h" - -namespace fs = boost::filesystem; - -namespace anbox { - -PidPersister::PidPersister() : - path_(utils::string_format("%s/pid", config::data_path())) { - if (fs::exists(fs::path(path_))) - std::remove(path_.c_str()); - - std::ofstream file; - file.open(path_); - file << getpid(); - file.close(); -} - -PidPersister::~PidPersister() { - std::remove(path_.c_str()); -} - -} // namespace anbox diff --git a/src/anbox/pid_persister.h b/src/anbox/pid_persister.h deleted file mode 100644 index fc7cfda..0000000 --- a/src/anbox/pid_persister.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2016 Simon Fels - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 3, as published - * by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranties of - * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - * - */ - -#ifndef ANBOX_PID_PERSISTER_H_ -#define ANBOX_PID_PERSISTER_H_ - -#include - -namespace anbox { -class PidPersister { -public: - PidPersister(); - ~PidPersister(); - -private: - std::string path_; -}; -} // namespace anbox - -#endif