Quote:
using msgid as a message and NOT as message queue id. Which it is. They are not the same thing. Period.
I do not understand why you make this statement, I have consistently used msgget() to get the ID of the queue, never as a message itself. the msgq_id is a parameter to msgsnd() and msgrcv() to specify the queue for the message.
Now, my confusion was over a msgq_id == 0 as a valid number. It is, in both practice and theory.
@Don is absolutely correct stating
Quote:
Unless the man page explicitly states otherwise, the value of errno after a call to a function that completes successfully is meaningless.
Again, my confusion was that what seemed to be a successful return from msgget() (according to the man page), but not having success. I actually had two bugs that were subtle and misleading, but that is the life of a programmer. (Especially when dealing with *really* bad code.) My searches for information found scant help. The collected wisdom of the community have helped me many times (Thanks, Google!) in finding the obscure information on forums. (If one programs Atmel chips, I recommend avrfreaks.net.)
AND - my purpose in this post was to try to help provide some more information to the next person who had this issue at 3am. The helpful replies have added to that goal, and I thank the posters for their time and attention.