#pragma once #include #include #include #include #include #include #include #include void run_fcgi_app(const std::string& command, const std::string& host, unsigned short port); void run_fcgi_app(const std::string& command, const std::filesystem::path& socket_path); 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; };