summaryrefslogtreecommitdiffhomepage
path: root/tests/fastcgiprocess.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-01-12 20:00:40 +0100
committerRoland Reichwein <mail@reichwein.it>2023-01-12 20:00:40 +0100
commit702d32b41c1c4f496dba046c2017cb5b907e55cd (patch)
tree271a48cc1dc9ef1d2fcc846ed4bebbcdd24242e2 /tests/fastcgiprocess.h
parent124646fe2a31b7211d12fb043fcb760cbe7313b0 (diff)
FCGI test
Diffstat (limited to 'tests/fastcgiprocess.h')
-rw-r--r--tests/fastcgiprocess.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/fastcgiprocess.h b/tests/fastcgiprocess.h
new file mode 100644
index 0000000..ce7bf74
--- /dev/null
+++ b/tests/fastcgiprocess.h
@@ -0,0 +1,28 @@
+#pragma once
+
+#include <filesystem>
+#include <string>
+
+#include <ext/stdio_filebuf.h>
+#include <signal.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+
+class FastCGIProcess
+{
+public:
+ FastCGIProcess(const std::filesystem::path& path, const std::string& host, unsigned short port);
+ ~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;
+};