This is the mail archive of the cygwin 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]
Other format: [Raw text]

RE: scp exits often with -1


Hi again,

attached an excerpt from the *head* of the strace file (zipped full version was rejected, tail follows in separate mail) created with a changed line in the scpwin shell script from below

 echo $ARGS | xargs strace scp -v -v > /tmp/scp.strace

Unfortunately with enabled strace the problem does not manifests that often, even if the batch file was called from Java. So it took some repeats as explained below to get an output of a problematic case. Nonetheless it is obvious from the strace that scp dies killing its children at the end.

- Jörg

Jörg Schaible wrote on Tuesday, November 16, 2004 6:39 PM:

> Hi folks,
> 
> after upgrading to latest cygwin1.dll and openssh I have
> massive problems with ssh/scp. Using e.g. the same scp
> command it fails from time to time called from the command
> line. Unfortunately it fails more often when called from a
> shell script and quite every time when this shell script is
> called from a DOS batch called by a Java app.
> 
> See the output of scp -v -v in the good version:

[snip]

> 
> The singel difference is, that in the successful case the
> client sends an exit-state, that is not received in the
> unseccussful version. The problem manifests more often with
> using a shell script and a DOS batch:
> 
>  ========= scpwin ========
>  #!/bin/sh
> 
>  for a in "$@";
>  do
>     case $a in
>     -*) ARGS="$ARGS $a";;
>     *) if test -n "$a"; then ARGS="$ARGS \"`cygpath -u \"$a\"`\"";
>     fi;; esac
>  done
> 
>  #echo $ARGS | xargs echo
>  echo $ARGS | xargs scp
>  ========= scpwin ========
> 
> and
> 
>  ========= scpwin.bat ========
>  @sh -c "scpwin '%1' '%2' '%3' '%4' '%5' '%6' '%7' '%8'" =========
> scpwin.bat ======== 
> 
> Called from a bash shell (repeast fast 4 or 5 times):
> cmd /c "scpwin.bat -v -v project.xml
> jos@es3.elsag.de:/devel/maven/home/public_html/repo/essencio-p
> erActa/poms/idxmgr-1.0.4-SNAPSHOT.pom"
> 
> Worst case is calling the scpwin.bat from within Java (app
> also started from the bash shell) using
> Runtime.exec(Object[]). Then it fails nearly every time.
> 
> Any other information I can provide ?
> 
> - Jörg

Attachment: scp.head.strace
Description: scp.head.strace

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

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