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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the various schemes available?

620


What is i-node numbers?

703


What is ipc port?

656


Explain about daemon?

660


Which ipc is the fastest in unix?

647






Please explain fork() system call?

656


What is unix ipc?

640


Explain the system calls used for process management?

627


What is fork()?

670


Explain the initial process sequence while the system boots up?

621


Which ipc is faster?

642


What is ipc in unix?

660


What is the condition required for dead lock in unix system?

638


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

669


What is the full form of ipc?

709