|
Boost : |
Subject: Re: [boost] [Interprocess] Possible bug in shared memory on FreeBSD 8.0
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2009-08-11 04:00:51
Ian McCulloch escribió:
> Ion Gaztañaga wrote:
>
>> Manish Vachharajani escribió:
>>> I've been happily using Boost.Interprocess to create shared memory
>>> regions under FreeBSD 7.2, however, I am having issues on FreeBSD 8.0
>>> pre-release. I can reproduce the problem with Boost 1.39.0 and the
>>> svn trunk. The source of the problem appears to be that
>>> Boost.Interprocess calls lseek on a file descriptor returned by
>>> shm_open, but the results of such an lseek are undefined. Below, I
>>> explain further how I came to this conclusion.
>> You are right, it's undefined, but it usually works. However, I can't
>> find a way to obtain the size of a shared memory segment using POSIX, if
>> you could fin a way to do it it would be really nice.
>
> fstat() ?
I should have read this before, I've lost some precious time searching
until I've found fstat ;-)
It's required to work with shared memory:
http://www.opengroup.org/onlinepubs/000095399/functions/fstat.html
I'll fix it ASAP,
Ion
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk