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 the various schemes available?

0 Answers  


What is ipc in unix?

0 Answers  


what is the process id for kernell process

3 Answers  


What is Inode.

2 Answers   HCL,


About ln(linking)

1 Answers   Infosys,






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

0 Answers  


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

0 Answers  


What are the process states in Unix?

11 Answers  


Which ipc is faster?

0 Answers  


Please explain fork() system call?

0 Answers  


How to write the program on full-duplex communication on bidirectional(e.g using two pipes)?

0 Answers  


What is a Daemon?

3 Answers  


Categories