Open a name for a server connection
int name_open( const char * name,
int flags );
- The name that you want to open for a server connection.
- Flags that affect the function's behavior:
- NAME_FLAG_ATTACH_GLOBAL — search for the name
globally instead of locally.
Use the -l c option to
to link against this library.
This library is usually included automatically.
The name_open() function opens name for a server connection.
No ordering is guaranteed when accessing resources on other nodes.
||In the past, when an application used name_open()
to connect to a service, the server wasn't notified.
Now, an _IO_CONNECT message with a subtype of
_IO_CONNECT_OPEN is sent to the server.
The server application must be able handle this message.
For an example, see the documentation for
A nonnegative integer representing a side-channel connection ID
or -1 if an error occurred
(errno is set).
- Search permission is denied on a component of the name.
- While attempting to open the named file, either the file itself or a
component of the path prefix was found to be corrupted. A system
failure — from which no automatic recovery is possible —
occurred while the file was being written to, or while the directory was
being updated. You'll need to invoke appropriate
systems-administration procedures to correct this situation before
- The connection specified by name has already been opened and additional connections aren't permitted.
- The name_open() operation was interrupted by a signal.
- The named path is a directory.
- Too many levels of symbolic links or prefixes.
- Too many file descriptors are currently in use by this process.
- The length of the name string exceeds
PATH_MAX, or a pathname component is longer than
- Too many files are currently open in the system.
- The connection specified by name doesn't exist.
- A component of the name prefix isn't a directory.
chapter of Getting Started with QNX Neutrino