[GRASS-dev] opencell opening temp null file: no temp files available

Markus Neteler neteler at osgeo.org
Thu Nov 20 13:58:57 EST 2008


On Wed, Nov 19, 2008 at 6:13 PM, Glynn Clements
<glynn at gclements.plus.com> wrote:
> Andi Jochem wrote:
...
>> After 1024 projections the programm stops.
>>
>> When I have a look in /proc/<pid>/fd/
>>
>> I can see the following:
>> ...
>> ...
>> ...
>> lr-x------ 1 andi andi 64 2008-11-19 16:21 66 -> /usr/local/grass-6.3.0/etc/ellipse.table
>> lr-x------ 1 andi andi 64 2008-11-19 16:21 67 -> /usr/local/grass-6.3.0/etc/ellipse.table
>
> [snip]
>
> This looks like a GRASS bug.
>
> read_ellipsoid_table() in lib/proj/ellipse.c never closes the file.
> You can fix it with:
>
> --- lib/proj/ellipse.c  (revision 31109)
> +++ lib/proj/ellipse.c  (working copy)
> @@ -264,6 +264,9 @@
>            continue;
>        }
>     }
> +
> +    fclose(fd);
> +
>     if (!err)
>        return outputlist;
>
> This has been fixed in 6.4/7.0.
>
> read_ellipsoid_table() in lib/gis/get_ellipse.c has the same issue
> (which I've now fixed). However, that function checks whether the
> table has already been read, and returns immediately if it has, so it
> never opens the file more than once.
>
> I suspect the lib/proj version should do something similar. In fact,
> it should probably use the code in lib/gis.

this probably solves
http://trac.osgeo.org/gdal/ticket/2537
?

Markus


More information about the grass-dev mailing list