During my investigation of #28411 and other similar functional test failures on Windows in CI, I found out that https://github.com/bitcoin/bitcoin/blob/abe4fedab735c145881e85dc2b02cf819a241635/test/functional/test_framework/test_node.py#L223 sometimes fails for unknown to me reasons. By “fails”, I mean that a child process does not make any progress.
This PR ensures a child process’s progress by checking a created PID file shortly. If the check fails, another two attempts are following.
Although this PR fixes tests on Windows, the new logic is platform-agnostic and increases test robustness.
In several dozens of runs in my personal repo GHA, the only intermittent failure still happens – #28491.
Closes #28411.