lkml.org 
[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
From
Date
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/

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