4 ms·
For the temp file issue, there's the common pattern of creating a file and unlinking it right away while keeping an open file handle. It's unfortunate that the
by KMag 6y ago
For the temp file issue, there's the common pattern of creating a file and unlinking it right away while keeping an open file handle. It's unfortunate that there's not a version of creat() that takes a path to a directory (for determining on which fs to create) but doesn't link the file, plus a version of link() that takes a source file descriptor instead of a source file.
If extended to support non-file fds, the link function might also do some interesting things, like have TCP connections show up in the virtual file system, similar to Unix pipes.