difference between msgget() and mq_open

c, linux, message-queue

Solution

Basicly, `msgget`, `msgsnd`, `msgrcv` are System V IPC, while `mq_open`, `mq_send`, `mq_receive` are POSIX IPC.

A good explaination: System V IPC vs POSIX IPC

Oracle Document for System V IPC

Oracle Document for POSIX IPC

In summary, POSIX IPC is designed after System V IPC. So a lot of old systems support only System V IPC while new systems begin to support POSIX IPC as well. And, because POSIX IPC can learn the advantages and disadvantages from System V IPC, POSIX IPC may be designed and implemented better. A notable difference is that all the POSIX IPC interfaces are thread safe.

Problem

I Read about message queue operations such as msgget(), msgsnd() and msgrcv(). But when I was searching for message queue related questions on stack overflow, I came to know there is another set of message queue operations such as mq_open(), mq_send(), mq_receive(). Can any one please let me know what are the differences between these 2 types of message queues and which type of message queues are extensively being used?

Original source

Related problems