diff options
author | Bojan Smojver <bojan@rexursive.com> | 2011-02-23 11:25:43 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-02-23 11:25:43 +0100 |
commit | d1eb6e0edc51a78f3209448e800b25eda50340f2 (patch) | |
tree | 6d81c1de98eb0c77affaa2f112b5a0628f54ebc3 /runtime/modules.h | |
parent | ee065f1cb55be56da6ed12b35cd0e686abcb3a10 (diff) | |
download | rsyslog-d1eb6e0edc51a78f3209448e800b25eda50340f2.tar.gz rsyslog-d1eb6e0edc51a78f3209448e800b25eda50340f2.tar.xz rsyslog-d1eb6e0edc51a78f3209448e800b25eda50340f2.zip |
added work-around for bug in gtls, which causes fd leak when using TLS
The capability has been added for module to specify that they do not
like being unloaded.
related bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=222
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
Diffstat (limited to 'runtime/modules.h')
-rw-r--r-- | runtime/modules.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/modules.h b/runtime/modules.h index df1afbc3..7eff8581 100644 --- a/runtime/modules.h +++ b/runtime/modules.h @@ -75,12 +75,26 @@ typedef enum eModLinkType_ { eMOD_LINK_ALL /* special: all linkage types, e.g. for unload */ } eModLinkType_t; +/* remember which shared libs we dlopen()-ed */ +struct dlhandle_s { + uchar szName[PATH_MAX]; + void *pModHdlr; + struct dlhandle_s *next; +}; + +/* should this module be kept linked? */ +typedef enum eModKeepType_ { + eMOD_NOKEEP, + eMOD_KEEP +} eModKeepType_t; + struct modInfo_s { struct modInfo_s *pPrev; /* support for creating a double linked module list */ struct modInfo_s *pNext; /* support for creating a linked module list */ int iIFVers; /* Interface version of module */ eModType_t eType; /* type of this module */ eModLinkType_t eLinkType; + eModKeepType_t eKeepType; /* keep the module dynamically linked on unload */ uchar* pszName; /* printable module name, e.g. for dbgprintf */ unsigned uRefCnt; /* reference count for this module; 0 -> may be unloaded */ /* functions supported by all types of modules */ |