add shared lib destructor, to close "capi_fd" on unload with dlclose ..

This commit is contained in:
Carsten Paeth 1999-11-11 09:24:07 +00:00
parent 93068dcb3f
commit cd2a50f981
1 changed files with 15 additions and 0 deletions

View File

@ -2,6 +2,12 @@
* $Id$
*
* $Log$
* Revision 1.9 1999/10/20 16:43:17 calle
* - The CAPI20 library is now a shared library.
* - Arguments of function capi20_put_message swapped, to match capi spec.
* - All capi20 related subdirs converted to use automake.
* - Removed dependency to CONFIG_KERNELDIR where not needed.
*
* Revision 1.8 1999/09/15 08:10:44 calle
* Bugfix: error in 64Bit extention.
*
@ -394,3 +400,12 @@ capi20_fileno(unsigned ApplID)
return applid2fd(ApplID);
}
static void exitlib(void) __attribute__((destructor));
static void exitlib(void)
{
if (capi_fd >= 0) {
close(capi_fd);
capi_fd = -1;
}
}