How does systemd shut down the system?

view story

http://forums.fedoraforum.org – Hello, How does systemd shut down the system? Could you break it down into simple actions, like killing this, unmounting that, etc? I'm particularly interested in how it kills all running processes. Does it first try to stop all services? (Is every process part of a service?) When it stops a service, it presumably runs the ExecStop of that service, but what if the service doesn't exit immediately? How long does systemd wait? What does it do then? When is a service considered stopped? (I made a service that launches a script that just sleeps. After stopping the service, the script was still r (HowTos)