Ted Unangst wrote:
bytevolc...@safe-mail.net wrote:
When I use ftruncate(2) to actually allocate the segment, the file is as
long as the segment that is allocated.

Even if the file is unlinked before ftruncate(2) is called, enough free
space in the /tmp *file system* is required for the shared memory segment.

Is using ftruncate(2) to lengthen the segment the right way to do it, or
is this yet another stupid limitation of POSIX shared memory?

ftruncate is really the only way to do it.

There's nothing special about shm_open. It's just open with a different name.
If you want the files on a different filesystem, you can use open.


I see where you are coming from, but what I am getting at is, where in the POSIX standard does it say that it needs to be anywhere in the file system at all? If it is shared memory, then surely this doesn't require backing up.

Reply via email to