changeset 5373:086c01fecfca draft

dhcpcd: preserve the STARTED option when reloading options This avoids the truncated read when the launcher process exists after the main process handles SIGHUP.
author Roy Marples <roy@marples.name>
date Wed, 17 Jun 2020 11:25:58 +0100
parents a64688cee252
children 24fcb96121cb
files src/dhcpcd.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/dhcpcd.c	Wed Jun 17 09:42:32 2020 +0100
+++ b/src/dhcpcd.c	Wed Jun 17 11:25:58 2020 +0100
@@ -1299,7 +1299,9 @@
 	if ((ifo = read_config(ctx, NULL, NULL, NULL)) == NULL)
 		return;
 	add_options(ctx, NULL, ifo, ctx->argc, ctx->argv);
-	/* We need to preserve these two options. */
+	/* We need to preserve these options. */
+	if (ctx->options & DHCPCD_STARTED)
+		ifo->options |= DHCPCD_STARTED;
 	if (ctx->options & DHCPCD_MASTER)
 		ifo->options |= DHCPCD_MASTER;
 	if (ctx->options & DHCPCD_DAEMONISED)