summaryrefslogtreecommitdiffstats
path: root/runtime/module-template.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-04-08 17:55:52 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-04-08 17:55:52 +0200
commitd9cde56eb8532bd660d6feb2249562afac0c40f6 (patch)
treeb8c562c0bed8f6bc029dfb7c518356c71e116d5b /runtime/module-template.h
parentba592431e279b3dafb74b93824a1478ff0d9724f (diff)
downloadrsyslog-d9cde56eb8532bd660d6feb2249562afac0c40f6.tar.gz
rsyslog-d9cde56eb8532bd660d6feb2249562afac0c40f6.tar.bz2
rsyslog-d9cde56eb8532bd660d6feb2249562afac0c40f6.zip
add output module interface to facilitate cooperative shutdown
... in more complex cases (where receiving SIGTTIN is not sufficient). See also: http://blog.gerhards.net/2013/04/rsyslog-output-plugin-wrangling.html
Diffstat (limited to 'runtime/module-template.h')
-rw-r--r--runtime/module-template.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/runtime/module-template.h b/runtime/module-template.h
index fe74bac9..8a958f90 100644
--- a/runtime/module-template.h
+++ b/runtime/module-template.h
@@ -938,6 +938,28 @@ static rsRetVal doHUP(instanceData __attribute__((unused)) *pData)\
}
+/* SetShutdownImmdtPtr()
+ * This function is optional. If defined by an output plugin, it is called
+ * each time the action is invoked to set the "ShutdownImmediate" pointer,
+ * which is used during termination to indicate the action should shutdown
+ * as quickly as possible.
+ */
+#define CODEqueryEtryPt_SetShutdownImmdtPtr \
+ else if(!strcmp((char*) name, "SetShutdownImmdtPtr")) {\
+ *pEtryPoint = SetShutdownImmdtPtr;\
+ }
+#define BEGINSetShutdownImmdtPtr \
+static rsRetVal SetShutdownImmdtPtr(instanceData __attribute__((unused)) *pData, int *pPtr)\
+{\
+ DEFiRet;
+
+#define CODESTARTSetShutdownImmdtPtr
+
+#define ENDSetShutdownImmdtPtr \
+ RETiRet;\
+}
+
+
/* parse() - main entry point of parser modules
*/
#define BEGINparse \