Skip navigation.
Home
The QNX Community Portal

View topic - mq_open() is failed with errno 78

mq_open() is failed with errno 78

Discussion about the QNX6 OS.

mq_open() is failed with errno 78

Postby nava » Wed Mar 30, 2016 11:32 am

Hi
I am calling mq_open as
mq_open(qname, O_WRONLY|O_CREAT|O_NONBLOCK, 0666, &mqattr );
in regression test mq_open is failed with errno 78
I checked qname and found that its size less than 64
however I found that errno 78 indicates ENAMETOOLONG The length of name exceeds PATH_MAX
ref: http://www.qnx.com/developers/docs/6.3. ... ml?lang=de
what are the possible cases/reasons that mq_open() failed with 78
I am linking my sample app with -lmq
could you please guide me to solve this issue

Thanks And Regards,
nava
nava
New Member
 
Posts: 5
Joined: Tue Feb 02, 2016 9:50 am

Re: mq_open() is failed with errno 78

Postby space » Wed Mar 30, 2016 1:44 pm

Try using a hard coded queue name.
mq_open( "test1", O_WRONLY|O_CREAT|O_NONBLOCK, 0666, &mqattr );

Make sure it shows up at "/dev/mq/test1" after it is created.

Are you using a mq to communicate with a non-QNX system?
space
Active Member
 
Posts: 16
Joined: Fri Mar 09, 2007 6:03 pm
Location: Texas

Re: mq_open() is failed with errno 78

Postby nava » Thu Mar 31, 2016 5:13 am

I tried to hard code the value and run the test ..
able to get the "/dev/mq/test1"
but while doing regression test it failed and test1 is present.
I am not sure why it is there .. because I did not call mq_unlink() so it is still present
I am communicating with other process running on same qnx system
nava
New Member
 
Posts: 5
Joined: Tue Feb 02, 2016 9:50 am

Re: mq_open() is failed with errno 78

Postby Tim » Thu Mar 31, 2016 2:21 pm

Can you post your code and by that I don't just mean 1-2 lines, as much of the regression test code as you can.

Are you running as root?

Tim
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am

Re: mq_open() is failed with errno 78

Postby denkelly » Sat Apr 02, 2016 11:25 am

>>>because I did not call mq_unlink() so it is still present
Yes - the name remains when the server that created it dies

>>>I am communicating with other process running on same qnx system
Actually "no process" - which is why the next open fails

Create a server signal handler which on exit, deletes the filesystem entry.
denkelly
Senior Member
 
Posts: 160
Joined: Sat Aug 02, 2008 3:27 pm

Re: mq_open() is failed with errno 78

Postby nava » Tue Apr 05, 2016 4:59 am

Hi Tim and denkelly,

thanks for the inputs
sorry Tim I could not share the code . It is proprietary code
I am trying signal handler mechanism , will post you soon
is any qnx tool or utility help me to do analysis
nava
New Member
 
Posts: 5
Joined: Tue Feb 02, 2016 9:50 am


Return to QNX6 - OS

Who is online

Users browsing this forum: No registered users and 2 guests