lkml.org 
[lkml]   [1999]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] mapping parts of shared memory


On Thu, 2 Dec 1999, Bruno Haible wrote:

> 5) Use the proc filesystem. Implement a file /proc/ipc/shm/42 as being
> equivalent to the shared memory segment with id 42.
> File type: regular file
> File size: the shm segment's size
> File contents (for use by read, write, mmap): the shm segment's data
> File owner/group: the shm segment's owner and group
> truncate(): return -EINVAL
>
> Not only would this solve your "mmap of shared memory" problem, it would
> become possible to view and edit shared memory using "cat", "hexdump" and
> "vi". Benefits of the "everything is a file" philosophy.

Don't do it in procfs. Make a separate filesystem and mount it on the
empty directory in /proc, if you really need it (I'ld rather use some
other location - even /dev/shm would be better). This filesystem will have
_nothing_ with proc in terms of code. There is enough mess in procfs
already. Keep this one separate.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site