Skip navigation.
Home
The QNX Community Portal

View topic - resmgr_attach(): The process attaching a path can't see it.

resmgr_attach(): The process attaching a path can't see it.

anything that doesn't fit to other groups.

resmgr_attach(): The process attaching a path can't see it.

Postby RonW » Wed Apr 05, 2017 11:54 am

If I call resmgr_attach() to attach a path to the pathname space, the process that invoked it can't see the attached path. Other processes can. For my application that's an issue; I'm maintaining an existing application and having it create another process is problematic - particularly a process with the same name as the forking process.

How can I make the new path visible to the invoking process?

I'm using 6.3.0SP2.

Thanks.
RonW
New Member
 
Posts: 4
Joined: Wed May 28, 2014 3:21 pm

Re: resmgr_attach(): The process attaching a path can't see

Postby maschoen » Thu Apr 06, 2017 6:29 am

I'm a little unclear on what you mean by "can't see" and why you would want to.

You would use resmgr_attach() in a resource manager that would manage a part of name space.
That resource manager would respond to any type of IO request on that name space, for example,

open("/mynamespace",...);

This would cause your resource manager to send a message to itself. In a thread you might be able to get this to work, but why?

I have to note that in another OS such as Linux the question would translate to, why can't my driver do an OS open call on the device that the driver is handling.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: resmgr_attach(): The process attaching a path can't see

Postby RonW » Thu Apr 06, 2017 11:03 am

Within the process that calls resmgr_attach(), stat(DEVNAME, &buf) and open(DEVNAME, O_RDWR) return -1 and set errno to ENOENT. This occurs even if called from a different thread in the same process.

In any other process, stat(DEVNAME, &buf) and open(DEVNAME, O_RDWR) are successful, i.e. they return 0.

I'm adapting a 3rd party driver so my main application installs it and I don't need to run a separate application to do so.

The structure of the install function is essentially the same as the Momentics IDE example code for thread_pool_create().
RonW
New Member
 
Posts: 4
Joined: Wed May 28, 2014 3:21 pm

Re: resmgr_attach(): The process attaching a path can't see

Postby maschoen » Thu Apr 06, 2017 5:37 pm

I don't know what to say other than you are going about this the wrong way with QNX. I'm not sure that this will never work, but I think it is likely. Is there some reason you can't just spawn the driver from your application?
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm


Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest