diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2014-04-03 09:19:30 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2014-04-03 09:19:30 +0200 |
commit | 6bf64e979dfdeac8556d55cd8f1b4ea8f839c967 (patch) | |
tree | ca7fbd9836bb0e9846348a900bb6c3eb60493f01 /src | |
parent | cbd5f1122ab9ba2a3cd96084ecd3199657e1221d (diff) | |
download | weechat-6bf64e979dfdeac8556d55cd8f1b4ea8f839c967.zip |
exec: display command output even if process is killed
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/exec/exec.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/plugins/exec/exec.c b/src/plugins/exec/exec.c index a91e52e62..5d8eccbea 100644 --- a/src/plugins/exec/exec.c +++ b/src/plugins/exec/exec.c @@ -516,12 +516,6 @@ exec_process_cb (void *data, const char *command, int return_code, (err) ? strlen (err) : 0); } - if (return_code == WEECHAT_HOOK_PROCESS_ERROR) - { - exec_end_command (ptr_exec_cmd, -1); - return WEECHAT_RC_OK; - } - if (out) { exec_concat_output (&ptr_exec_cmd->out_size, @@ -535,7 +529,9 @@ exec_process_cb (void *data, const char *command, int return_code, err); } - if (return_code >= 0) + if (return_code == WEECHAT_HOOK_PROCESS_ERROR) + exec_end_command (ptr_exec_cmd, -1); + else if (return_code >= 0) exec_end_command (ptr_exec_cmd, return_code); return WEECHAT_RC_OK; |