mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-28 05:41:13 +00:00
The child wrote its pid with fs.writeFileSync, which makes the file visible at open() (0 bytes) before the content lands. Under CI load the existsSync-gated reader in waitForFile could observe the empty file, so readFileSync returned '' and Number.parseInt yielded NaN, making isProcessAlive(NaN) false and failing the pre-kill liveness assertion (checks-node-compact-small-6 flake). Write the pid to a temp file and rename it into place so the path only appears with full content.