pub fn run_hooks(settings: &Settings, event: HookEvent, ctx: HookContext)Expand description
Fire every matching hook for event. Each child runs on its own
std::thread with stdio set to /dev/null. We don’t capture output, but
the thread does reap the child (and kill it after HOOK_TIMEOUT) so a
fire-and-forget hook can’t leave a zombie or a runaway behind.
Capped at MAX_HOOKS_PER_EVENT — anything beyond is dropped with
a warning. See run_hooks_with for a test-friendly version that
reports back which hooks would fire without actually spawning.