How to know whether the message queue is empty or not.



How to know whether the message queue is empty or not...

Answer / pavan

type the command: ipcs -m

you'll get no of messages in Message Q,

else
you can also use msqid_ds structure

i'e : define a structure variable of type
-> struct msqid_ds YOUR_VAR;
and access YOUR_VAR -> msg_qnum
it'll give no of messgaes on Q.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix IPC Interview Questions

How do you execute one program from within another?

4 Answers  


What Happens when you execute a command?

3 Answers  


what about the initial process sequence while the system boots up?

1 Answers  


what is the process id for kernell process

3 Answers  


How can a parent and child process communicate?

3 Answers   TCS,


About i-node numbers

1 Answers  


Max relax-able permission value with out giving write permission to others?

0 Answers  


How can you get or set an environment variable from a program?

2 Answers  


How to know whether the message queue is empty or not.

1 Answers   Fibcom, HCL,


Explain linking across directories?

0 Answers  


What are the system calls used for process management?

3 Answers  


What is a zombie?

10 Answers  


Categories