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

Daniel Morissette dmorissette at mapgears.com
Fri Jan 14 06:55:25 EST 2011


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?

-- 
Daniel Morissette
http://www.mapgears.com/


More information about the mapserver-dev mailing list