diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-07-18 00:44:39 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-07-18 00:44:39 +0200 |
commit | 7f4ddbcab8598e3d5e29c23ce883cdfa664408f1 (patch) | |
tree | 5f1b18463f641f24fad519e0aefb60b97d707b52 /src/arm | |
parent | 28ab2c446fba4980a8295d59fdf203a028a35dd6 (diff) | |
download | gnunet-7f4ddbcab8598e3d5e29c23ce883cdfa664408f1.tar.gz gnunet-7f4ddbcab8598e3d5e29c23ce883cdfa664408f1.zip |
merge flags into enum for GNUNET_DISK_pipe() API, fixing #6188
Diffstat (limited to 'src/arm')
-rw-r--r-- | src/arm/arm_api.c | 5 | ||||
-rw-r--r-- | src/arm/gnunet-service-arm.c | 33 |
2 files changed, 24 insertions, 14 deletions
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c index dea7a70be..899b6f152 100644 --- a/src/arm/arm_api.c +++ b/src/arm/arm_api.c | |||
@@ -972,10 +972,7 @@ GNUNET_ARM_request_service_start (struct GNUNET_ARM_Handle *h, | |||
972 | the above check should catch 99.99% of the cases where ARM | 972 | the above check should catch 99.99% of the cases where ARM |
973 | is already running. */LOG (GNUNET_ERROR_TYPE_DEBUG, | 973 | is already running. */LOG (GNUNET_ERROR_TYPE_DEBUG, |
974 | "Starting ARM service\n"); | 974 | "Starting ARM service\n"); |
975 | if (NULL == (sig = GNUNET_DISK_pipe (GNUNET_NO, | 975 | if (NULL == (sig = GNUNET_DISK_pipe (GNUNET_DISK_PF_NONE))) |
976 | GNUNET_NO, | ||
977 | GNUNET_NO, | ||
978 | GNUNET_YES))) | ||
979 | { | 976 | { |
980 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, | 977 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, |
981 | "pipe"); | 978 | "pipe"); |
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index 00b6e7196..263c99cc4 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c | |||
@@ -859,7 +859,8 @@ start_process (struct ServiceList *sl, | |||
859 | if (NULL != options) | 859 | if (NULL != options) |
860 | options = GNUNET_CONFIGURATION_expand_dollar (cfg, options); | 860 | options = GNUNET_CONFIGURATION_expand_dollar (cfg, options); |
861 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control | 861 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control |
862 | ? GNUNET_OS_INHERIT_STD_OUT_AND_ERR | GNUNET_OS_USE_PIPE_CONTROL | 862 | ? GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
863 | | GNUNET_OS_USE_PIPE_CONTROL | ||
863 | : GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 864 | : GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
864 | lsocks, | 865 | lsocks, |
865 | loprefix, | 866 | loprefix, |
@@ -882,8 +883,11 @@ start_process (struct ServiceList *sl, | |||
882 | { | 883 | { |
883 | if (NULL == sl->config) | 884 | if (NULL == sl->config) |
884 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control | 885 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control |
885 | ? GNUNET_OS_INHERIT_STD_OUT_AND_ERR | GNUNET_OS_USE_PIPE_CONTROL | 886 | ? |
886 | : GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 887 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
888 | | GNUNET_OS_USE_PIPE_CONTROL | ||
889 | : | ||
890 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | ||
887 | lsocks, | 891 | lsocks, |
888 | loprefix, | 892 | loprefix, |
889 | quotedbinary, | 893 | quotedbinary, |
@@ -893,8 +897,11 @@ start_process (struct ServiceList *sl, | |||
893 | NULL); | 897 | NULL); |
894 | else | 898 | else |
895 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control | 899 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control |
896 | ? GNUNET_OS_INHERIT_STD_OUT_AND_ERR | GNUNET_OS_USE_PIPE_CONTROL | 900 | ? |
897 | : GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 901 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
902 | | GNUNET_OS_USE_PIPE_CONTROL | ||
903 | : | ||
904 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | ||
898 | lsocks, | 905 | lsocks, |
899 | loprefix, | 906 | loprefix, |
900 | quotedbinary, | 907 | quotedbinary, |
@@ -909,8 +916,11 @@ start_process (struct ServiceList *sl, | |||
909 | { | 916 | { |
910 | if (NULL == sl->config) | 917 | if (NULL == sl->config) |
911 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control | 918 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control |
912 | ? GNUNET_OS_INHERIT_STD_OUT_AND_ERR | GNUNET_OS_USE_PIPE_CONTROL | 919 | ? |
913 | : GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 920 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
921 | | GNUNET_OS_USE_PIPE_CONTROL | ||
922 | : | ||
923 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | ||
914 | lsocks, | 924 | lsocks, |
915 | loprefix, | 925 | loprefix, |
916 | quotedbinary, | 926 | quotedbinary, |
@@ -918,8 +928,11 @@ start_process (struct ServiceList *sl, | |||
918 | NULL); | 928 | NULL); |
919 | else | 929 | else |
920 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control | 930 | sl->proc = GNUNET_OS_start_process_s (sl->pipe_control |
921 | ? GNUNET_OS_INHERIT_STD_OUT_AND_ERR | GNUNET_OS_USE_PIPE_CONTROL | 931 | ? |
922 | : GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 932 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR |
933 | | GNUNET_OS_USE_PIPE_CONTROL | ||
934 | : | ||
935 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | ||
923 | lsocks, | 936 | lsocks, |
924 | loprefix, | 937 | loprefix, |
925 | quotedbinary, | 938 | quotedbinary, |
@@ -2157,7 +2170,7 @@ main (int argc, char *const *argv) | |||
2157 | GNUNET_MQ_handler_end () | 2170 | GNUNET_MQ_handler_end () |
2158 | }; | 2171 | }; |
2159 | 2172 | ||
2160 | sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, GNUNET_NO, GNUNET_NO); | 2173 | sigpipe = GNUNET_DISK_pipe (GNUNET_DISK_PF_NONE); |
2161 | GNUNET_assert (NULL != sigpipe); | 2174 | GNUNET_assert (NULL != sigpipe); |
2162 | shc_chld = | 2175 | shc_chld = |
2163 | GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, | 2176 | GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, |