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 is the condition required for dead lock in unix system?

558


Explain what is the process id for kernel process?

585


Which ipc is the fastest in unix?

558


What is daemon?

540


What is ipc in unix?

568






Explain about daemon?

571


How to write the program on full-duplex communication on bidirectional?

558


Tell me set-user-id is related to (in unix)?

557


Explain how do you execute one program from within another?

538


What is ipc port?

578


Please explain fork() system call?

565


Explain the initial process sequence while the system boots up?

556


What is the very first process created by kernel?

603


What are two different models of ipc differentiate both?

590


What is fork()?

606