This is the mail archive of the cygwin@cygwin.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: Error with Rsync...anyone have any ideas?


E. Lev schrieb am 2001-09-25, 17:28:

Hi Eli,

>I've installed the whole cygwin package on an NT4 machine.  I've been 
>trying to rsync from the NT box to a box running openbsd (an account on an 
>isp).  I'm using a test directory to see if things are working.  At the end 
>of transmission - I get an error - does anyone have any ideas as to what it 
>means?  (i.e should I talk to the ISP because its something that's a 
>problem with their rsync server or is it something wrong that I'm doing on 
>the NT box).
>
>I'd appreciate any and all advice/feedback.
>
>Eli
>
>Here's what I get at the cygwin prompt:
>
>$ rsync -e ssh -avvvvv Tmp vela@server.isp.net:~/Tmp | cat > output.txt
>vela@server.isp.net's password:
>local_version=24 remote_version=24
>channel 0: chan_shutdown_write: close() failed for fd5: Resource temporarily u
>vailable
>read error: Connection reset by peer

It was discussed at this list, I think it was said that it is a windows problem.
Someone posted a patch.  
If you recompile with this patch, maybe it helps.
But, there was a little problem with getopt the last time.
So i needed to modifiy one cygwin header to get rsync compiled.

After applying the patch and changing unistd.h, just cd to the rsync
source and do:
./configure --prefix=/usr
make
make install

Should build OOTB.

/usr/include/unistd.h:
======================
/* unistd.h for Cygwin. */

#ifndef _UNISTD_H_
#define _UNISTD_H_

# include <sys/unistd.h>
/* To compile rsync, change #include <getopt.h> to this here */
#if !defined(__GETOPT_H__) && !defined(_GETOPT_H)
# include <getopt.h>
#endif

#endif /* _UNISTD_H_ */
============================END UNISTD_H=======================

Rsync Patch:
============
--- main.c.orig	Thu Sep 20 23:31:16 2001
+++ main.c	Thu Sep 20 23:31:32 2001
@@ -288,8 +288,22 @@
 	io_flush();
 	report(f_out);
 	if (remote_version >= 24) {
-		/* final goodbye message */		
+		/* final goodbye message */
+#ifdef HAVE_SOCKETPAIR
+#ifdef __CYGWIN__
+          /* A bug in the Windows TCP/IP implementation, which is not
+             yet worked around in Cygwin (such a workaround is very
+             difficult), causes the goodbye message to be lost if the
+             process sending it exits before it's read by the other
+             end.  Since this message doesn't contain any useful
+             information anyway, it is safe for us to just not read it
+             to avoid this problem. */
+#define SKIP_GOODBYE_MESSAGE
+#endif
+#endif
+#ifndef SKIP_GOODBYE_MESSAGE
  		read_int(f_in);
+#endif
  	}
 	io_flush();
 	exit_cleanup(0);
@@ -494,8 +508,10 @@
 			wait_process(pid, &status);
 		}
 		if (remote_version >= 24) {
-			/* final goodbye message */		
+			/* final goodbye message */
+#ifndef SKIP_GOODBYE_MESSAGE
 			read_int(f_in);
+#endif
 		}
 		report(-1);
 		exit_cleanup(status);
===========END OF RSYNC PACTH==================================

Gerrit


-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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]