[Previous]
[Contents]
[Next]

qnx_fd_detach()

release a file descriptor

Synopsis:

#include <sys/fd.h>
int qnx_fd_detach( int fd );

Description:

The qnx_fd_detach() function releases a file descriptor, fd. If a virtual circuit is attached to the file descriptor, it's released, provided that it isn't shared, or, if it is shared, its usage count goes to zero.

Returns:

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

Errors:

EBADF
The file descriptor fd doesn't exist.

Examples:

A meaningful example is beyond the scope of the library documentation. Contact QNX Software Systems Ltd. for availability of a technical note on resource managers.

Classification:

QNX

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

See also:

errno, qnx_fd_attach(), qnx_fd_query()


[Previous]
[Contents]
[Next]