1fcf53d9bSJohn Marino.\" This source code is a product of Sun Microsystems, Inc. and is provided 2fcf53d9bSJohn Marino.\" for unrestricted use provided that this legend is included on all tape 3fcf53d9bSJohn Marino.\" media and as a part of the software program in whole or part. Users 4fcf53d9bSJohn Marino.\" may copy or modify this source code without charge, but are not authorized 5fcf53d9bSJohn Marino.\" to license or distribute it to anyone else except as part of a product or 6fcf53d9bSJohn Marino.\" program developed by the user. 7fcf53d9bSJohn Marino.\" 8fcf53d9bSJohn Marino.\" THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC. 9fcf53d9bSJohn Marino.\" SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY 10fcf53d9bSJohn Marino.\" OF SUCH SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT 11fcf53d9bSJohn Marino.\" EXPRESS OR IMPLIED WARRANTY OF ANY KIND. SUN MICROSYSTEMS, INC. DISCLAIMS 12fcf53d9bSJohn Marino.\" ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED 13fcf53d9bSJohn Marino.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN 14fcf53d9bSJohn Marino.\" NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT, 15fcf53d9bSJohn Marino.\" INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 16fcf53d9bSJohn Marino.\" FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY. 17fcf53d9bSJohn Marino.\" 18fcf53d9bSJohn Marino.\" This source code is provided with no support and without any obligation on 19fcf53d9bSJohn Marino.\" the part of Sun Microsystems, Inc. to assist in its use, correction, 20fcf53d9bSJohn Marino.\" modification or enhancement. 21fcf53d9bSJohn Marino.\" 22fcf53d9bSJohn Marino.\" SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 23fcf53d9bSJohn Marino.\" INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS 24fcf53d9bSJohn Marino.\" SOURCE CODE OR ANY PART THEREOF. 25fcf53d9bSJohn Marino.\" 26fcf53d9bSJohn Marino.\" Sun Microsystems, Inc. 27fcf53d9bSJohn Marino.\" 2550 Garcia Avenue 28fcf53d9bSJohn Marino.\" Mountain View, California 94043 29fcf53d9bSJohn Marino.\" 30fcf53d9bSJohn Marino.\" Copyright (c) 1991 Sun Microsystems, Inc. 31fcf53d9bSJohn Marino.\" 32fcf53d9bSJohn Marino.\" $FreeBSD: release/8.1.0/lib/libc/gen/dlopen.3 205979 2010-03-31 13:51:31Z gahr $ 33fcf53d9bSJohn Marino.\" 34c19ddaabSSascha Wildner.Dd April 29, 2011 35fcf53d9bSJohn Marino.Dt DLCLOSE 3 36fb5b3747SSascha Wildner.Os 37fcf53d9bSJohn Marino.Sh NAME 38fcf53d9bSJohn Marino.Nm dlclose 39fcf53d9bSJohn Marino.Nd unlink shared object from process address space 40fcf53d9bSJohn Marino.Sh LIBRARY 419f488f94SSascha WildnerThis function is not in a library. 429f488f94SSascha WildnerIt is included in every dynamically linked program automatically. 43fcf53d9bSJohn Marino.Sh SYNOPSIS 44fcf53d9bSJohn Marino.In dlfcn.h 45fcf53d9bSJohn Marino.Ft int 46fcf53d9bSJohn Marino.Fn dlclose "void *handle" 47fcf53d9bSJohn Marino.Sh DESCRIPTION 48fcf53d9bSJohn MarinoThe 49fcf53d9bSJohn Marino.Fn dlclose 50fcf53d9bSJohn Marinofunction 51fcf53d9bSJohn Marinodeletes a reference to the shared object referenced by 52fcf53d9bSJohn Marino.Fa handle . 53fcf53d9bSJohn MarinoIf the reference count drops to 0, the object is removed from the 54fcf53d9bSJohn Marinoaddress space, and 55fcf53d9bSJohn Marino.Fa handle 56fcf53d9bSJohn Marinois rendered invalid. 57fcf53d9bSJohn MarinoJust before removing a shared object in this way, the dynamic linker 58fcf53d9bSJohn Marinocalls the object's 59fcf53d9bSJohn Marino.Fn _fini 60fcf53d9bSJohn Marinofunction, if such a function is defined by the object. 61fcf53d9bSJohn Marino.Pp 62fcf53d9bSJohn MarinoThe object-intrinsic functions 63fcf53d9bSJohn Marino.Fn _init 64fcf53d9bSJohn Marinoand 65fcf53d9bSJohn Marino.Fn _fini 66fcf53d9bSJohn Marinoare called with no arguments, and are not expected to return values. 67*4a5f69f6SSascha Wildner.Sh RETURN VALUES 68fcf53d9bSJohn MarinoThe 69fcf53d9bSJohn Marino.Fn dlclose 70fcf53d9bSJohn Marinofunction 71fcf53d9bSJohn Marinoreturns 0 on success, or -1 if an error occurred. 72fcf53d9bSJohn MarinoWhenever an error has been detected, a message detailing it can be 73fcf53d9bSJohn Marinoretrieved via a call to 74fcf53d9bSJohn Marino.Fn dlerror . 75fcf53d9bSJohn Marino.Sh SEE ALSO 76fcf53d9bSJohn Marino.Xr rtld 1 , 77c19ddaabSSascha Wildner.Xr dlerror 3 , 78fcf53d9bSJohn Marino.Xr dlfcn 3 , 79c19ddaabSSascha Wildner.Xr dlopen 3 80