You may want to try the msgctl(msqid, IPC_STAT, struct msqid_ds *msgqdsbuf);
If the call is successful, then the current number of messages can be found using msgdsbuf->msg_qnum
. The caller needed read permissions, which I think you may have in here.
↧
Answer by Ravi for Implementing a WatchDog timer
↧