Hi,
does anyone know how i can check how many messages are in the message queue, i tried IPC_STAT but it gives me a constant of 2.
any help would be appreciated!!
Hi,
does anyone know how i can check how many messages are in the message queue, i tried IPC_STAT but it gives me a constant of 2.
any help would be appreciated!!
Code:struct msqid_ds ds; if (msgctl(msqid, IPC_STAT, &ds) == -1) { perror ("msgctl"); } else { printf ("There are %d msgs on the q\n", ds.msg_qnum); }
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
thanks mate