aboutsummaryrefslogtreecommitdiffstats
path: root/doc/hook/daemon_addon.bb
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-01-17 00:14:47 -0800
committerzotlabs <mike@macgirvin.com>2017-01-17 00:14:47 -0800
commit335d9af8dc4b02f8ec4017d30525a65e93c40eb2 (patch)
treef3f561a5a2e23386d416e328e4c2d9f788a9cf47 /doc/hook/daemon_addon.bb
parent8478ecc6755eefb1977566c8f4bbbd603d5b37db (diff)
downloadvolse-hubzilla-335d9af8dc4b02f8ec4017d30525a65e93c40eb2.tar.gz
volse-hubzilla-335d9af8dc4b02f8ec4017d30525a65e93c40eb2.tar.bz2
volse-hubzilla-335d9af8dc4b02f8ec4017d30525a65e93c40eb2.zip
daemon_addon hook - lets plugins create custom background processes.
Diffstat (limited to 'doc/hook/daemon_addon.bb')
-rw-r--r--doc/hook/daemon_addon.bb15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/hook/daemon_addon.bb b/doc/hook/daemon_addon.bb
new file mode 100644
index 000000000..b60b25748
--- /dev/null
+++ b/doc/hook/daemon_addon.bb
@@ -0,0 +1,15 @@
+[h2]daemon_addon[/h2]
+
+
+A foreground plugin can create a background process by invoking:
+
+[code]
+\Zotlabs\Daemon\Master::Summon([ 'Addon', 'myplugin', 'something' ]);
+[/code]
+
+This starts up a background process (called 'Addon') specifically for addons to use.
+
+Then if your plugin is also catching the daemon_addon hook that handler will be called with the
+argv array of the background process. In this case [ 'myplugin', 'something' ];
+
+We recommend using this convention so that plugins can share this hook without causing conflicts; that is check to see if your plugin is the first array argument and if not, return from the hook. Otherwise you can initiate background processing. Something to remember is that during background processes there is no session. You are detached from the web page which created the background process. \ No newline at end of file