Re: Too many open files

2012-10-25 Thread Joseph Rushton Wakeling
On 10/25/2012 05:44 PM, Iain Buclaw wrote: Anyway... this would be a frontend-related bug, probably attributed with the old version of D you are using there. Most likely so. Unfortunately I'm still struggling to compile gdc-4.7 so cannot confirm :-( I probably should have posted here, but t

Re: Too many open files

2012-10-25 Thread Iain Buclaw
On 25 October 2012 16:17, Joseph Rushton Wakeling wrote: > Hello all, > > I have some code which needs to read in data from a large number of files in > a directory. > > The basic data input code goes something like this: > > foreach(DirEntry e; dirEntries(...)) > { > auto f = file

Re: Too many open files

2012-10-25 Thread Iain Buclaw
> get the following error while running the program: > > -- > std.exception.ErrnoException@../../../src/libphobos/std/stdio.d(330): Cannot > open file in mode `r' (Too many open files) > -- > > This is trivial to work around by p

Too many open files

2012-10-25 Thread Joseph Rushton Wakeling
e `r' (Too many open files) -- This is trivial to work around by putting an explicit f.close() at the end of the loop, but it looks like a bug to me as f should in any case automatically be closed at the end of the s