1
0
forked from aniani/vim

patch 8.1.0350: Vim may block on ch_sendraw()

Problem:    Vim may block on ch_sendraw() when the job is sending data back to
            Vim, which isn't read yet. (Nate Bosch)
Solution:   Add the "noblock" option to job_start(). (closes #2548)
This commit is contained in:
Bram Moolenaar
2018-09-06 16:27:24 +02:00
parent ed5a9d6612
commit 0b1468884a
5 changed files with 62 additions and 2 deletions

View File

@@ -1651,6 +1651,7 @@ struct channel_S {
partial_T *ch_close_partial;
int ch_drop_never;
int ch_keep_open; /* do not close on read error */
int ch_nonblock;
job_T *ch_job; /* Job that uses this channel; this does not
* count as a reference to avoid a circular
@@ -1729,6 +1730,7 @@ typedef struct
ch_mode_T jo_in_mode;
ch_mode_T jo_out_mode;
ch_mode_T jo_err_mode;
int jo_noblock;
job_io_T jo_io[4]; /* PART_OUT, PART_ERR, PART_IN */
char_u jo_io_name_buf[4][NUMBUFLEN];