Closed KillingSpark closed 4 years ago
So this turned out a bit differently. It is fine that the exit handler queues a reactivation for each failed starting try, as long as it marks the service as exited in the pid table. Should be fixed with 5ffd0ff5b06263f4cd3d7fcb2076222ae7562d36
The exit handler should not do reactivation if the status is 'Starting'. This should be handled by the thread that is currently trying to start the service. The exit event should be communicated via the PidTable in the RuntimeInfo.
This leads to misleading timeout logs for services of type notify (and dbus) if the executable immediately exits.
When fixing this, special care should be taken that socket-activation still works properly, as this resets the status from
Started(WaitingOnSocket)
toStarting
. But the exit handler should in this case apply the correct restarting policy.So the best plan is probably: