Messages in this thread |  | | Subject | Re: [Patch] shmmin behaviour back to 2.2 behaviour | From | Christoph Rohland <> | Date | 28 Dec 2000 23:13:55 +0100 |
| |
Alan Cox <alan@lxorguk.ukuu.org.uk> writes:
> There are fundmental things shm* can do that mmap cannot. Does posix > shm handle those (leaving segments alive but unattached being the > obvious one)
Yes: shmget == shm_open (+ ftruncate(fd, size)) shmat == mmap (0, size, , , fd, 0) shmdt == munmap (addr, size); shmctl(IPC_RMID) == shm_unlink () shmctl(IPC_STAT) == fstat(); shmctl(IPC_LOCK) == mlock() /*nearly*/ shmctl(IPC_SET) == fchown(), fchmod()
You can get the Linux special behaviour to be able to attach to a removed segment by its shmid by passing the file descriptor for the posix shm from the attached process to the attaching process.
Did I miss something? Christoph
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |