dlclose(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

dlclose(3c)

dlclose(3C)              Standard C Library Functions              dlclose(3C)

NAME
       dlclose - close a shared object

SYNOPSIS
       #include <dlfcn.h>

       int dlclose(void *handle);

DESCRIPTION
       The  dlclose()  function decrements the reference count of the supplied
       handle. This handle represents an executable object file and its depen‐
       dencies, acquired from a previous call to dlopen(). A handle that is no
       longer referenced is processed in an attempt to unload any objects that
       are associated with the handle from the current  process.  An  unrefer‐
       enced handle is no longer available to dlsym().


       Any finalization code within an object is executed prior to that object
       being  unloaded.  Any routines registered by an object using atexit(3C)
       are called prior to that object being unloaded. See NOTES.

RETURN VALUES
       If the handle was successfully unreferenced, dlclose()  returns  0.  If
       the handle is invalid, or an error occurred as a result of unloading an
       object,  dlclose()  returns a non-zero value. Additional diagnostic in‐
       formation is available through dlerror().

USAGE
       The dlclose() function is one of a family of functions  that  give  the
       user  direct access to the dynamic linking facilities. These facilities
       are available to dynamically-linked processes only. See the Oracle  So‐
       laris 11.4 Linkers and Libraries Guide.

ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe _  Stan‐
       dardSee standards(7).


SEE ALSO
       dldump(3C),  ld(1),  ld.so.1(1),  atexit(3C),  dladdr(3C), dlerror(3C),
       dlopen(3C), dlsym(3C), attributes(7), standards(7)


       Oracle Solaris 11.4 Linkers and Libraries Guide

NOTES
       A successful invocation of dlclose() does not guarantee  that  the  ob‐
       jects  associated with the handle are removed from the address space of
       the current process. Objects can be referenced by multiple handles,  or
       by  other  objects.  An object is not removed from the address space of
       the current process until all references to that object are removed.


       Once an object has been closed by dlclose(), referencing  symbols  con‐
       tained in that object can cause undefined behavior.


       As  part of unloading an object, finalization code within the object is
       called before the dlclose() returns. This finalization  is  user  code,
       and  as  such,  can produce errors that can not be caught by dlclose().
       For example, an object loaded using RTLD_LAZY that attempts to  call  a
       function that can not be located, results in process termination. Erro‐
       neous  programming  practices within the finalization code can also re‐
       sult in process termination. The runtime linkers debugging facility can
       offer help identifying these types of error. See the LD_DEBUG  environ‐
       ment variable of ld.so.1(1).

Oracle Solaris 11.4              23 April 2014                     dlclose(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3