consistent with os.wait() returning immediately because some other
subprocess had previously exited; the test suite then immediately
tries to lock the mailbox and gets an error saying it's already
locked.
To fix this, do a waitpid() so the test suite only continues once
the intended child process has exited.
self._box.lock)
# Wait for child to exit. Locking should now succeed.
- pid, status = os.wait()
+ exited_pid, status = os.waitpid(pid, 0)
self._box.lock()
self._box.unlock()