你可能有东西阻塞了 rsync。就我而言,它是 NOD32 防病毒软件。您可以通过在“gdb”中运行 rsync 来检查这一点,如下所示:
$ gdb --args /usr/bin/rsync -a somedir/ anotherdir
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
.....
(no debugging symbols found)
(gdb) run
请注意 gdb 启动后的“运行”命令。你会看到一些像这样的输出:
Starting program: /usr/bin/rsync -a somedir/ anotherdir
.....
(no debugging symbols found)
warning: NOD32 protected [MSAFD Tcpip [TCP/IP]]
warning: NOD32 protected [MSAFD Tcpip [UDP/IP]]
warning: NOD32 protected [MSAFD Tcpip [RAW/IP]]
warning: NOD32 protected [RSVP UDP Service Provider]
warning: NOD32 protected [RSVP TCP Service Provider]
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
[New thread 1508.0x720]
[New thread 1508.0xeb0]
[New thread 1508.0x54c]
rsync: Failed to dup/close: Socket operation on non-socket
(108)
rsync error: error in IPC code (code 14) at
/home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/pipe.c(147)
[receiver=3.0.4]
因此,您必须将 rsync 添加到该病毒扫描程序 (NOD32) 的排除列表中:
c:\cygwin\bin\rsync.exe