process_wait() was broken. fixed it (mostly). still 51 tests failing.

One thing that could be improved: just used semaphores to
implement wait() semantics, not condition variables like I'm doing.