aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-02-06 12:57:10 +0000
committerChristian Grothoff <christian@grothoff.org>2010-02-06 12:57:10 +0000
commit9ff014efb2e806c5a5f5296fc08ff7348230d8c0 (patch)
treed665c6bd7fc351edc5c9e80dd275cd8aa1d37a42 /src
parent95dab98f4561e8a72e1a20aec11f8da5321555ad (diff)
downloadgnunet-9ff014efb2e806c5a5f5296fc08ff7348230d8c0.tar.gz
gnunet-9ff014efb2e806c5a5f5296fc08ff7348230d8c0.zip
bugfix
Diffstat (limited to 'src')
-rw-r--r--src/arm/gnunet-service-arm.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c
index 77af19bf1..be2b6aa1d 100644
--- a/src/arm/gnunet-service-arm.c
+++ b/src/arm/gnunet-service-arm.c
@@ -102,10 +102,14 @@ struct ServiceList
102 */ 102 */
103 time_t mtime; 103 time_t mtime;
104 104
105 /* Process exponential backoff time */ 105 /**
106 * Process exponential backoff time
107 */
106 struct GNUNET_TIME_Relative backoff; 108 struct GNUNET_TIME_Relative backoff;
107 109
108 /* Absolute time at which the process is scheduled to restart in case of death */ 110 /**
111 * Absolute time at which the process is scheduled to restart in case of death
112 */
109 struct GNUNET_TIME_Absolute restartAt; 113 struct GNUNET_TIME_Absolute restartAt;
110 114
111 /** 115 /**
@@ -578,6 +582,15 @@ stop_service (struct GNUNET_SERVER_Client *client, const char *servicename)
578 "Sending kill signal to service `%s', waiting for process to die.\n", 582 "Sending kill signal to service `%s', waiting for process to die.\n",
579 servicename); 583 servicename);
580#endif 584#endif
585 if (pos->pid == 0)
586 {
587 /* process is in delayed restart, simply remove it! */
588 free_entry (pos);
589 signal_result (client, servicename, GNUNET_MESSAGE_TYPE_ARM_IS_DOWN);
590 GNUNET_SERVER_receive_done (client, GNUNET_OK);
591 return;
592 }
593
581 if (0 != PLIBC_KILL (pos->pid, SIGTERM)) 594 if (0 != PLIBC_KILL (pos->pid, SIGTERM))
582 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); 595 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
583 pos->next = running; 596 pos->next = running;
@@ -867,7 +880,7 @@ maint_child_death (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
867 else 880 else
868 prev->next = next; 881 prev->next = next;
869 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 882 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
870 "Service `%s' stopped\n", 883 _("Service `%s' stopped\n"),
871 pos->name); 884 pos->name);
872 signal_result (pos->killing_client, 885 signal_result (pos->killing_client,
873 pos->name, GNUNET_MESSAGE_TYPE_ARM_IS_DOWN); 886 pos->name, GNUNET_MESSAGE_TYPE_ARM_IS_DOWN);