bug fix in _posix_shell: wait for the output to finish before closing the interactive shell.