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. */
643
+
flags |= IPC_CREAT;
624
644
}
625
645
626
646
if (!shm_handle) {
@@ -649,6 +669,19 @@ TSRM_API int shmget(key_t key, size_t size, int flags)
649
669
}
650
670
}
651
671
672
+
if (key==IPC_PRIVATE) {
673
+
/* 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
674
+
* 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