std::filebuf::open(0, ...) should honor TMPDIR
----------------------------------------------
Key: STDCXX-801
URL: https://issues.apache.org/jira/browse/STDCXX-801
Project: C++ Standard Library
Issue Type: Improvement
Components: 27. Input/Output
Affects Versions: 4.2.0
Reporter: Martin Sebor
Priority: Minor
The {{std::filebuf::open()}} function implements, as an extension, the ability
to create a temporary file that is automatically deleted on process exit
(regardless of whether the exit is normal or otherwise). The function uses the
[mkstemp|http://www.opengroup.org/onlinepubs/009695399/functions/mkstemp.html]
function on POISX platforms and
[tempnam|http://msdn.microsoft.com/en-us/library/ms235370(VS.80).aspx] function
on Windows. In both cases, the function uses the {{P_tmpdir}} macro for the
directory where to create the temporary file. On POSIX systems it's customary
to be able to set the {{TMPDIR}} environment variable to a directory where
temporary files should be created by programs. We should change our
implementation so as to honor this convention. On Windows, there is an
analogous environment variable {{TMP}}. We should change our implementation on
Windows to honor {{TMP}} if it's set and use {{P_tmpdir}} only when it's not.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.