Problem: External program may hang when it tries to write to the tty.
Solution: Don't close the slave tty until after the child exits. (Nikola
Knezevic)
# ifdef FEAT_GUI
if (pty_master_fd >= 0)
{
- close(pty_slave_fd); /* close slave side of pty */
fromshell_fd = pty_master_fd;
toshell_fd = dup(pty_master_fd);
}
break;
}
+# ifdef FEAT_GUI
+ /* Close slave side of pty. Only do this after the child has
+ * exited, otherwise the child may hang when it tries to write on
+ * the pty. */
+ if (pty_master_fd >= 0)
+ close(pty_slave_fd);
+# endif
+
/* Make sure the child that writes to the external program is
* dead. */
if (wpid > 0)
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 23,
/**/
22,
/**/