The shell creates a redirect target before writing to it, so the test
could read an empty pid file, take pid 0, and decide the child was not
running. This failed the push run of #80's merge, so that commit was not
deployed. The command now writes the pid to a temporary file and renames
it into place.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>