still some problems witih 0.5.3
Tue, 05 Mar 2002 12:18:08 -0800
Content-Type: text/plain; charset="us-ascii"
>>>>> "AA" == Alberto Accomazzi <email@example.com>
>>>>> wrote the following on Tue, 05 Mar 2002 10:42:36 -0500
AA> I downloaded version 0.5.3 and was successfull in running a
AA> backup as root on a brand-new directory. However, when I tried
AA> continuing an interrupted backup on a similar directory I got an
AA> error message (reported below). This is not a show-stopper for
AA> me at the moment since I am able to do backups regularly, but I
AA> thought I'd let you know in case you want to track this down.
Ok, I think I may know what the problem is: there may be some time
after rdiff's stdout gets closed and before the exit value becomes
available, and rdiff-backup can get unlucky. So try the attached
patch (pretty hacky).
AA> Oh, and another (minor) suggestion: you should really implement
AA> a --help option that spits out the usage syntax for the command,
AA> in line with all other GNU programs.
I don't have a major objection to this, but it seems like some
duplication of effort. If you type in rdiff-backup --help now it
tells you to look at the man page, which has all the information.
Syntax with the --help switch would require the information to be
written and maintained in two separate places. Why not just read the
Content-Type: text/patch; charset="us-ascii"
--- rdiff-backup.old Tue Mar 5 11:58:47 2002
+++ rdiff-backup Tue Mar 5 12:08:37 2002
@@ -1458,6 +1458,13 @@
Log("Failure probably because %s couldn't be found in PATH."
% self.cmdlist, 2)
assert 0, "rdiff not found"
+ if exitval == -1:
+ # There may a race condition where a process closes
+ # but doesn't provide its exitval fast enough.
+ Log("Waiting for process to close", 2)
+ exitval = self.p3obj.poll()
+ if exitval == 0: return closeval
raise RdiffException("%s exited with value %d" %
@@ -4288,7 +4295,8 @@
if dsrp: finalizer(dsrp)
except (IOError, OSError, RdiffException):
- Log("Error processing %s, skipping" % dest_sig.index, 2)
+ Log("Error processing %s, skipping" %
+ str(dest_sig.index), 2)