dupfd_unregister()
Unregister a handle that was returned by a call to dupfd_register()
Synopsis:
#include <sys/dupfd.h>
int dupfd_unregister( const dupfd_handle_t handle );
Arguments:
- handle
- The handle returned from dupfd_register().
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
The dupfd_unregister() function unregisters a handle that was returned by a call to dupfd_register(). It is not usually necessary to call it because a handle is automatically unregistered either when it is redeemed, or when it has not been redeemed and space is required by a later call to dupfd_register() that does not include the DUPFD_NO_DISCARD flag. The dupfd_unregister() function is useful to allow you to customize which handle to discard when the limit on the number of handles has been reached.
Returns:
0 if successful, -1 on error (errno is set).
Errors:
- ENOENT
- The handle is not valid.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |