summaryrefslogtreecommitdiffstats
path: root/plugin/firewall/eurephiafw.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/firewall/eurephiafw.c')
-rw-r--r--plugin/firewall/eurephiafw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/firewall/eurephiafw.c b/plugin/firewall/eurephiafw.c
index 6b2bf24..d74a383 100644
--- a/plugin/firewall/eurephiafw.c
+++ b/plugin/firewall/eurephiafw.c
@@ -37,6 +37,7 @@
#include <unistd.h>
#include <sys/mman.h>
#include <sys/wait.h>
+#include <signal.h>
#include <time.h>
#include <errno.h>
#include <assert.h>
@@ -236,8 +237,10 @@ void eFW_StartFirewall(eurephiaCTX *ctx, const int daemon, const int logredir) {
return;
}
+#if HAVE_MADVDONTFORK
// Make sure that these variables are not available in the child
madvise(ctx, sizeof(eurephiaCTX), MADV_DONTFORK);
+#endif
// Start a new process (should run with root permissions) - which will do the firewall work
if( (ctx->fwcfg->fwproc_pid = fork()) < 0 ) {