Loading src/confhelper.cpp +4 −2 Changes for src/confhelper.cpp: 4 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -863,6 +863,7 @@ namespace fenrirds::confhelper { << " (config changes disabled)" << std::endl; return; } pid_t helperPid = getpid(); pid_t pid = fork(); if (pid < 0) { std::cerr << "[CONFHELPER] fork failed: " << strerror(errno) Loading @@ -877,9 +878,10 @@ namespace fenrirds::confhelper { } ::close(sv[0]); #ifdef __linux__ /* the server must not outlive the helper that would restart it */ /* the server must not outlive the helper that would restart it; compare * with the helper's pid, not 1: in a container the helper is pid 1 */ prctl(PR_SET_PDEATHSIG, SIGTERM); if (getppid() == 1) if (getppid() != helperPid) _exit(1); #endif struct timeval tv = { 30, 0 }; Loading Loading
src/confhelper.cpp +4 −2 Changes for src/confhelper.cpp: 4 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -863,6 +863,7 @@ namespace fenrirds::confhelper { << " (config changes disabled)" << std::endl; return; } pid_t helperPid = getpid(); pid_t pid = fork(); if (pid < 0) { std::cerr << "[CONFHELPER] fork failed: " << strerror(errno) Loading @@ -877,9 +878,10 @@ namespace fenrirds::confhelper { } ::close(sv[0]); #ifdef __linux__ /* the server must not outlive the helper that would restart it */ /* the server must not outlive the helper that would restart it; compare * with the helper's pid, not 1: in a container the helper is pid 1 */ prctl(PR_SET_PDEATHSIG, SIGTERM); if (getppid() == 1) if (getppid() != helperPid) _exit(1); #endif struct timeval tv = { 30, 0 }; Loading