wait did not like being replaced with waitpid.

Even though wait(s) is functionally equivalent to waitpid(-1, s, 0), when
wrapped like that in the monitor helper we got ECHILD. This commit wraps wait
directly.