Tim, errno is in fact a thread local variable - check errno.h and sys/storage.h
Colin,
Just tested it and your right.
I’ve never trusted errno in multi-threaded code and that’s one reason I thought all those functions like MsgReceive_R() were created, for multi-threaded environments.
That would mean tho that mq_receive can sometimes fail and not set errno or else the doc’s are out of date with what mq_receive can return as a failure.
Tim
ETIMEDOUT is returned from kernel calls that timeout due to a TimerTimeout being set. In the case
of mq_receive this should not happen. Are you using mq_timedreceive?
Have you tried using the old mqueue server (and not linking against libmq.so) to see if this behaviour
persists?
What version of QNX are you using?