Similar to bug 1778, but this time for the non-Windows platforms.
The problem is that we fail to detect vncviewer terminating in a timely manner as we poll for it exiting. We also seem to go an extra round in the main loop for unknown reasons. A quick strace shows us taking almost 2 seconds to terminate after SIGCHLD.
Verified using client build 4949 on both Linux and OS X.