init: Never allow two same-service processes to exist simultaneously.
A stopping service now remains in SVC_RUNNING state until its exiting process has been reaped by waitpid. This prevents a "stop, start" sequence from spawning a second service process before resources held by the first are released. However, a "stop, start" pair _will_ restart the service after exit (unless critical or oneshot). This scenario was originally special-cased by the SVC_RESTART state used by the restart command. However, we have observed instances where services are, unintentionally, stopped and started "too quickly," and so simultaneous processes for the same service should never be allowed. Note the SVC_RESTART state (and restart) command is still useful to explicitly restart critical and oneshot services, for which the "stop, start" procedure is not intended.
Loading
Please register or sign in to comment