summaryrefslogtreecommitdiff
path: root/doc/it/weechat_plugin_api.it.txt
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-11-14 16:22:31 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-11-14 16:22:31 +0100
commit4d1c9a831503a6cb2589266239c11368a12c8a5d (patch)
tree5e0a033be443543b055a23e2aa633e3bf078f934 /doc/it/weechat_plugin_api.it.txt
parent2f45cbfb0296be42807af2a43aa0a621cdcd7154 (diff)
downloadweechat-4d1c9a831503a6cb2589266239c11368a12c8a5d.zip
Fix data sent to callback of hook_process, improve hook_process by using buffer
Fix: some data was sometimes missing (not sent to callback). Improvement: use a 64KB buffer for child output and send data to callback only when buffer is full.
Diffstat (limited to 'doc/it/weechat_plugin_api.it.txt')
-rw-r--r--doc/it/weechat_plugin_api.it.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt
index 6cd6627be..fdee54429 100644
--- a/doc/it/weechat_plugin_api.it.txt
+++ b/doc/it/weechat_plugin_api.it.txt
@@ -6217,6 +6217,19 @@ Valore restituito:
* puntatore al nuovo hook, NULL in caso di errore
+// TRANSLATION MISSING
+[NOTE]
+Buffer size for sending data to callback is 64KB (there are 2 buffers: one for
+stdout and one for stderr).
+If output from child process (stdout or stderr) is longer than 64KB, callback
+will be called more than one time.
+
+// TRANSLATION MISSING
+[IMPORTANT]
+Even if most of times your callback is called only once, you must ensure that
+many calls to callback are ok in your code: you must concatenate data issued by
+many calls and use data only when return code is nonnegative.
+
Esempio in C:
[source,C]