More notes on process supervision
This commit is contained in:
parent
38753f241c
commit
4b9202786d
|
@ -123,3 +123,25 @@ Restart policies and lifecycles: daemontools-encore and nosh both use
|
|||
|
||||
Daemontools just always restarts `./run` (after pausing 1 second). s6
|
||||
is similar, but runs `./finish` if it exists, before restarting.
|
||||
|
||||
Mac OS X "Lion" (?) introduced "sudden termination" at the Cocoa level: apps can indicate they
|
||||
are OK with quick shutdown via SIGKILL. There's an analogous `launchd` feature for sudden
|
||||
termination of daemons and background Mac processes, though confusingly the docs also say that
|
||||
SIGTERM is sent a few seconds before SIGKILL for daemons.
|
||||
- https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Lifecycle.html
|
||||
- https://developer.apple.com/documentation/foundation/processinfo#1651129
|
||||
- The time delay between SIGTERM and SIGKILL can be controlled (defaults to 20s?):
|
||||
- https://apple.stackexchange.com/a/361723
|
||||
|
||||
Oh this is cool! From <https://www.launchd.info/>:
|
||||
|
||||
> ## Daemons and Agents
|
||||
>
|
||||
> launchd differentiates between agents and daemons. The main difference is that an agent is
|
||||
> run on behalf of the logged in user while a daemon runs on behalf of the root user or any
|
||||
> user you specify with the UserName key.
|
||||
|
||||
We have a similar distinction: the "system layer" of supervision vs. programs supervised by
|
||||
other portions and/or by inferior syndicate-server instances (like inferior DBus/systemd
|
||||
instances). Maybe holding the *conceptual* distinction between agents and daemons is also
|
||||
worthwhile!
|
||||
|
|
Loading…
Reference in New Issue