Files
hermes-agent/tests/scripts/desktop_update
Teknium 781f8bbd78 test: await the never-resumed update child's death on a process handle
test_script_killed_before_publishing_the_delegate_runs_no_update killed the
hand-off script, slept a fixed 3 s and then asked tasklist whether the
suspended update child was gone. The child dies through its job: the script
held the only handle to a KILL_ON_JOB_CLOSE job, and the kernel terminates
the members when the dying process's handle table is torn down. That
termination is asynchronous to the script's own exit, so on a loaded
Windows runner the 3 s guess loses and tasklist still lists the child.

Open a SYNCHRONIZE handle on the child while it lives (which also pins the
pid against reuse) and wait for it to be signalled, bounded at 60 s. The
'ran' check moves after the wait: once the child has exited it can never
write the marker file, so the assertion is final instead of a snapshot.
2026-10-20 05:15:06 -07:00
..