Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pb queues of messages

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am using in a program some queues to exchange messages (functions msgsnd, msgrcv).....my problem is for the use of msgctl function .........I want to use to have some infos on a queue
I wrote:
msgctl(IdQueue,IPC_STAT,infosQueue);
with this declaration:
struct msqid_ds * infosQueue;

My problem is that before like after the function , infosQueue never change.

I would like to know how does this function really works. And if somebody knows how to use it.
Thanks
 
Hello,

The problem is that infosQueue does not point to real memory.

try:
Code:
struct msqid_ds infosQueue; /* Note the missing '*' */

msgctl(IdQueue,IPC_STAT, &infosQueue); /* Note the inserted '&' */

Brudnakm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top