]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.023 v7.3.023
authorBram Moolenaar <Bram@vim.org>
Wed, 13 Oct 2010 14:22:09 +0000 (16:22 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 13 Oct 2010 14:22:09 +0000 (16:22 +0200)
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)

src/os_unix.c
src/version.c

index b0e0f021199e8dfab0d5c6d37e5f7fed2b39bb32..150bdad6d833d5c92a1b143410671620fa8c563b 100644 (file)
@@ -4168,7 +4168,6 @@ mch_call_shell(cmd, options)
 # 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);
                }
@@ -4637,6 +4636,14 @@ finished:
                    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)
index 9db3fce9f931e9f4cf7b7aa009d05c29600efd2c..6b7742e97ef698844a0f8ed80f07a9082a6c10af 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    23,
 /**/
     22,
 /**/