[gdal-dev] Locked files under Windows

Roger Bivand Roger.Bivand at nhh.no
Tue Nov 5 07:25:11 PST 2013


Hi,

This is probably my muddle, but we have an unresolved problem in rgdal on 
Windows:

https://stat.ethz.ch/pipermail/r-sig-geo/2013-October/019667.html
https://stat.ethz.ch/pipermail/r-sig-geo/2013-November/019701.html

where temporary files created with pDriver->Create() are open and locked 
under Windows in rgdal/src/gdal-bindings.cpp line 556.

Under Linux (and possibly OSX, untested by me), unlink() works even though 
lsof shows them to be open. Because rgdal loads GDAL into a running R 
session, the undeleted temporary files can accumulate. This is in contrast 
to use in GRASS or GDAL utilities, where the "owning" process itself 
terminates quickly, freeing the lock. In gcore/gdaldriver.cpp, I don't see 
platform-specific fixes; we've been trying mainly with GTiff, but other 
drivers seem to show the same behaviour.

Grateful for any input,

Roger

-- 
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the gdal-dev mailing list