This will break if s->count is ever larger than maxint. The batch code should probably be changed to consistently use the variable-length integer routines, which is probably a compatible change.
There is a small optimization opportunity here to avoid stat()ing the file in some circumstances, which has a certain cost. We are called immediately after doing readdir(), and so we may already know the d_type of the file. We could for example avoid statting directories if we're not recursing, but this is not a very important case. Some systems may not have d_type.
Rather than sleeping after each write, it might be better to use some kind of averaging. The current algorithm seems to always use a bit less bandwidth than specified, because it doesn't make up for slow periods. But arguably this is a feature. In addition, we ought to take the time used to write the data into account.
Perhaps use "screen -X" instead/as well, to help people debugging without easy access to X. Perhaps use an environment variable, or just call a script?
The /proc/ magic probably only works on Linux (and Solaris?) Can we be more portable?
It would be kind of nice to make sure that they are actually all our children before we kill them, because their pids may have been recycled by some other process. Perhaps when we wait for a child, we should remove it from this array. Alternatively we could perhaps use process groups, but I think that would not work on ancient Unix versions that don't support them.
Generated on Tue Apr 16 12:37:40 2002 for rsync by
1.2.15