Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit abe57d0b authored by Mike Kasick's avatar Mike Kasick Committed by Ricardo Cerqueira
Browse files

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.
parent b70a821e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment