New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need better handling of temporary files #3354
Comments
Author: assefa |
Author: dmorissette |
Author: sdlime Steve |
Author: aboudreault Does everyone agree with this behavior? What about MAC ? |
Author: aboudreault |
Author: assefa builds on windows with dafc9c8 (r10888).
I have tested this with the sld temporary file. |
Author: assefa I would like to be able to use the msTmpFile to get a temporary full path file name for a given filename. Right now the function allows the possibility to pass path and extension but not a file name. |
Author: assefa |
Author: aboudreault |
Author: aboudreault
Please confirm that it fixes your need. |
Author: assefa |
Author: aboudreault |
Author: havatv |
Author: havatv |
Author: aboudreault |
Reporter: dmorissette
Date: 2010/03/03 - 19:50
Trac URL: http://trac.osgeo.org/mapserver/ticket/3354
At the moment, we write some temporary files in the web-accessible IMAGEPATH directory, this was a poor practice but still okay for some uses in the past (such as writing CONNECTIONTYPE WMS and WFS responses while we process them), but as our need for temporary files increase, we need to ensure that temp files are handled in a proper and safer way.
One option could be to adopt the use of a $MS_TMPDIR environment variable to specify the temporary directory path. If $MS_TMPDIR is not set, then we would fallback on $TMPDIR (commonly used on Unix), and if not, on /tmp on Unix/Linux, or some path TBD on Windows.
We could also look into the use of system calls to more safely handle temp files. One possibility is tmpfile(), but the drawback of this one is that it automatically deletes the files once it's closed and in some cases we don't want that.
The text was updated successfully, but these errors were encountered: