summaryrefslogtreecommitdiffstats
path: root/src/privsep-root.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/privsep-root.c')
-rw-r--r--src/privsep-root.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/privsep-root.c b/src/privsep-root.c
index 70c6cf22..cfdcbb2c 100644
--- a/src/privsep-root.c
+++ b/src/privsep-root.c
@@ -853,6 +853,11 @@ int
ps_root_stop(struct dhcpcd_ctx *ctx)
{
+ if (!(ctx->options & DHCPCD_PRIVSEP) ||
+ ctx->options & DHCPCD_FORKED ||
+ ctx->eloop == NULL)
+ return 0;
+
return ps_dostop(ctx, &ctx->ps_root_pid, &ctx->ps_root_fd);
}