diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-04-30 16:07:23 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-04-30 16:07:23 +0200 |
commit | d75263c020a5044fa73bc8cd57ce73ca5e23b360 (patch) | |
tree | 90c14b44f93abba7f154da456f03a5b991fa2a41 /src/channel.c | |
parent | 8e3d1b6326c103cc92f8d07b1161ee5172acf201 (diff) | |
download | vim-git-d75263c020a5044fa73bc8cd57ce73ca5e23b360.tar.gz |
patch 7.4.1807v7.4.1807
Problem: Test_out_close_cb sometimes fails.
Solution: Always write DETACH to out, not err.
Diffstat (limited to 'src/channel.c')
-rw-r--r-- | src/channel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/channel.c b/src/channel.c index 1be3d27ff..aa588031c 100644 --- a/src/channel.c +++ b/src/channel.c @@ -2478,6 +2478,7 @@ channel_close(channel_T *channel, int invoke_close_cb) * first invoke the close callback. Increment the refcount to avoid * the channel being freed halfway. */ ++channel->ch_refcount; + ch_log(channel, "Invoking callbacks before closing"); for (part = PART_SOCK; part <= PART_ERR; ++part) while (may_invoke_callback(channel, part)) ; @@ -2783,7 +2784,7 @@ channel_close_on_error(channel_T *channel, int part, char *func) */ if (channel->ch_part[part].ch_mode == MODE_RAW || channel->ch_part[part].ch_mode == MODE_NL) - channel_save(channel, part, (char_u *)DETACH_MSG_RAW, + channel_save(channel, PART_OUT, (char_u *)DETACH_MSG_RAW, (int)STRLEN(DETACH_MSG_RAW), FALSE, "PUT "); /* When reading from stdout is not possible, assume the other side has |