[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    fn_ctx_unbind(3N) manual page Table of Contents

Name

fn_ctx_unbind - unbind a name from a context

Synopsis

cc [ flag ... ] file ... -lxfn [ library ... ]


#include <xfn/xfn.h>

int fn_ctx_unbind(FN_ctx_t *ctx, const FN_composite_name_t *name, FN_status_t *status);

MT-Level

Safe.

Description

This operation removes the terminal atomic name in name from the the target context -- that named by all but the terminal atomic part of name.

This operation is successful even if the terminal atomic name was not bound in target context, but fails if any of the intermediate names are not bound. fn_ctx_unbind() is idempotent.

Return Value

The operation returns 1 if successful, and 0 otherwise.

Errors

fn_ctx_unbind() sets status as described in FN_status_t and xfn_status_codes(3N) .

Certain naming systems may disallow unbinding a name if the name is bound to an existing context in order to avoid orphan contexts that cannot be reached via any name. In such situations, the status code FN_E_OPERATION_NOT_SUPPORTED is returned.

Application Usage

In naming systems that support attributes, and store the attributes along with the names, the unbind operation removes the name and its associated attributes.

Normal resolution always follows links. In an fn_ctx_unbind() operation, resolution of name continues to the target context; the terminal atomic name is not resolved. If the terminal atomic name is bound to a link, the link is not followed and the link itself is unbound from the terminal atomic name.

See Also

FN_composite_name_t(3N) , FN_ctx_t(3N) , FN_ref_t(3N) , FN_status_t(3N) , fn_ctx_bind(3N) , fn_ctx_lookup(3N) , xfn_status_codes(3N) , xfn(3N)


Table of Contents