Re: [Patch] shmmin behaviour back to 2.2 behaviour

From: Christoph Rohland (cr@sap.com)
Date: Thu Dec 28 2000 - 17:13:55 EST


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/



This archive was generated by hypermail 2b29 : Sun Dec 31 2000 - 21:00:11 EST