|
Karsten Hopp |
70bfaa |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
70bfaa |
Subject: Patch 7.3.268
|
|
Karsten Hopp |
70bfaa |
Fcc: outbox
|
|
Karsten Hopp |
70bfaa |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
70bfaa |
Mime-Version: 1.0
|
|
Karsten Hopp |
70bfaa |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
70bfaa |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
70bfaa |
------------
|
|
Karsten Hopp |
70bfaa |
|
|
Karsten Hopp |
70bfaa |
Patch 7.3.268
|
|
Karsten Hopp |
70bfaa |
Problem: Vim freezes when executing an external command with zsh.
|
|
Karsten Hopp |
70bfaa |
Solution: Use O_NOCTTY both in the master and slave. (Bjorn Winckler)
|
|
Karsten Hopp |
70bfaa |
Files: src/os_unix.c
|
|
Karsten Hopp |
70bfaa |
|
|
Karsten Hopp |
70bfaa |
|
|
Karsten Hopp |
70bfaa |
*** ../vim-7.3.267/src/os_unix.c 2011-07-07 16:20:45.000000000 +0200
|
|
Karsten Hopp |
70bfaa |
--- src/os_unix.c 2011-08-04 19:06:14.000000000 +0200
|
|
Karsten Hopp |
70bfaa |
***************
|
|
Karsten Hopp |
70bfaa |
*** 3889,3899 ****
|
|
Karsten Hopp |
70bfaa |
if (p_guipty && !(options & (SHELL_READ|SHELL_WRITE)))
|
|
Karsten Hopp |
70bfaa |
{
|
|
Karsten Hopp |
70bfaa |
pty_master_fd = OpenPTY(&tty_name); /* open pty */
|
|
Karsten Hopp |
70bfaa |
! if (pty_master_fd >= 0 && ((pty_slave_fd =
|
|
Karsten Hopp |
70bfaa |
! open(tty_name, O_RDWR | O_EXTRA, 0)) < 0))
|
|
Karsten Hopp |
70bfaa |
{
|
|
Karsten Hopp |
70bfaa |
! close(pty_master_fd);
|
|
Karsten Hopp |
70bfaa |
! pty_master_fd = -1;
|
|
Karsten Hopp |
70bfaa |
}
|
|
Karsten Hopp |
70bfaa |
}
|
|
Karsten Hopp |
70bfaa |
/*
|
|
Karsten Hopp |
70bfaa |
--- 3889,3909 ----
|
|
Karsten Hopp |
70bfaa |
if (p_guipty && !(options & (SHELL_READ|SHELL_WRITE)))
|
|
Karsten Hopp |
70bfaa |
{
|
|
Karsten Hopp |
70bfaa |
pty_master_fd = OpenPTY(&tty_name); /* open pty */
|
|
Karsten Hopp |
70bfaa |
! if (pty_master_fd >= 0)
|
|
Karsten Hopp |
70bfaa |
{
|
|
Karsten Hopp |
70bfaa |
! /* Leaving out O_NOCTTY may lead to waitpid() always returning
|
|
Karsten Hopp |
70bfaa |
! * 0 on Mac OS X 10.7 thereby causing freezes. Let's assume
|
|
Karsten Hopp |
70bfaa |
! * adding O_NOCTTY always works when defined. */
|
|
Karsten Hopp |
70bfaa |
! #ifdef O_NOCTTY
|
|
Karsten Hopp |
70bfaa |
! pty_slave_fd = open(tty_name, O_RDWR | O_NOCTTY | O_EXTRA, 0);
|
|
Karsten Hopp |
70bfaa |
! #else
|
|
Karsten Hopp |
70bfaa |
! pty_slave_fd = open(tty_name, O_RDWR | O_EXTRA, 0);
|
|
Karsten Hopp |
70bfaa |
! #endif
|
|
Karsten Hopp |
70bfaa |
! if (pty_slave_fd < 0)
|
|
Karsten Hopp |
70bfaa |
! {
|
|
Karsten Hopp |
70bfaa |
! close(pty_master_fd);
|
|
Karsten Hopp |
70bfaa |
! pty_master_fd = -1;
|
|
Karsten Hopp |
70bfaa |
! }
|
|
Karsten Hopp |
70bfaa |
}
|
|
Karsten Hopp |
70bfaa |
}
|
|
Karsten Hopp |
70bfaa |
/*
|
|
Karsten Hopp |
70bfaa |
*** ../vim-7.3.267/src/version.c 2011-08-04 19:34:55.000000000 +0200
|
|
Karsten Hopp |
70bfaa |
--- src/version.c 2011-08-04 19:36:00.000000000 +0200
|
|
Karsten Hopp |
70bfaa |
***************
|
|
Karsten Hopp |
70bfaa |
*** 711,712 ****
|
|
Karsten Hopp |
70bfaa |
--- 711,714 ----
|
|
Karsten Hopp |
70bfaa |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
70bfaa |
+ /**/
|
|
Karsten Hopp |
70bfaa |
+ 268,
|
|
Karsten Hopp |
70bfaa |
/**/
|
|
Karsten Hopp |
70bfaa |
|
|
Karsten Hopp |
70bfaa |
--
|
|
Karsten Hopp |
70bfaa |
Mental Floss prevents moral decay!
|
|
Karsten Hopp |
70bfaa |
|
|
Karsten Hopp |
70bfaa |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
70bfaa |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
70bfaa |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
70bfaa |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|