From 28ab2c446fba4980a8295d59fdf203a028a35dd6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 17 Jul 2020 22:35:36 +0200 Subject: avoid boolean flag in GNUNET_OS_start_process() API (fixes #6188) --- src/arm/gnunet-service-arm.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'src/arm/gnunet-service-arm.c') diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index 5efd8b72b..00b6e7196 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c @@ -858,8 +858,9 @@ start_process (struct ServiceList *sl, * of ''-quoted strings, escaping should be considered. */ if (NULL != options) options = GNUNET_CONFIGURATION_expand_dollar (cfg, options); - sl->proc = GNUNET_OS_start_process_s (sl->pipe_control, - GNUNET_OS_INHERIT_STD_OUT_AND_ERR, + sl->proc = GNUNET_OS_start_process_s (sl->pipe_control + ? GNUNET_OS_INHERIT_STD_OUT_AND_ERR | GNUNET_OS_USE_PIPE_CONTROL + : GNUNET_OS_INHERIT_STD_OUT_AND_ERR, lsocks, loprefix, quotedbinary, @@ -880,8 +881,9 @@ start_process (struct ServiceList *sl, if (GNUNET_YES == use_debug) { if (NULL == sl->config) - sl->proc = GNUNET_OS_start_process_s (sl->pipe_control, - GNUNET_OS_INHERIT_STD_OUT_AND_ERR, + sl->proc = GNUNET_OS_start_process_s (sl->pipe_control + ? GNUNET_OS_INHERIT_STD_OUT_AND_ERR | GNUNET_OS_USE_PIPE_CONTROL + : GNUNET_OS_INHERIT_STD_OUT_AND_ERR, lsocks, loprefix, quotedbinary, @@ -890,8 +892,9 @@ start_process (struct ServiceList *sl, options, NULL); else - sl->proc = GNUNET_OS_start_process_s (sl->pipe_control, - GNUNET_OS_INHERIT_STD_OUT_AND_ERR, + sl->proc = GNUNET_OS_start_process_s (sl->pipe_control + ? GNUNET_OS_INHERIT_STD_OUT_AND_ERR | GNUNET_OS_USE_PIPE_CONTROL + : GNUNET_OS_INHERIT_STD_OUT_AND_ERR, lsocks, loprefix, quotedbinary, @@ -905,16 +908,18 @@ start_process (struct ServiceList *sl, else { if (NULL == sl->config) - sl->proc = GNUNET_OS_start_process_s (sl->pipe_control, - GNUNET_OS_INHERIT_STD_OUT_AND_ERR, + sl->proc = GNUNET_OS_start_process_s (sl->pipe_control + ? GNUNET_OS_INHERIT_STD_OUT_AND_ERR | GNUNET_OS_USE_PIPE_CONTROL + : GNUNET_OS_INHERIT_STD_OUT_AND_ERR, lsocks, loprefix, quotedbinary, options, NULL); else - sl->proc = GNUNET_OS_start_process_s (sl->pipe_control, - GNUNET_OS_INHERIT_STD_OUT_AND_ERR, + sl->proc = GNUNET_OS_start_process_s (sl->pipe_control + ? GNUNET_OS_INHERIT_STD_OUT_AND_ERR | GNUNET_OS_USE_PIPE_CONTROL + : GNUNET_OS_INHERIT_STD_OUT_AND_ERR, lsocks, loprefix, quotedbinary, -- cgit v1.2.3