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
/* IPC_PRIVATE always creates a new segment even if IPC_CREAT flag isn't passed. */
648
+
flags |= IPC_CREAT;
629
649
}
630
650
631
651
if (!shm_handle&& !info_handle) {
@@ -662,6 +682,19 @@ TSRM_API int shmget(key_t key, size_t size, int flags)
662
682
}
663
683
}
664
684
685
+
if (key==IPC_PRIVATE) {
686
+
/* This should call shm_get with a brand new key id that isn't used yet. See https://man7.org/linux/man-pages/man2/shmget.2.html
687
+
* Because extensions such as shmop/sysvshm can be used in userland to attach to shared memory segments, use unpredictable high positive numbers to avoid accidentally conflicting with userland. */
0 commit comments