[lkml]   [2000]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Patch] shmmin behaviour back to 2.2 behaviour
Alan Cox <> 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)

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?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.077 / U:3.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site