Re: shm_open
Jorge Almeida <[email protected]> Tue, 10 Jun 2014 08:29:56 +0100
| Newsgroups | gmane.linux.lib.dietlibc |
|---|---|
| Message-ID | <CAKpSnpKqAkdjiXUDuOGQvgAHAqcyVMPYiMr3wZo2VpJmnsx5Bg@mail.gmail.com> |
On Tue, Jun 10, 2014 at 3:02 AM, Felix von Leitner <[email protected]> wrote: >> > If I needed to use shared memory, I'd use a file and mmap. > The semantics of that are well defined and well known. > Use mkstemp to create the file name, if you need to generate one. > Also, please don't put the files in /tmp, put them in some special dir > your app creates at program start time, with the permissions on in > locked down so nobody else can write to it. > I decided not to use shared memory. I disliked using /dev/shm and hated the idea of wasting 4096B just to share 6 bytes... Anyway, I wanted to use a file just to provide an entry point for client programs (similar to a named pipe) Jorge