changelog.d/4797-run-stop-orphaned-descendant.md
Rama main · réplica de lectura del repositorio original.
- **A cancelled protected agent run no longer settles while a detached process it started keeps running (#4797).** When a child of the run exited just as the stop froze the run, a command that child had moved to its own session was handed to the container's init process; the stop no longer saw it, confirmed the run stopped anyway and freed the agent for a new run next to the surviving work. The stop now also checks every live process the container's init (or a reaper above the run) adopted after the run started in a session of its own, and confirms nothing while such a process runs; the run then keeps waiting as it does for any unconfirmed stop. ⚠️ **Behaviour change:** a run that left a double-forked daemon behind before the stop, or a container where another execution's detached process started meanwhile, no longer gets a confirmed stop and waits for the container to go away, because the helper cannot tell such a process from one the run started.