This is the mail archive of the mailing list for the Cygwin project.

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

RE: Why does scp leave ssh running?

> When I run
> scp somefile host:.
> I am left with a copy of SSH running.  At first, I thought this was
> because "scp" negotiated a connection with the remote host using ssh and
> then left that connection open in the background in case I wanted to
> perform more remote copies.  But experimentation has led me to believe
> that each time I perform a copy, another ssh gets left running.  Also
> interesting is that if I copy _from_ the remote computer to my local
> computer, no copy of ssh is left running.  The problem is, on my W98
> boxes, I cannot quit out of my bash prompt until I kill all of the pesky
> ssh's left lying around.
> I am running cygwin-1.1.6-1 and openssh-2.3.0p1-1.
> 1) Is this known behavior?
> 2) Is this expected behavior?
> 3) Does anybody care to see the output of cygcheck -s to consider this
> problem?
> I will track down and see if I can diagnose and correct the root of this
> problem myself if nobody else has heard of it and/or nobody is working
> on solving it.

This is very similar to the problem I and others have reported with using
CVS over ssh on win98.  When a cvs command such as 'cvs update' is executed,
the command runs successfully to completion with all it's normal output, but
control isn't returned to the bash prompt.  Using task manager reveals a
copy of ssh still running, and killing that returns control to the prompt.
he trick is knowing when the cvs update has completed and it's safe to kill

I've done some limited debugging that seemed to indicate that cvs was
attempting to shutdown the ssh connection, and was checking to see if there
were any characters left in the pipe.  At this point cvs hangs in a getc().
I haven't had time to take it further, but I have my suspicions about pipes
and win98.

I attempted to extract the essence of what cvs was doing with ssh to a
separate program which of course ran perfectly :-(


Want to unsubscribe from this list?
Send a message to

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