Remove a name from the namespace and destroy the channel
#include <sys/iofunc.h> #include <sys/dispatch.h> int name_detach( name_attach_t * attach, unsigned flags );
- A pointer to the name_attach_t structure returned by a successful call to name_attach().
- Flags that affect the function's behavior:
- NAME_FLAG_DETACH_SAVEDPP — don't destroy the dispatch handle.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The name_detach() function removes the name from the namespace and destroys the channel created by name_attach(). If you set NAME_FLAG_DETACH_SAVEDPP in flags, the dispatch pointer contained in the name_attach_t structure isn't destroyed; it's up to you to destroy it by calling dispatch_destroy(). The default is to destroy the dispatch pointer.
Zero on success, or -1 if an error occurs ( errno is set).
- The mount ID (mntid) was never attached with name_attach().
Last modified: 2014-06-24