On 13/12/2022 12:46 am, Sergey Bugaev wrote:
@@ -90,6 +95,21 @@ __file_name_lookup_at (int fd, int at_flags,
}
}
+ if ((orig_flags & __O_TMPFILE) == __O_TMPFILE)
+{
+ /* What we have looked up is not the file iteself, but actually
s/iteself/itself.\/
+ th
This is a flag that causes open () to create a new, unnamed file in the
same filesystem as the given directory. The file descriptor can be
simply used in the creating process as a temporary file, or shared with
children processes via fork (), or sent over a Unix socket. The file can
be left anonymo
Instead of __file_name_lookup_at delegating to __file_name_lookup
in simple cases, make __file_name_lookup_at deal with both cases, and
have __file_name_lookup simply wrap __file_name_lookup_at.
---
hurd/hurdlookup.c | 10 ++
hurd/lookup-at.c | 51 -
This adds a special SHM_ANON value that can be passed into shm_open ()
in place of a name. When called in this way, shm_open () will create a
new anonymous shared memory file. The file will be created in the same
way that other shared memory files are created (i.e., under /dev/shm/),
except that it
This is an attempt to add O_TMPFILE (from Linux) and SHM_ANON (from FreeBSD)
to the Hurd.
The Hurd already has the very handly dir_mkfile API that lets you create
anonymous/unnamed files -- ones that can either be used as just tmp files,
given to other processes via fork or IPC, or linked into the