[Previous]
[Contents]
[Next]

qnx_vc_detach()

free a virtual circuit between two processes

Synopsis:

#include <sys/vc.h>
int qnx_vc_detach( pid_t vid );

Description:

The qnx_vc_detach() function frees a virtual circuit vid previously attached using qnx_vc_attach() or qnx_vc_name_attach(). The virtual process entry and message buffer at both ends are released.


Note: If you requested shared vids, you must detach as many times as you attached to really get rid of the vid. Otherwise, a link counter is simply decremented at both the local and remote nodes, and the virtual process entry and memory buffer at both ends are still marked as in use.

When a process dies, all of its virtual circuits are automatically detached.

Returns:

0
Success
-1
An error occurred. errno is set to indicate the error.

Errors:

If any of the following conditions occurs, the qnx_vc_detach() function returns -1, and sets errno to the corresponding value:

EAGAIN
Process manager to net manager enqueuing failed.
ESRCH
There is no virtual circuit vid.
EPERM
The virtual circuit vid isn't attached to your process.

Examples:

See qnx_vc_attach().

Classification:

QNX

Safety:
Interrupt handler No
Signal handler Yes, but modifies errno
Thread Yes

See also:

errno, qnx_vc_attach(), qnx_vc_name_attach()


[Previous]
[Contents]
[Next]