Skip navigation.
Home
The QNX Community Portal

View topic - name_open() with NAME_FLAG_ATTACH_GLOBAL,& GNS on QNX 6.6

name_open() with NAME_FLAG_ATTACH_GLOBAL,& GNS on QNX 6.6

Discussion about the QNX6 OS.

name_open() with NAME_FLAG_ATTACH_GLOBAL,& GNS on QNX 6.6

Postby nava » Wed Feb 03, 2016 1:07 pm

Hi,
I am doing sample qnx share memory programing using name_open() and name_attach() with flag NAME_FLAG_ATTACH_GLOBAL
Ref:
http://www.qnx.com/developers/docs/660/ ... open%22%20
http://www.qnx.com/developers/docs/660/ ... open%22%20
however, the name_attach returns -1 with errorno 2 i.e. no such file or directory. Note that qnet is running and /net folder has been created with connected target devices host-name as sub-folders
I checked and found that gns needs to be in running state before running application who is using NAME_FLAG_ATTACH_GLOBAL
I found that gns was not running on my 6.6 target by using ps -ea command. So I tried to run it manually, manually running gns gives me error "Another GNS already running".
I searched for gns on qnx6.6 and found a release note http://www.qnx.com/developers/articles/rel_5849_7.html.
I verified set-up on qnx 6.5 and it seems gns is running successfully on it resulting my app running successfully.
So is there any alternative for GNS on qnx 6.6 ?
how the solution for GNS connect to qnx and NAME_FLAG_ATTACH_GLOBAL will work for name_open()
nava
New Member
 
Posts: 5
Joined: Tue Feb 02, 2016 9:50 am

Re: name_open() with NAME_FLAG_ATTACH_GLOBAL,& GNS on QNX 6.

Postby Tim » Wed Feb 03, 2016 4:12 pm

The 'Another GNS is already running' error means that you tried to start GNS as a Server when there is another QNX node on the network that is already running GNS as the server.

Do you have another QNX machine besides your 6.6 one running gns (you said you are running qnet so I suspect this is what you are doing)?

If you want 2 QNX machines running GNS, one has to be a client.

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

Re: name_open() with NAME_FLAG_ATTACH_GLOBAL,& GNS on QNX 6.

Postby denkelly » Wed Feb 03, 2016 8:37 pm

There is an error in slogger2 causing this issue. Start gns BEFORE slogger2 and you will be fine.
denkelly
Senior Member
 
Posts: 161
Joined: Sat Aug 02, 2008 3:27 pm

Re: name_open() with NAME_FLAG_ATTACH_GLOBAL,& GNS on QNX 6.

Postby nava » Thu Feb 04, 2016 1:22 pm

starting the gns before slogger2 solved the issue
thanks
nava
New Member
 
Posts: 5
Joined: Tue Feb 02, 2016 9:50 am

Re: name_open() with NAME_FLAG_ATTACH_GLOBAL,& GNS on QNX 6.

Postby qnxloader » Fri Feb 05, 2016 9:46 am

Hi, I was have the same problem and resolve it as described bellow, but slogger2 in this solution do not working correctly: attempting write to slogger2, show message:
" slog2_api: cannot connect to slogger2 server: errno=No such file or directory
Error registering slogger2 buffer"
This because slogger2 create in /dev/name/local/slogger2 folder, but normaly it file...
Is this some solution using slogger2 with gns?
qnxloader
Senior Member
 
Posts: 206
Joined: Mon Oct 06, 2003 8:29 am


Return to QNX6 - OS

Who is online

Users browsing this forum: Exabot [Bot] and 4 guests