Minimal PID-file supervision for long_running actions: start detached
in a fresh process group with output to a log file, record the PID, stop
by signaling the group. No daemon, no restart policy.
Run a one-shot shell command, capturing stdout (for state refs) while
still logging both streams. Unlike run_foreground, output does not go
to the terminal — checkpoint machinery consumes it instead.