diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp index 26d05d971..ad834045e 100644 --- a/cli/threadexecutor.cpp +++ b/cli/threadexecutor.cpp @@ -36,6 +36,9 @@ #include #endif #ifdef THREADING_MODEL_FORK +#if defined(__linux__) +#include +#endif #include #include #include @@ -204,6 +207,9 @@ unsigned int ThreadExecutor::check() std::cerr << "#### ThreadExecutor::check, Failed to create child process: "<< std::strerror(errno) << std::endl; std::exit(EXIT_FAILURE); } else if (pid == 0) { +#if defined(__linux__) + prctl(PR_SET_PDEATHSIG, SIGHUP); +#endif close(pipes[0]); mWpipe = pipes[1];