IPC::Msg doesn't reveal cbytes

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I am using IPC::Msg to write to message queues, as a producer process.
I would like to periodically poll the status of the queue to ensure
that the corresponding consumer process is alive and reading from the
queue. My intention is to test the 'fullness' of the queue by
monitoring the '__msg_cbytes' parameter (as taken from
'/usr/include/bits/msq.h' (using Linux, 2.6 kernel). The cbytes
parameter returned by the stat() function seems to be mysteriously
absent from the returned data structure. Can anyone explain this, and
any fix or workaround? Thanks in advance.
    ----    rod.

Site Timeline