You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no attach method for outside of node.js environments. I created a SHM in C++ but the node cant attach with it. To have access to shm, it must have created it own.
Another problem is: I'm creating a shm with a key and can reading in same execution session but I start a new execution with same key to read previous data then create method returns null and failing. Because of theresi is no attach method and create method already has IPC_EXCL flag.
Please your attention:
res = shm.get(key, count, shm.IPC_CREAT|shm.IPC_EXCL|perm, 0, type);
I think that if second flag (IPC_EXCL) will be ommitted from create method then the problem above solved and the create method can create a new and can attach already one.
Also, if we consider the server environment safe, the permissions must be set to 666 for another program to read and write.
There is no attach method for outside of node.js environments. I created a SHM in C++ but the node cant attach with it. To have access to shm, it must have created it own.
Another problem is: I'm creating a shm with a key and can reading in same execution session but I start a new execution with same key to read previous data then create method returns null and failing. Because of theresi is no attach method and create method already has IPC_EXCL flag.
Please your attention:
res = shm.get(key, count, shm.IPC_CREAT|shm.IPC_EXCL|perm, 0, type);
I think that if second flag (IPC_EXCL) will be ommitted from create method then the problem above solved and the create method can create a new and can attach already one.
Also, if we consider the server environment safe, the permissions must be set to 666 for another program to read and write.
Ref: https://man7.org/linux/man-pages/man2/shmget.2.html
The text was updated successfully, but these errors were encountered: