I can never end an ssh session if I have a local gvim window open (where the gvim process is running on the ssh server, with the X protocol tunneled through ssh) either. Even though the gvim binary forks a few times and exits, so you get your shell back, it's still counted as a child process by ssh, so ssh won't exit until it does. I can also start a "make" in the background, even with nohup, and ssh won't close the connection until make is done.
One way I've found around it is to open another ssh session to the same server, then find and kill the sshd process that's running as me, serving the first connection.
But, apparently screen circumvents this sshd behavior somehow, if it works. So I guess that's so much the better. |