From d14582a1d92e036780166a0b5ec0494d7353cc75 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 13 Jan 2023 16:20:42 +0100 Subject: Implemented and tested managed FCGI application start, separated out process check functions to libreichwein --- plugins/fcgi/fastcgiprocess.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 plugins/fcgi/fastcgiprocess.h (limited to 'plugins/fcgi/fastcgiprocess.h') diff --git a/plugins/fcgi/fastcgiprocess.h b/plugins/fcgi/fastcgiprocess.h new file mode 100644 index 0000000..07b6539 --- /dev/null +++ b/plugins/fcgi/fastcgiprocess.h @@ -0,0 +1,30 @@ +#pragma once + +#include +#include + +#include +#include +#include +#include +#include +#include + +class FastCGIProcess +{ +public: + FastCGIProcess(const std::filesystem::path& exe_path, const std::string& host, unsigned short port); + FastCGIProcess(const std::filesystem::path& exe_path, const std::filesystem::path& socket_path); + ~FastCGIProcess(); + bool is_running(); + +private: + void start(); + void stop(); + + pid_t m_pid{}; + std::string m_command; + std::string m_host; + unsigned short m_port{}; + std::filesystem::path m_socket_path; +}; -- cgit v1.2.3