with mmap(), processes must inherit the mapping from a parent to share memory. is there a way to share memory between processes that don’t share a parent? shmat() seems to be the best solution, but it requires clean up if the processes didn’t detach the memory on exit/die. Domain sockets are close to sharing memory… Answer With mmap, processes must
Tag: sysv-ipc
How do I find waiting readers/writers for Linux System V Msg Queues?
I’m tasked with porting some C/C++ code that uses System V queues from HP-UX to Red Hat Linux (SVr4). Most of the calls have translated over fine, but I’m having difficulty with one specific issue as it relates to discovering waiting readers and writers on a given queue. On HP, one can use msgctl(IPC_STAT) to obtain a msqid_ds struct with