New submission from WGH <w...@torlan.ru>:

In Linux, it's possible to create an unnamed temporary file in a specified 
directory by using open with O_TMPFILE flag (as if it was created with random 
name and immediately unlinked, but atomically). Unless O_EXCL is specified, the 
file can be then linked into filesystem using linkat syscall.

It would be neat if it was possible in Python.

There're a couple of things missing:

1) tempfile.TemporaryFile creates a file with O_EXCL flag, which prevents 
linking it into filesystem.

2) linkat must be called with AT_SYMLINK_FOLLOW flag (otherwise EXDEV is 
returned), which is broken right now (#37612)

----------
components: Library (Lib)
messages: 401676
nosy: WGH
priority: normal
severity: normal
status: open
title: Support for linking unnamed temporary files into filesystem on Linux
type: enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45178>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to