summaryrefslogtreecommitdiffstats
path: root/src/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-01-09 15:59:15 +0000
committerRoy Marples <roy@marples.name>2020-01-09 15:59:15 +0000
commit18e47d827e4ab22d3c2c21fed33592944cdf6b58 (patch)
tree9912c83d01e3dc759125da8d7c37d50324f66f1f /src/dhcpcd.c
parent200f96bf5d4455e32b64b57870300eac955a047f (diff)
downloaddhcpcd-18e47d827e4ab22d3c2c21fed33592944cdf6b58.tar.xz
control: avoid unlinking the socket when sending commands
Diffstat (limited to 'src/dhcpcd.c')
-rw-r--r--src/dhcpcd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c
index 13376b92..85af5494 100644
--- a/src/dhcpcd.c
+++ b/src/dhcpcd.c
@@ -1910,6 +1910,7 @@ printpidfile:
!(ctx.options & DHCPCD_TEST))
{
#endif
+ ctx.options |= DHCPCD_FORKED; /* avoid socket unlink */
if (!(ctx.options & DHCPCD_MASTER))
ctx.control_fd = control_open(argv[optind]);
if (ctx.control_fd == -1)
@@ -1928,6 +1929,7 @@ printpidfile:
if (errno != ENOENT)
logerr("%s: control_open", __func__);
}
+ ctx.options &= ~DHCPCD_FORKED;
#ifdef USE_SIGNALS
}
#endif