summaryrefslogtreecommitdiffstats
path: root/init/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/init.c')
-rwxr-xr-xinit/init.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/init/init.c b/init/init.c
index 1ee88a7..e0f2cf7 100755
--- a/init/init.c
+++ b/init/init.c
@@ -369,10 +369,9 @@ void service_start(struct service *svc, const char *dynamic_args)
/* The how field should be either SVC_DISABLED or SVC_RESET */
static void service_stop_or_reset(struct service *svc, int how)
{
- /* we are no longer running, nor should we
- * attempt to restart
- */
- svc->flags &= (~(SVC_RUNNING|SVC_RESTARTING));
+ /* The service is still SVC_RUNNING until its process exits, but if it has
+ * already exited it shoudn't attempt a restart yet. */
+ svc->flags &= (~SVC_RESTARTING);
if ((how != SVC_DISABLED) && (how != SVC_RESET)) {
/* Hrm, an illegal flag. Default to SVC_DISABLED */