I am trying to create a POSIX message queue but mq_open() returns -1 all the time. Here is my code. What might be the reason? How can I understand?
mqd_t mq;
struct mq_attr attr;
mq = mq_open("/randomMq", (O_RDONLY | O_CREAT), 0666, &attr);
printf("%d\n",mq);