duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Duplicity-talk] Problem with max open files check on Cygwin


From: Nick Burch
Subject: [Duplicity-talk] Problem with max open files check on Cygwin
Date: Wed, 3 Jun 2009 12:31:00 +0100 (BST)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

Hi

I've noticed a problem with the max open files check on cygwin with duplicity 0.5.18. When I run duplicity, it fails with:

        Max open files of -1 is too low, should be >= 1024.
        Use 'ulimit -n 1024' or higher to correct.

This is caused by a hard ulimit of -1 being returned:

$ python
import resource
resource.getrlimit(resource.RLIMIT_NOFILE)
(1024, -1)


Does this look like a sensible patch for it?
--- duplicity.sav       2009-06-03 12:28:20.574993100 +0100
+++ duplicity   2009-06-03 12:28:50.868377900 +0100
@@ -731,7 +731,7 @@
         except resource.error:
             log.FatalError(_("Unable to get max open files."),
                            log.ErrorCode.get_ulimit_failed)
-        maxopen = min(soft, hard)
+        maxopen = min([l for l in (soft, hard) if l > -1])
         if maxopen < 1024:
log.FatalError(_("Max open files of %s is too low, should be
= 1024.\n"


Cheers
Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]