int retval = 0;
struct fd_list *l;
+ if (ctx->options & DHCPCD_FORKED)
+ return 0;
+
if (ctx->control_fd != -1) {
eloop_event_delete(ctx->eloop, ctx->control_fd);
close(ctx->control_fd);
!(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)
if (errno != ENOENT)
logerr("%s: control_open", __func__);
}
+ ctx.options &= ~DHCPCD_FORKED;
#ifdef USE_SIGNALS
}
#endif