* don't show file not found msgs for irrelevant units
-* getty doesn't respawn
-
External:
* sysv functions should color when stdout is tty, not stdin
s->failure = true;
if (allow_restart &&
- s->allow_restart &&
+ !s->forbid_restart &&
(s->restart == SERVICE_RESTART_ALWAYS ||
(s->restart == SERVICE_RESTART_ON_SUCCESS && !s->failure))) {
} else
service_set_state(s, s->failure ? SERVICE_MAINTENANCE : SERVICE_DEAD);
+ s->forbid_restart = false;
+
return;
fail:
s->failure = false;
s->main_pid_known = false;
- s->allow_restart = true;
+ s->forbid_restart = false;
service_enter_start_pre(s);
return 0;
/* This is a user request, so don't do restarts on this
* shutdown. */
- s->allow_restart = false;
+ s->forbid_restart = true;
/* Already on it */
if (s->state == SERVICE_STOP ||