Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-801

std::filebuf::open(0, ...) should honor TMPDIR

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.2.0
    • 4.2.2
    • 27. Input/Output
    • None
    • Usability

    Description

      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 function on POISX platforms and tempnam 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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sebor Martin Sebor
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 2h
                  2h
                  Remaining:
                  Remaining Estimate - 2h
                  2h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified