Quote:> So the advantage here is that the file persists on the filesystem which
> allows me to get some descriptors back from inactive clients?
Exactly. Both the client and the server can 'put the file down' and then
'pick it up again'.
> what's the difference between shm_open and plain open? Does the VM handle
> these pages differently?
Most UNIXes treat them exactly the same, except that pages backed by a
file might get 'synched' to physical media occasionally. Pure shared memory,
on the other hand, would only be written to disk if the system paged. Mny
modern systems will actually page out even when not low on memory (to make
more free memory available for caching) so you might see even less
difference than you'd expect.
Quote:> I would still have to do the UID negotiation business so that the root
> process knows which file (memory) to access the data in right? Or does
> your technique suggest a different method?
You have any number of options. If the files go in a designated
directory, the root process could simply scan the directory for new files
periodically. Either process could remove the file when it was no longer
How much information do you need to communicate? Do you really need/want
shared memory or would a message interface be equally good or better? Also,
are you targetting any specific platforms or are you looking to stay