diff --git a/test/headless.cpp b/test/headless.cpp index ef3e785cc..680f51aeb 100644 --- a/test/headless.cpp +++ b/test/headless.cpp @@ -17,6 +17,9 @@ #include #include #include +#ifdef __linux__ +#include +#endif std::string base_directory; @@ -37,6 +40,9 @@ public: if (pid < 0) { throw std::runtime_error("Cannot create web server"); } else if (pid == 0) { +#ifdef __linux__ + prctl(PR_SET_PDEATHSIG, SIGHUP); +#endif const auto executable = base_directory + "bin/server.py"; const char *port = "2900"; char *arg[] = { const_cast(executable.c_str()), const_cast(port), nullptr };