still some problems witih 0.5.3
Ben Escoto
bescoto@stanford.edu
Tue, 05 Mar 2002 12:18:08 -0800
------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <8159.1015359473.1@folly.Stanford.EDU>
>>>>> "AA" == Alberto Accomazzi <aaccomazzi@cfa.harvard.edu>
>>>>> 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
man page?
--
Ben Escoto
------- =_aaaaaaaaaa0
Content-Type: text/patch; charset="us-ascii"
Content-ID: <8159.1015359473.2@folly.Stanford.EDU>
Content-Description: rdiff-backup-aa2.patch
--- 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[0], 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)
+ time.sleep(0.2)
+ exitval = self.p3obj.poll()
+ if exitval == 0: return closeval
raise RdiffException("%s exited with value %d" %
(self.cmdlist, exitval))
return closeval
@@ -4288,7 +4295,8 @@
if dsrp: finalizer(dsrp)
except (IOError, OSError, RdiffException):
Log.exception()
- Log("Error processing %s, skipping" % dest_sig.index, 2)
+ Log("Error processing %s, skipping" %
+ str(dest_sig.index), 2)
finalizer.getresult()
return diffs()
------- =_aaaaaaaaaa0--