On Thu, 14 Dec 2017, Jiri Drbalek wrote:

Hello.

If a Linux process with opened Tiff dataset is forked, it is not possible
to read from the dataset concurrently in these forked processes, because
file offsets and other attributes of the opened Tiff file are shared
between those processes.

I've made a patch which optionally close the underlying Tiff file once a
dataset is opened. One can then fork safely, underlying file is lazily
opened again in each subprocess.

What do you think about this problem and proposed solutions? Is there some
more elegant solution?

Can I assume that we are talking about opening for read and not for write ?

For writing, I was taught that multi-process programs should do all file writing in a dedicated thread.

--
Andrew C. Aitchison                                     Cambridge, UK
                        [email protected]
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to