Public bug reported: shmget() allows creation of shared memory segments with key_t key values that can be used by other processes to identify them. Traditionally, under Linux the shmctl() call could be used to caused a shared memory segment to destroy itself upon the last detachment by IPC_RMID, and this would have no other impact on the operation of the shared memory segment. This behavior of IPC_RMID is documented (in the shmctl man page) and is quite useful. However, setting IPC_RMID in recent Linux kernels has the important side effect of CHANGING the key associated with the segment to 0 (aka, IPC_PRIVATE). Ideally, this side effect should be removed from the kernel, but the kernel folks seem unlikely to do this (the new behavior was mentioned in a discussion). Thus, I suggest fixing the shmctl man page to mention this strange behavior in the discussion of IPC_RMID: after "IPC_STAT will be set." add the phrase "The segment key may be changed to IPC_PRIVATE as a side effect of IPC_RMID."
** Affects: Ubuntu Importance: Undecided Status: Unconfirmed -- shmctl man differs from kernel operation https://launchpad.net/bugs/62858 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs