[Qt-interest] QtSharedMemory

Andreas Pakulat apaku at gmx.de
Sat Aug 8 18:40:29 CEST 2009


On 08.08.09 17:25:29, RZ wrote:
> Hi all,
> 
> i got one application that creates a shared memory (more or less an 
> array) in which other "modules" write some debug data. Afterwards I read 
> out the data with the aid of my application and do some nice qwt curves.
> 
> I do this because some of my modules tend to crash and - here's the 
> question - they crash while they are attached to and lock (?) the shared 
> memory. But if this occurs then the shared memory stays locked and I 
> can't read the data with my application - which makes these interesting 
> results unaccessible.
> 
> Is there any way to unlock the lock? I'm doing this on Linux but could 
> not find anything :-(

What exactly does "crash" mean? Is it a segfault or abort? If so you could
install your own signal-handler for the respective signals and try to
unlock the shared memory from there. See man signal for more information.

Andreas

-- 
You will hear good news from one you thought unfriendly to you.



More information about the Qt-interest-old mailing list