mq_open() is failed with errno 78

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: 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

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?

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

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

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.

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