Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - POSIX mq_receive() call fails sporadically and sets errno EFAULT : (2 Items)
   
POSIX mq_receive() call fails sporadically and sets errno EFAULT  
POSIX mq_receive() call fails sporadically and sets errno EFAULT (,which is not documented for this call in QNX 
documentation)
  
In my application, I use a posix message queue which works fine without any issues, but very sporadically mq_receive 
call returns -1 and sets errno EFAULT (BAD ADDRESS).

The documentation of mq_receive doesn't specify that EFAULT errno is set. 

Could someone throw more light on this behavior of mq_receive?
Or if you think of scenarios in which cases EFAULT is set by mq_receive()?

Thanks in advance for any hints.
RE: POSIX mq_receive() call fails sporadically and sets errno EFAULT  
EFAULT almost always means that a bad buffer was provided to a kernel call.  mq_receive() will be using some message 
passing internally.  In the cases where you received EFAULT, is msg_ptr and msg_len arguments to mq_receive() correct?
________________________________________
From: Yogesh Kumar N J [community-noreply@qnx.com]
Sent: Tuesday, September 20, 2016 8:09 AM
To: ostech-core_os
Cc: andreas.lyncker@siemens.com; nicol.vogler@siemens.com
Subject: POSIX mq_receive() call fails sporadically and sets errno EFAULT

POSIX mq_receive() call fails sporadically and sets errno EFAULT (,which is not documented for this call in QNX 
documentation)

In my application, I use a posix message queue which works fine without any issues, but very sporadically mq_receive 
call returns -1 and sets errno EFAULT (BAD ADDRESS).

The documentation of mq_receive doesn't specify that EFAULT errno is set.

Could someone throw more light on this behavior of mq_receive?
Or if you think of scenarios in which cases EFAULT is set by mq_receive()?

Thanks in advance for any hints.




_______________________________________________

OSTech
http://community.qnx.com/sf/go/post116824
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com