Skip to content
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

temp file api #195

Open
timotheecour opened this issue May 14, 2020 · 1 comment
Open

temp file api #195

timotheecour opened this issue May 14, 2020 · 1 comment
Assignees
Labels

Comments

@timotheecour
Copy link
Owner

timotheecour commented May 14, 2020

links

example use cases

note

for temporary scope / auto-cleanup there are a few options:

Context provides a means of transmitting deadlines, caller cancellations, and other request-scoped values across API boundaries and between processes. It is often used when a library interacts — directly or transitively — with remote servers, such as databases, APIs, and the like.


scratch below

O_TMPFILE

Issue 21515: Use Linux O_TMPFILE flag in tempfile.TemporaryFile? - Python tracker

python3 -c 'import os; fd=os.open(".", os.O_RDWR | os.O_TMPFILE, 0o600)’
uname -a
Linux ee83eead8c5f 4.19.121-linuxkit #1 SMP Tue Dec 1 17:50:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

https://man7.org/linux/man-pages/man2/openat.2.html has good explanation for O_TMPFILE

          There are two main use cases for O_TMPFILE: ...

O_BENEATH

open() flags: O_TMPFILE and O_BENEATH [LWN.net]

open2

openat2(2) - Linux manual page

@maxgrenderjones
Copy link

maxgrenderjones commented May 14, 2020

I'm a git/github newbie so please be gentle, but have just opened nim-lang#14347 to get support for mkstemps
(EDIT: this is now merged)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants