2 ms·
man 2 open section about O_TMPFILE seems to strongly imply that you can linkat from /proc/<pid>/fd to concrete file. Not sure if there are some special cases fo
by zokier 9y ago
man 2 open section about O_TMPFILE seems to strongly imply that you can linkat from /proc/<pid>/fd to concrete file. Not sure if there are some special cases for /proc/self/fd vs /proc/<pid>/fd, but that would seem bit odd.
http://man7.org/linux/man-pages/man2/open.2.html http://man7.org/linux/man-pages/man2/open.2.html
edit: nevermind, seems like O_TMPFILE is the one that has been special-cased here, from man 2 linkat:
> This will generally not work if the file has a link count of zero (files created with O_TMPFILE and without O_EXCL are an exception).
http://man7.org/linux/man-pages/man2/linkat.2.html http://man7.org/linux/man-pages/man2/linkat.2.html
:(