Stop spawn test failures due to a race condition with SIGCHLD on process exit

When a spawned process forks, fails, then exits very quickly, (this
typically occurs when exec fails), there is a race condition between the
SIGCHLD handler updating the process_handle's fields, and checking the
process status in those fields. The update can occur before or after the
spawn tests check the process status.

We check whether the process is running or not running (rather than just
checking if it is running) to avoid this issue.
Parenthesize macro arguments for 13291 fix
Whitespace fixes on 13291 fix
Note when 13291 was introduced.