linux - How to use shm_open to open an existing Shared Memory object -
If I do not exit, then I do not want to create a new shared memory object but return an error in this situation. I want to be open only if it already exists.
Read & amp; .
If shm_open
is not given this O_CREAT
flag will fail if the name does not exist, as does it. If O_CREAT
and O_EXCL
are given, it may also fail if the name exists that is said to be what happens with this failure :
ENOENT shm_open () A name was attempted that did not exist, and O_CREAT was not specified.
EEXIST both O_CREAT and O_EXCL were specified for shm_open () and the named memory object specified by name already exists.
On some Linux systems, you will learn about / dev / shm /
current POSIX shared memory segment.
Comments
Post a Comment