Extending domain of O_TMPFILE?
Mark Geisert
mark@maxrnd.com
Fri Feb 5 10:31:10 GMT 2021
Hi folks,
I've been following up on a response I made to a Cygwin user in
https://cygwin.com/pipermail/cygwin/2021-January/247306.html .
I've figured out that Cygwin's implementation of the open() flag O_TMPFILE
follows Linux in that one can't specify the name of a file when using this
flag. User supplies only the path, and Cygwin chooses an obscure file
name for you.
That means the OP's suggested improvement of applying O_TMPFILE semantics
to files created by tmpfile() won't work.
Could we consider expanding the domain of O_TMPFILE so that the user can
supply a name for the temporary file rather than just the path to its
directory? I've been playing around with proof-of-concept code but I want
to make sure this is acceptable before submitting implementation patches.
This would be a Cygwin-specific enhancement to a Linux-specific feature.
I haven't checked yet if the BSDs have O_TMPFILE in any form.
Thanks for any feedback!
..mark
More information about the Cygwin-developers
mailing list