But if add A function in the process A, read in the Shared memory S variable values (which means the process and process B can read the Shared memory variable), as long as the process A this function A read the variables,,,,
Problem - & gt; Changes cannot be process A Shared memory
Changes to the Shared memory code is as follows:
if (! Sharememory - & gt; Create (size))//create the Shared memory, the size of the size
{
QDebug () & lt;
}
Display: QSharedMemory: : create already exists.
But the size of 0?
CodePudding user response:
Multiple processes and modify the Shared memory data should be the result of the uncertainty, otherwise, what's the use of the lockCodePudding user response:
Read A process applied to open the way to open the Shared memory try, or within A process, use the create directly the result of A pointer, don't create any more