duplicity-talk
[Top][All Lists]
Advanced

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

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


From: Kenneth Loafman
Subject: Re: [Duplicity-talk] Problem with max open files check on Cygwin
Date: Wed, 03 Jun 2009 13:54:46 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090318)

Nick Burch wrote:
> 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"

This looks like a reasonable fix.  Does -1 mean that there is no hard
limit on open files, or just not available?

...Thanks,
...Ken


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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