Fix segfault

The mutex and the condition variable were both process-private, which
was a major mistake. (A process-private condition variable holds a
pointer to its mutex when at least one process is waiting on it, but
two processes don't necessarily have that mutex in the same memory
location. This can cause a segfault or worse.)