fix gnunet-service-arm termination status code
authorChristian Grothoff <christian@grothoff.org>
Sun, 18 Aug 2019 21:40:04 +0000 (23:40 +0200)
committerChristian Grothoff <christian@grothoff.org>
Sun, 18 Aug 2019 21:40:04 +0000 (23:40 +0200)
src/arm/gnunet-service-arm.c
src/util/service.c

index 4e3474cb6558503bc0ffb60a7e87c6d05e5eafe1..4b7cbec20dafbf548e5eaecb37ea1a08c483a2c7 100644 (file)
@@ -2279,15 +2279,16 @@ main (int argc,
   shc_chld =
     GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD,
                                    &sighandler_child_death);
-  if ( GNUNET_OK != GNUNET_SERVICE_run_ (argc,
-                             argv,
-                             "arm",
-                             GNUNET_SERVICE_OPTION_MANUAL_SHUTDOWN,
-                             &run,
-                             &client_connect_cb,
-                             &client_disconnect_cb,
-                             NULL,
-                             handlers))
+  if (0 !=
+      GNUNET_SERVICE_run_ (argc,
+                          argv,
+                          "arm",
+                          GNUNET_SERVICE_OPTION_MANUAL_SHUTDOWN,
+                          &run,
+                          &client_connect_cb,
+                          &client_disconnect_cb,
+                          NULL,
+                          handlers))
     global_ret = 2;
 #if HAVE_WAIT4
   if (NULL != wait_file)
index d03650501cb894dd8374f256f622a8283f85ca65..ba0271a387957af821cc707b226a24a5fffda775 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file util/service_new.c
+ * @file util/service.c
  * @brief functions related to starting services (redesign)
  * @author Christian Grothoff
  * @author Florian Dold
@@ -2304,7 +2304,7 @@ GNUNET_SERVICE_run_ (int argc,
   sh.cb_cls = cls;
   sh.handlers = GNUNET_MQ_copy_handlers (handlers);
   sh.service_name = service_name;
-
+  sh.ret = 0;
   /* setup subsystems */
   loglev = NULL;
   logfile = NULL;