api: fix truncated process output in hook_process() (closes #266)