Drop old pid persister code
This commit is contained in:
parent
92bb3ca79f
commit
7fb7b1c066
3 changed files with 0 additions and 80 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2016 Simon Fels <morphis@gravedo.de>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#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
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2016 Simon Fels <morphis@gravedo.de>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ANBOX_PID_PERSISTER_H_
|
||||
#define ANBOX_PID_PERSISTER_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace anbox {
|
||||
class PidPersister {
|
||||
public:
|
||||
PidPersister();
|
||||
~PidPersister();
|
||||
|
||||
private:
|
||||
std::string path_;
|
||||
};
|
||||
} // namespace anbox
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue