In this archived launcher setup, stopping ros2 launch left child nodes alive. They continued holding the Hailo-8, so another tool could fail much later with no obvious connection to the stop that had supposedly completed.
HAILO_OUT_OF_PHYSICAL_DEVICES
Two fixes, both measured, both wrong
The first attempt reset an inherited SIGINT-ignore disposition and signalled the launcher directly. It did not exit within 20 seconds. The escalation sent SIGTERM, but in this execution path that did not terminate the descendants. This is an observation about that launcher and wrapper, not a guarantee about signal forwarding in every ROS 2 version.
The second tried setsid and a process-group signal. os.setsid() failed in that context; the wrapper exited before the intended graph started. Its stored PID was not evidence of a live replacement process. The stop function returned without a useful success or failure report.
Both attempts depended on another process passing the signal on. The revised kill_tree walked the launcher’s descendants and signalled the captured processes directly: INT, then TERM, then KILL. That removed the relay assumption for the observed tree, but introduced another question: when should that tree be captured?
Verified on hardware and correct are not the same claim.
The fourth defect
A controlled regression fixture found something the earlier hardware runs had not exercised. kill_tree walked the process tree again at every escalation step. Once the parent exited, that was no longer equivalent to retaining the original descendants.
A child that ignored SIGINT could therefore outlive the launcher and disappear from the next walk. The earlier bench runs used nodes that exited on the first signal, so they never exercised this branch. The fixture deliberately spawned a child that ignored SIGINT and checked that later escalation still reached it.
The correction captured the descendants before asking any of them to exit, then retained them through escalation. That is the consumer-visible contract: “stop” must not report success while a known child still owns the resource.

Signals are requests, not acknowledgements
Sending a signal successfully tells me that the kernel accepted the request for the addressed process. It does not establish that the process completed cleanup, released a device or even exited. A process can ignore a catchable signal or take time to handle it. SIGKILL cannot be handled, but it also bypasses application cleanup.
The observation after each stage therefore matters: which captured processes still exist, which have exited, and whether the stop reached its stated outcome. A failed wrapper and a graph that shut down cleanly should not collapse into the same reassuring status.
Escalation is also not the vehicle’s physical emergency stop. Terminating host processes cannot substitute for an independently enforced actuator-safe state. This investigation concerned software and device ownership, not a water-tested safety claim.
Where a PID snapshot stops being enough
A snapshot fixes this reparenting failure; it is not a universal process-lifetime boundary. Children created after the snapshot, process identity reused later, permissions and detached descendants need separate treatment. A stronger supervisor can use an owned service or cgroup and verify process identity rather than treating an old numeric PID as permanent ownership.
I would not copy this story into a command that kills every ROS-looking process on a laptop. The target is the graph this launcher owns. The regression is useful precisely because it creates that small, controlled tree and exercises the failure without depending on physical hardware.
The lasting change in my method is to keep both kinds of evidence: a run against the real environment, and a deliberately awkward process fixture that gives the fallback a reason to execute. For the same distinction at the hardware-protocol boundary, read from worked once to works every time.