I think I've (finally) fixed the problem with rsync periodically
authorAndrew Tridgell <tridge@samba.org>
Mon, 15 Dec 1997 12:33:15 +0000 (12:33 +0000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 15 Dec 1997 12:33:15 +0000 (12:33 +0000)
commit05c629f778acaf7b83583426c0138ef463fb41af
tree311004640a77cef8539c0eda24f4001d92e9e9ce
parente950ec72c4297bf2e0e494a4b29b291233316786
I think I've (finally) fixed the problem with rsync periodically
freezing when used with ssh. The problem is really the ssh use of
blocking calls. rsync has had a fix for this for a while which relies
on using non-blocking calls itself and then reading any data from the
incoming fd when trying to write, thus ensuring that the incoming fd
doesn't get full.
The problem was the the incoming fd wasn't added to the select
statement, which meant that new data arriving on the fd only got read
when the select timed out, which happens every 10 seconds. Thus things
could slow to a crawl!
The incoming fd is now in the select call, and this seems to fix the
problem.
io.c