diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-11-18 11:40:23 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-11-18 11:40:23 +0100 |
commit | a5417f16044d7d56dbceeea09e25ba3e8c47cc01 (patch) | |
tree | de086d9f0baa496f3743b39e4c49b05edab1a303 /runtime/module-template.h | |
parent | ba201a941435bc5fec2c333155e1a8e16c4a9c05 (diff) | |
parent | 704a1145d64532df36624a3c9850b0c86f38f76f (diff) | |
download | rsyslog-a5417f16044d7d56dbceeea09e25ba3e8c47cc01.tar.gz rsyslog-a5417f16044d7d56dbceeea09e25ba3e8c47cc01.tar.bz2 rsyslog-a5417f16044d7d56dbceeea09e25ba3e8c47cc01.zip |
Merge branch 'nextmaster'
Diffstat (limited to 'runtime/module-template.h')
-rw-r--r-- | runtime/module-template.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/runtime/module-template.h b/runtime/module-template.h index eb39b587..6f7d877c 100644 --- a/runtime/module-template.h +++ b/runtime/module-template.h @@ -481,6 +481,33 @@ static rsRetVal afterRun(void)\ } -/* - * vi:set ai: +/* doHUP() + * This function is optional. Currently, it is available to output plugins + * only, but may be made available to other types of plugins in the future. + * A plugin does not need to define this entry point. If if does, it gets + * called when a non-restart type of HUP is done. A plugin should register + * this function so that it can close files, connection or other ressources + * on HUP - if it can be assume the user wanted to do this as a part of HUP + * processing. Note that the name "HUP" has historical reasons, it stems back + * to the infamous SIGHUP which was sent to restart a syslogd. We still retain + * that legacy, but may move this to a different signal. + * rgerhards, 2008-10-22 + */ +#define CODEqueryEtryPt_doHUP \ + else if(!strcmp((char*) name, "doHUP")) {\ + *pEtryPoint = doHUP;\ + } +#define BEGINdoHUP \ +static rsRetVal doHUP(instanceData __attribute__((unused)) *pData)\ +{\ + DEFiRet; + +#define CODESTARTdoHUP + +#define ENDdoHUP \ + RETiRet;\ +} + + +/* vim:set ai: */ |