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

Max relaxable permisssion value with out giving write permission to others?

2 Answers   IBM,


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

1 Answers   Fibcom, HCL,


What is a zombie?

10 Answers  


What is daemon?

0 Answers  


Please explain fork() system call?

0 Answers  






What are the system calls used for process management:

5 Answers  


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

1 Answers  


Please describe the initial process sequence while the system boots up?

0 Answers  


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

0 Answers  


Explain what are the system calls used for process management?

0 Answers  


What are two different models of ipc differentiate both?

0 Answers  


what is the very first process created by kernell

5 Answers  


Categories