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

What are two different models of ipc differentiate both?

0 Answers  


Explain the advantage of executing a process in background?

0 Answers  


How to write the program on full-duplex communication using 2 FIFOs

0 Answers  


What are various IDs associated with a process?

3 Answers  


What is daemon?

0 Answers  






What is ipc in unix?

0 Answers  


Please explain fork() system call?

0 Answers  


what is the process id for kernel process?

8 Answers   IBM, ITI, Military Engineer Services, Remo, TATA,


What is an advantage of executing a process in background?

2 Answers  


What is unix ipc?

0 Answers  


How do you execute one program from within another?

4 Answers  


How to get or set an environment variable from a program?

0 Answers  


Categories