samad_lotia
Registered
I would like to use message queues in one of my programs. Does OSX not support either POSIX or System V message queues or am I setting up my programs wrong? /usr/include/sys/msg.h (for SysV message queues) and /usr/include/mqueue.h (for POSIX message queues) do not exist. I tried compiling an example program (the snippet is at the bottom) using SysV MQs without #including sys/msg.h. The program compiles fine. But when I actually run the program, I get the error:
msgget: Operation not supported
Btw, ftok() works just fine.
I noticed that in /var/spool, there are 2 directories called mqueue and clientmqueue. Very peculiar.
...
if ((msqid = msgget(key, 0644)) == -1) { /* connect to the queue */
perror("msgget");
exit(1);
}
...
Samad
msgget: Operation not supported
Btw, ftok() works just fine.
I noticed that in /var/spool, there are 2 directories called mqueue and clientmqueue. Very peculiar.
...
if ((msqid = msgget(key, 0644)) == -1) { /* connect to the queue */
perror("msgget");
exit(1);
}
...
Samad