summaryrefslogtreecommitdiffstats
path: root/include/helper.h
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2015-01-05 21:53:50 +0100
committerDave Davenport <qball@gmpclient.org>2015-01-05 21:53:50 +0100
commita28b6df307af0b326b26f813f4f04fddfaab8505 (patch)
tree5ad8d50d03ae35ad0e93644f7ef53dfa3bec7ef0 /include/helper.h
parent7ee64b258d91868e0336986dd2a4614f3048f6e3 (diff)
Add support custom command.
Diffstat (limited to 'include/helper.h')
-rw-r--r--include/helper.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/helper.h b/include/helper.h
index 5e615f32..45c7ae28 100644
--- a/include/helper.h
+++ b/include/helper.h
@@ -103,4 +103,13 @@ int token_match ( char **tokens, const char *input,
__attribute__( ( unused ) ) int index,
__attribute__( ( unused ) ) void *data );
+/**
+ * @param cmd The command to execute.
+ *
+ * Execute cmd using config.run_command and outputs the result (stdout) to the opened file
+ * descriptor.
+ *
+ * @returns a valid file descriptor on success, or -1 on failure.
+ */
+int execute_generator ( char * cmd ) __attribute__( ( nonnull ) );
#endif // __HELPER_H__