[gdal-dev] Locking of Open Shapefile

Joel Odom joelodom at gmail.com
Fri Jan 15 22:41:05 EST 2010


Thanks, Frank.  I'll check source code of the FalconView Shapefile overlay
and see if it is requesting exclusive access.  That could be the problem and
I could change that as there is no need for FalconView to have exclusive
access when it is only reading.



On Fri, Jan 15, 2010 at 8:40 PM, Frank Warmerdam <warmerdam at pobox.com>wrote:

> Joel Odom wrote:
>
>> I've discovered that when I use OGRSFDriverRegistrar::Open to open a
>> Shapefile, the file remains locked so that another process can't open the
>> file until after I've called OGRDataSource::DestroyDataSource.  Is there any
>> way to prevent the file from being locked?  Thanks!
>>
>
> Joel,
>
> Modern versions of GDAL/OGR route the open request for .shp and .dbf
> files through VSIFOpenL().  The Win32 implmentation calls CreateFile()
> with the sharing flags:
>
>  FILE_SHARE_READ | FILE_SHARE_WRITE
>
> As far as I know, this means that any other application which also tries
> to open the files allowing shared access should be ok.  Is it possible
> you are using quite an old version of GDAL/OGR?  Or that the other
> application is requesting exclusive access?
>
>
> Best regards,
> --
>
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
>
>


-- 
http://giscoder.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100115/075f6357/attachment.html


More information about the gdal-dev mailing list