]>
git.ipfire.org Git - thirdparty/kea.git/commit
[3769] Added support for creating PIDFiles to dhcpsrv::Daemon
src/lib/dhcpsrv/daemon.h/cc
New methods:
static void setConfigFile(const std::string& config_file);
std::string getProcName() const;
setProcName(const std::string& proc_name);
std::string getPIDFileDir() const;
void setPIDFileDir(const std::string& pid_file_dir);
std::string getPIDFileName() const;
void setPIDFileName(const std::string& pid_file_name);
void createPIDFile(int pid = 0);
std::string makePIDFileName() const;
New members:
std::string proc_name_;
std::string pid_file_dir_;
isc::util::PIDFilePtr pid_file_;
src/lib/dhcpsrv/tests/daemon_unittest.cc
New tests:
TEST_F(DaemonTest, getSetConfigFile)
TEST_F(DaemonTest, getSetProcName)
TEST_F(DaemonTest, getSetPIDFileDir)
TEST_F(DaemonTest, setPIDFileName)
TEST_F(DaemonTest, makePIDFileName)
TEST_F(DaemonTest, createPIDFile)
TEST_F(DaemonTest, createPIDFileOverwrite)
TEST_F(DaemonTest, PIDFileCleanup)
src/lib/util/pid_file.h
Added typedef boost::shared_ptr<PIDFile> PIDFilePtr;