Alan Cox <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to