Possibility to porting Rsync to NT and other platforms
jamie at shareable.org
Fri Jun 12 02:19:27 GMT 2009
John E. Malmberg wrote:
> Hasanat Kazmi wrote:
> >I am looking into possibilities of porting RSync for windows. Does anybody
> >have an idea that which libraries and dependencies RSync uses which can not
> >be compiled on windows (so thats why we use cygwin)
> I have not looked at this in a few years, but the issues is more that
> rsync initializes some data structures and then forks off processes.
There is actually a threaded-rsync patch, at least in rsync-2.6.7.
(I haven't checked if rsync-3.x has a threaded patch).
I use it every day on uClinux, where fork() is not possible. (The
threaded patch isn't quite enough, because rsync uses an enormous
amount of stack, and the default thread stacks aren't enough so it
writes to random memory, crashes, and corrupts everything else...)
Threads are also needed on VMS I think.
> But it is doable. I make an experimental proof of concept port where I
> converted it to use posix threads instead of forked processes.
> With the code base that I worked on, the main thing was identifying
> which of the common or static variables are modified by more than one
> The experimental version was working well enough that I could keep a
> local copy of the rsync source code in sync on my system with it.
> I had set up a system to use editor macros to re-apply my changes to the
> lastest source, but had to move on to other things before I completed
> the port.
> I currently use the experimental port binary several times a week for
> keeping my system up to date with blead-perl source.
I think it would be a good idea to build rsync with threads on all
modern OSes anyway. Maybe it should even be the default, I'm not
sure. The way rsync works, it could easily work with threads or
processes without any difference in the source, except where it spawns
More information about the rsync