I am trying to open a queue on linux in C++ and it returns a -1 error. how would I debug this issue.
int32_t MaxMsgs;
int32_t MaxMsgLength;
eoMQHndlT msgQptr = -1;
char temp[32];
mq_unlink(temp);
struct mq_arrt msQAtt; msQAtt.mq_flags = 0; msQAtt.mq_maxmsg = MaxMsgs; msQAtt.mq_magsize = MaxMsgLength; msQAtt.mq_curmsgs = 0;
msgQptr = mq_open(temp,O_RDWR|O_CREAT,S_IRUSR | S_IWUSR, &msQAtt);
The variables MaxMsgs and MaxMsgLength are sent it to this call and those values are ex1: MaxMsgs = 10, MaxMsgLength=1232 and ex2:MaxMsgs = 2400, MaxMsgLength=4136 Appreciate some feedback