Remove a name from the namespace and destroy the channel
#include <sys/dispatch.h>
int name_detach( name_attach_t * attach,
unsigned flags );
libc
The name_detach() function removes the name from the namespace and destroys the channel created by name_attach(). When flags is set to NAME_FLAG_DETACH_SAVEDPP the dispatch pointer contained in the name_attach_t structure isn't destroyed, it's up to you to destroy it with dispatch_destroy(). The default is to destroy the dispatch pointer.
Zero on success, or -1 if an error occurs (errno is set).
See name_attach() and resmgr_detach().
| Safety: | |
|---|---|
| Cancellation point | Yes |
| Interrupt handler | No |
| Signal handler | No |
| Thread | Yes |
ChannelDestroy(), dispatch*() functions, name_attach(), name_open(), name_close(), resmgr_detach()