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 two different models of ipc differentiate both?

580


Which ipc is faster?

567


Explain what is the process id for kernel process?

579


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

551


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

550






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

552


What is ipc in unix?

563


What is daemon?

534


What are the various schemes available?

545


What is fork()?

601


What is ipc port?

574


What are the various schemes available in ipc?

555


Explain what are the system calls used for process management?

514


Please explain fork() system call?

561


Explain the initial process sequence while the system boots up?

550