On 2013-12-20 10.12, Jeff King wrote:
> On Thu, Dec 19, 2013 at 09:39:55AM -0800, Junio C Hamano wrote:
>
>> Torsten Bögershausen writes:
>>
>>> Thanks for an interesting reading,
>>> please allow a side question:
>>> Could it be, that "-1 == unlimited" is Linux specific?
>>> And therefore not 10
On Thu, Dec 19, 2013 at 09:39:55AM -0800, Junio C Hamano wrote:
> Torsten Bögershausen writes:
>
> > Thanks for an interesting reading,
> > please allow a side question:
> > Could it be, that "-1 == unlimited" is Linux specific?
> > And therefore not 100% portable ?
> >
> > And doesn't "unlimite
Torsten Bögershausen writes:
> Thanks for an interesting reading,
> please allow a side question:
> Could it be, that "-1 == unlimited" is Linux specific?
> And therefore not 100% portable ?
>
> And doesn't "unlimited" number of files call for trouble,
> having the risk to starve the machine ?
>
On 2013-12-19 01.15, Jeff King wrote:
> On Wed, Dec 18, 2013 at 02:59:12PM -0800, Junio C Hamano wrote:
>
>> Jeff King writes:
>>
Yes, that is locally OK, but depending on how the caller behaves, we
might need to have an extra saved_errno dance here, which I didn't
want to get into
On Wed, Dec 18, 2013 at 02:59:12PM -0800, Junio C Hamano wrote:
> Jeff King writes:
>
> >> Yes, that is locally OK, but depending on how the caller behaves, we
> >> might need to have an extra saved_errno dance here, which I didn't
> >> want to get into...
> >
> > I think we are fine. The only ca
Jeff King writes:
> On Wed, Dec 18, 2013 at 01:37:24PM -0800, Junio C Hamano wrote:
>
>> Jeff King writes:
>>
>> > According to the POSIX quote above, it sounds like we could do:
>> >
>> > #if defined (_SC_OPEN_MAX)
>> > {
>> > long max;
>> > errno = 0;
>> > ma
On Wed, Dec 18, 2013 at 01:37:24PM -0800, Junio C Hamano wrote:
> Jeff King writes:
>
> > According to the POSIX quote above, it sounds like we could do:
> >
> > #if defined (_SC_OPEN_MAX)
> > {
> > long max;
> > errno = 0;
> > max = sysconf(_SC_OPEN_MAX);
> >
Jeff King writes:
> According to the POSIX quote above, it sounds like we could do:
>
> #if defined (_SC_OPEN_MAX)
> {
> long max;
> errno = 0;
> max = sysconf(_SC_OPEN_MAX);
> if (0 < max) /* got the limit */
> return max;
>
On Wed, Dec 18, 2013 at 11:50:24AM -0800, Junio C Hamano wrote:
> 8< --
>
> static unsigned int get_max_fd_limit(void)
> {
> #ifdef RLIMIT_NOFILE
> struct rlimit lim;
>
> if (!getrlimit(RLIMIT_NOFILE, &lim))
>
Junio C Hamano writes:
> Jeff King writes:
>
>> That is, does sysconf actually work on such a system (or does it need a
>> similar run-time fallback)? And either way, we should try falling back
>> to OPEN_MAX rather than 1 if we have it.
>
> Interesting.
>
>> As far as the warning, I am not sure
Jeff King wrote:
> I wish we understood why getrlimit was failing. Returning EFAULT seems
> like an odd choice if it is not implemented for the system. On such a
> system, do the other fallbacks actually work? Would it work to do:
>
> That is, does sysconf actually work on such a system (or does i
Jeff King writes:
> That is, does sysconf actually work on such a system (or does it need a
> similar run-time fallback)? And either way, we should try falling back
> to OPEN_MAX rather than 1 if we have it.
Interesting.
> As far as the warning, I am not sure I see a point. The user does not
>
On Wed, Dec 18, 2013 at 10:00:35AM -0800, Junio C Hamano wrote:
> Joey Hess writes:
>
> > In sha1_file.c, when git is built on linux, it will use
> > getrlimit(RLIMIT_NOFILE). I've been deploying git binaries to some
> > unusual systems, like embedded NAS devices, and it seems some with older
>
Junio C Hamano wrote:
> Hmph, perhaps you are right. Like this?
Works for me.
--
see shy jo
signature.asc
Description: Digital signature
Joey Hess writes:
> In sha1_file.c, when git is built on linux, it will use
> getrlimit(RLIMIT_NOFILE). I've been deploying git binaries to some
> unusual systems, like embedded NAS devices, and it seems some with older
> kernels like 2.6.33 fail with "fatal: cannot get RLIMIT_NOFILE: Bad addres
In sha1_file.c, when git is built on linux, it will use
getrlimit(RLIMIT_NOFILE). I've been deploying git binaries to some
unusual systems, like embedded NAS devices, and it seems some with older
kernels like 2.6.33 fail with "fatal: cannot get RLIMIT_NOFILE: Bad address".
I could work around thi
16 matches
Mail list logo