]> err.no Git - systemd/commitdiff
service: when we cannot start due to rate limít consider that a real failure
authorLennart Poettering <lennart@poettering.net>
Wed, 19 May 2010 23:14:43 +0000 (01:14 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 19 May 2010 23:14:43 +0000 (01:14 +0200)
src/service.c
src/unit.c

index 3e2a499ec86bc73554672e02e3e789d6863cb46e..ac83862db770c39e886b8bf44694ecd3edea3835 100644 (file)
@@ -1708,7 +1708,7 @@ static int service_start(Unit *u) {
         /* Make sure we don't enter a busy loop of some kind. */
         if (!ratelimit_test(&s->ratelimit)) {
                 log_warning("%s start request repeated too quickly, refusing to start.", u->meta.id);
-                return -EAGAIN;
+                return -ECANCELED;
         }
 
         s->failure = false;
index 8f0b0773f1b9f0c0730bcb1448ce711c574a0c9e..bcb95b2adc1740e1d87cdee8e1c8f0dcd556c8b2 100644 (file)
@@ -735,9 +735,10 @@ fail:
 }
 
 /* Errors:
- *         -EBADR:    This unit type does not support starting.
- *         -EALREADY: Unit is already started.
- *         -EAGAIN:   An operation is already in progress. Retry later.
+ *         -EBADR:     This unit type does not support starting.
+ *         -EALREADY:  Unit is already started.
+ *         -EAGAIN:    An operation is already in progress. Retry later.
+ *         -ECANCELED: Too many requests for now.
  */
 int unit_start(Unit *u) {
         UnitActiveState state;