connection timeout in mq_receive()

Tim, errno is in fact a thread local variable - check errno.h and sys/storage.h


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.


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 to see if this behaviour

What version of QNX are you using?