Wraps exit event.

wait and exit now send a message to the monitor to perform one last
check to the process, before this one fully terminates. The terminating
process waits for the monitor to send a SIGCONT signal indicating the
last check has been performed. If no signal is received after a timeout
(default 10 seconds), we assume the signal was lost, and continue with
the wait/exit anyway.