home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.3 / 7.3.268 < prev    next >
Encoding:
Internet Message Format  |  2012-11-20  |  2.0 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.268
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.268
  11. Problem:    Vim freezes when executing an external command with zsh.
  12. Solution:   Use O_NOCTTY both in the master and slave. (Bjorn Winckler)
  13. Files:        src/os_unix.c
  14.  
  15.  
  16. *** ../vim-7.3.267/src/os_unix.c    2011-07-07 16:20:45.000000000 +0200
  17. --- src/os_unix.c    2011-08-04 19:06:14.000000000 +0200
  18. ***************
  19. *** 3889,3899 ****
  20.       if (p_guipty && !(options & (SHELL_READ|SHELL_WRITE)))
  21.       {
  22.           pty_master_fd = OpenPTY(&tty_name);        /* open pty */
  23. !         if (pty_master_fd >= 0 && ((pty_slave_fd =
  24. !                     open(tty_name, O_RDWR | O_EXTRA, 0)) < 0))
  25.           {
  26. !         close(pty_master_fd);
  27. !         pty_master_fd = -1;
  28.           }
  29.       }
  30.       /*
  31. --- 3889,3909 ----
  32.       if (p_guipty && !(options & (SHELL_READ|SHELL_WRITE)))
  33.       {
  34.           pty_master_fd = OpenPTY(&tty_name);        /* open pty */
  35. !         if (pty_master_fd >= 0)
  36.           {
  37. !         /* Leaving out O_NOCTTY may lead to waitpid() always returning
  38. !          * 0 on Mac OS X 10.7 thereby causing freezes. Let's assume
  39. !          * adding O_NOCTTY always works when defined. */
  40. ! #ifdef O_NOCTTY
  41. !         pty_slave_fd = open(tty_name, O_RDWR | O_NOCTTY | O_EXTRA, 0);
  42. ! #else
  43. !         pty_slave_fd = open(tty_name, O_RDWR | O_EXTRA, 0);
  44. ! #endif
  45. !         if (pty_slave_fd < 0)
  46. !         {
  47. !             close(pty_master_fd);
  48. !             pty_master_fd = -1;
  49. !         }
  50.           }
  51.       }
  52.       /*
  53. *** ../vim-7.3.267/src/version.c    2011-08-04 19:34:55.000000000 +0200
  54. --- src/version.c    2011-08-04 19:36:00.000000000 +0200
  55. ***************
  56. *** 711,712 ****
  57. --- 711,714 ----
  58.   {   /* Add new patch number below this line */
  59. + /**/
  60. +     268,
  61.   /**/
  62.  
  63. -- 
  64. Mental Floss prevents moral decay!
  65.  
  66.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  67. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  68. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  69.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  70.