[mapserver-dev] RFC 66 - Better handling of temporary files

Jeff McKenna jmckenna at gatewaygeomatics.com
Fri Jan 14 07:37:28 EST 2011


My feedback:

- small world: last week I started a (popular) thread on the libtiff 
mailing list about the problems of switching to mkstemp() for my Windows 
compiles 
(http://old.nabble.com/Missing-mkstemp%28%29-on-Visual-Studio-2008-td30635217.html)

- in the case that TEMPPATH is not set in mapfile or env variable, I 
would like to see MapServer log a message such as "TEMPPATH not set, 
using C:/Temp for temporary files."  I think that requirement should be 
added to the RFC (log message).  For example, if I was doing testing 
with shp2img I would like to see that message returned when I was using 
a DEBUG level of 3 or higher.

-jeff


-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


On 11-01-14 7:55 AM, Daniel Morissette wrote:
> On 11-01-14 03:25 AM, thomas bonfort wrote:
>>
>> are there valid reasons for not using mktemp (or even better mkstemp,
>> but that returns a file handle, maybe the mapserver functions require
>> a file name) ?
>>
>
> I remember that's been discussed a while ago and had forgotten the
> reasons. I did a search and found only one ticket that talks about the
> possibility of using mkstemp():
>
> http://trac.osgeo.org/mapserver/ticket/1322
>
> It seems that a switch to mkstemp() was ruled out at that time because
> of release timing and then the original issue was successfully fixed we
> never came back to that question.
>
> Perhaps we could review the code that uses msTmpFile() and see if a
> switch to mkstemp() (and GetTempFileName() on Windows) would be
> possible. We may find that some places require a filename that is later
> passed to other libs, or that the temp filename needs to carry a
> specific extension... but maybe not.
>
> Can you please investigate that Alan?
>




More information about the mapserver-dev mailing list