summaryrefslogtreecommitdiffhomepage
path: root/tests/webserverprocess.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/webserverprocess.h')
-rw-r--r--tests/webserverprocess.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/webserverprocess.h b/tests/webserverprocess.h
new file mode 100644
index 0000000..5593c70
--- /dev/null
+++ b/tests/webserverprocess.h
@@ -0,0 +1,30 @@
+#pragma once
+
+#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 WebserverProcess
+{
+private:
+ void init(const std::string& config);
+public:
+ WebserverProcess(const std::string& config);
+ WebserverProcess();
+ ~WebserverProcess();
+ void start();
+ void stop();
+ bool is_running();
+ std::string output();
+
+private:
+ pid_t m_pid;
+ std::string m_config;
+
+}; // class WebserverProcess
+