I'm trying to define a shared memory for IPC across two processes on an embedded device where the root is readonly.
It appears that this condition does not allow the creation.
How can I create a shared memory on RO filesystem?
This is the incriminated code:
//...
auto m_fmap = shm_open("/common_memory", O_CREAT | O_RDWR | O_EXCL, (S_IRUSR | S_IWUSR));
if (m_fmap == SHARED_INVALID) {
printf("error opening sh. mem!\n");
Close();
return false;
}