[Previous] [Contents] [Next]

ConnectDetach(), ConnectDetach_r()

Break a connection between a process and a channel

Synopsis:

#include <sys/neutrino.h>

int ConnectDetach( int coid );

int ConnectDetach_r( int coid );

Library:

libc

Description:

The ConnectDetach() and ConnectDetach_r() functions are identical except in the way they indicate errors. See the Returns section for details.

These kernel calls are used to detach the connection specified by the coid argument. If any threads are blocked on the connection (MsgSendv()) at the time the connection is detached, the send fails and returns with an error.

Blocking states

These calls don't block.

Returns:

The only difference between these functions is the way they indicate errors:

ConnectDetach()
If an error occurs, -1 is returned and errno is set. Any other value returned indicates success.
ConnectDetach_r()
EOK is returned on success. This function does NOT set errno. If an error occurs, any value in the Errors section may be returned.

Errors:

EINVAL
The connection specified by coid doesn't exist.

Classification:

QNX 6

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

ConnectAttach(), MsgSendv()


[Previous] [Contents] [Next]