Skip to content

Respect TMP environment variables for tmp::file on POSIX#230

Merged
bugdea1er merged 6 commits into
bugdea1er:mainfrom
IgnatSergeev:respect-tmp-envvars-posix
Jul 14, 2026
Merged

Respect TMP environment variables for tmp::file on POSIX#230
bugdea1er merged 6 commits into
bugdea1er:mainfrom
IgnatSergeev:respect-tmp-envvars-posix

Conversation

@IgnatSergeev

@IgnatSergeev IgnatSergeev commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Unfortunately std::tmpfile doesn't respect TMPDIR, TMP, and other environment variables for base tmp directories
Implementation mirrors glibc's tmpfile but uses std::filesystem::temp_directory_path to get correct base path
https://sourceware.org/git/?p=glibc.git;a=blob;f=stdio-common/tmpfile.c

Comment thread src/create_file.cpp
Comment thread src/create_file.cpp Outdated
Comment thread src/create_file.cpp Outdated
Comment thread src/create_file.cpp Outdated
@bugdea1er
bugdea1er force-pushed the respect-tmp-envvars-posix branch from 86c77eb to 13ae3d9 Compare July 14, 2026 17:45
@bugdea1er bugdea1er changed the title Support TMP environment variables for tmp::file on POSIX Respect TMP environment variables for tmp::file on POSIX Jul 14, 2026
@bugdea1er
bugdea1er merged commit 27327f1 into bugdea1er:main Jul 14, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants