This is the mail archive of the cygwin@sources.redhat.com 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: Win98SE/Cygwin/CVS/OpenSSH Hangs on Completion


On Thu, 18 Jan 2001 22:25:00 +0100, Corinna Vinschen <cygwin@cygwin.com> wrote:
> 
> On Thu, Jan 18, 2001 at 05:07:48PM +0000, Craig R.P. Heath wrote:
> > Did anyone sort this out?  I've tried various combinations of versions,
> > but it still hangs on me with:
> > 
> >          cygwin 1.1.7
> >          bash 2.04.5(12)
> >          openssh 2.3.0p1-2
> >          cvs 1.11.0-1
> 
> scp hanging (especially 2.3.0p1) is a known problem on various OSes
> including W9x. The OpenSSH team is desperately trying to avoid that
> problem for 2.4.0p1.

I have no experience with cvs, and I do not how it invokes scp/ssh but
I have work-around for direct scp invocation by using a script. Use
this as a guide for a cvs envelope script, or (if this is not
convenient) you can rename scp.exe and use this this script (call it
scp and put it in your path) to execute the renamed program.

A script to run (replace) scp and kill invoked ssh (if still running):

#! /bin/sh -ex
# --------------------------------------------------
set +e                                     # continue on any exit 
scp.exe "$@"                               # run scp with original args

set +x                                     # do not show commands        
GRP=`ps | grep "[/]PS"`                    # find this PS line
GRP=`echo $GRP | cut "-d " -f3`            # compress spaces, get GPID
PID=`ps | grep $GRP | grep "[/]bin[/]SSH"` # My ssh line
PID=`echo $PID | cut "-d " -f1`            # compress spaces, get ssh PID

set -x                                     # show kill or error message

if [ "$PID" != "" ] ; then
    kill $PID
else
    : " Error in scp copy " 
fi

######################### end of scp.sh #########################


-- 
 @@@@@@ @@@ @@@@@@ @    @   Ehud Karni  Simon & Wiesel  Insurance agency
     @    @      @  @@  @   Tel: +972-3-6212-757    Fax: +972-3-6292-544
     @    @ @    @ @  @@    (USA)  Fax  and  voice  mail:  1-815-5509341
     @    @ @    @ @    @        Better     Safe     Than     Sorry
 http://www.simonwiesel.co.il    mailto:ehud@unix.simonwiesel.co.il

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


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