This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ssh launched from xterm still running after xterm killed onCygwin


Hello, Mr. Price.

I see this on Linux a lot as well, which leads me to believe that this
is a problem unique to SSH across all supported platforms, Cygwin
included.

SSH won't exit until (and unless) every process started by it, local and
remote, exits.  Since I use remote X sessions via SSH, this especially
manifests for me when I exit the session: stubborn processes have to be
killed, which is done by Ctrl+Alt+Backspace to force-quit the X server,
after which SSH exits cleanly.

When you say you run a simple bash shell window, does that mean it
launches in a MS-DOS Prompt environment?  If so, when you close the
window, Windows kills the session (cygwin) which also kills its
processes (bash and ssh) as part of closing down the emulated
environment.

Running bash in an xterm makes ssh ultimately a descendant of the X
server within the cygwin environment.  SSH won't quit until either all
of its child processes exit or the SSH process itself is killed.  It's
stubborn like that.

If I'm wrong, please feel free to set me right.

-ArielMT  (who's been -way- too occupied with work to reply sooner)


On Tue, 06 Sep 2005 16:36:40 -0400 Derek Price wrote:

> When I launch ssh sessions from xterms and exit them via the command
> line, the processes go away, but if I just kill the xterm window an
> ssh was launched from via a mouse click, the ssh.exe hangs around
> taking up system resources until I kill it via the task manager, if I
> can figure out which ssh.exes are the zombies.
> 
> The same problem *does not* occur from a simple bash shell window
> (launched via C:\cygwin\bin\bash --login -i).  Closing this bash shell
> does properly kill the ssh session, so I expect this problem will end
> up having something to do with xterm.
> 
> This is with the latest Cygwin (upgraded a few minutes ago via the
> kernel.org mirror) on Windows NT SP2 with all the latest updates. 
> Output of `cygcheck -s -v -r > cygcheck.out' attached.
> 
> (Incidentally, my ssh-agents also keep running, though I *like* that -
> it means that the following script doesn't care if I exit the original
> bash-shell:
> 
> export SSH_AUTH_SOCK=$HOME/.ssh-agent/`hostname`-ssh-auth-sock
> if test -d "$HOME/.ssh-agent"; then :; else
>         mkdir "$HOME/.ssh-agent"
> fi
> if ssh-add -l >/dev/null 2>&1; then :; else
>         rm "$SSH_AUTH_SOCK"
> fi
> if test -S "$SSH_AUTH_SOCK"; then :; else
>         ssh-agent -a "$SSH_AUTH_SOCK"
>         ssh-add
> fi
> 
> 
> But I suppose there will be some way to get that behavior back via
> nohup or whatever if this gets fixed.)
> 
> 
> Please CC me with any response since I am not a member of these lists.
> 
> Regards,
> 
> Derek
> 
> -- 
> Derek R. Price
> CVS Solutions Architect
> Ximbiot <http://ximbiot.com>
> v: +1 717.579.6168
> f: +1 717.234.3125
> <mailto:derek@ximbiot.com>
> 
> 


-- 
"The most humbling achievement of the past millennium, I believe, is the
evolution of the simplest form of communication: the written letter.
>From courier to post to telegram to fax to email, each advancement has
made the awesome power of writing more accessible than ever before."
-Ariel Millennium Thornton, Spokesman and Mascot, Thornton 2 Productions

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]