mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.1091: no check if opening a pty works
Problem: No check if opening a pty works. Solution: Check for invalid file descriptor.
This commit is contained in:
@@ -5922,6 +5922,8 @@ mch_create_pty_channel(job_T *job, jobopt_T *options)
|
|||||||
channel_T *channel;
|
channel_T *channel;
|
||||||
|
|
||||||
open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_out, &job->jv_tty_in);
|
open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_out, &job->jv_tty_in);
|
||||||
|
if (pty_master_fd < 0 || pty_slave_fd < 0)
|
||||||
|
return FAIL;
|
||||||
close(pty_slave_fd);
|
close(pty_slave_fd);
|
||||||
|
|
||||||
channel = add_channel();
|
channel = add_channel();
|
||||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1091,
|
||||||
/**/
|
/**/
|
||||||
1090,
|
1090,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user