On Fri 2008-11-07 12:56:04 -0500, Micah Anderson wrote:

> * Daniel Kahn Gillmor <[EMAIL PROTECTED]> [2008-11-06 21:20-0500]:
>
>>   http://www.cs.cf.ac.uk/Dave/C/node27.html#SECTION002730000000000000000
>
> Can you provide more details about what failures you are getting?

Ah; i just copied the examples from that section, and tried building
and running them -- looking in more detail, the examples that i copied
were smat and shmdt examples, not shm_open and shm_unlink.  I'll try
to build some shm_open and shm_unlink examples to provide more
relevant details.

> Probably your examples assume /dev/shm exists, and this is why they
> fail. Looking more into it, it seems like glibc expects it to exist
> when you are trying to do shared memory operations (shm_open,
> shm_unlunk).

Yup.  I suspect this is the the issue.

> Exactly, however I think its more correct to say that glibc >= 2.2
> expects tmpfs to be mounted at /dev/shm for POSIX shared memory
> compliance, although as you notice, it doesn't have to be a tmpfs
> and just having a directory there is sufficient.

Yeah.  that's a bit odd, and i've been unable to find much discussion
about it, unfortunately.

>> Perhaps this directory should be added into the default deboostrap
>> operation?
>
> Probably the shm directory should be added to distrib/defaults/devs
> so it is created correctly.

That sounds like a good proposal.

> As this is typically just a regular tmpfs filesystem, and doesn't
> provide anything special WRT to shared memory, you can either make the
> directory manually, or add it to /etc/vservers/monkey/fstab as a tmpfs
> so it will be mounted when the guest is started.

Should it be added to /usr/lib/util-vserver/defaults/fstab as well?

       --dkg

Attachment: pgpkxu1LSx0s6.pgp
Description: PGP signature

Reply via email to