Fixes the "wait for message" function.

The message is now specified at process startup and monitoring is
started before the process is started. This ensures that the message is
never missed.

TODO: Wait for multiple messages? Add signaling to isAlive and get rid
of all polling?