It would be useful to have an option [-D] to run mosh-server without detaching from the terminal for scripts that want to wrap mosh-server execution.
Currently the only to wait for mosh-server to terminate is poling with kill(pid, 0), or configuring the wrapper to be a process reaper (PR_SET_CHILD_SUBREAPER on Linux, or PROC_REAP_ACQUIRE on BSD, and the wrapper then also has to handle SIGCHLD).