Karsten Hopp 2ae4a5
To: vim-dev@vim.org
Karsten Hopp 2ae4a5
Subject: Patch 7.2.097
Karsten Hopp 2ae4a5
Fcc: outbox
Karsten Hopp 2ae4a5
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 2ae4a5
Mime-Version: 1.0
Karsten Hopp 2ae4a5
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 2ae4a5
Content-Transfer-Encoding: 8bit
Karsten Hopp 2ae4a5
------------
Karsten Hopp 2ae4a5
Karsten Hopp 2ae4a5
Patch 7.2.097
Karsten Hopp 2ae4a5
Problem:    "!xterm&" doesn't work when 'shell' is "bash".
Karsten Hopp 2ae4a5
Solution:   Ignore SIGHUP after calling setsid(). (Simon Schubert) 
Karsten Hopp 2ae4a5
Files:	    src/os_unix.c
Karsten Hopp 2ae4a5
Karsten Hopp 2ae4a5
Karsten Hopp 2ae4a5
*** ../vim-7.2.096/src/os_unix.c	Fri Nov 28 21:26:50 2008
Karsten Hopp 2ae4a5
--- src/os_unix.c	Wed Feb  4 12:09:55 2009
Karsten Hopp 2ae4a5
***************
Karsten Hopp 2ae4a5
*** 3950,3956 ****
Karsten Hopp 2ae4a5
--- 3950,3966 ----
Karsten Hopp 2ae4a5
  		 * children can be kill()ed.  Don't do this when using pipes,
Karsten Hopp 2ae4a5
  		 * because stdin is not a tty, we would lose /dev/tty. */
Karsten Hopp 2ae4a5
  		if (p_stmp)
Karsten Hopp 2ae4a5
+ 		{
Karsten Hopp 2ae4a5
  		    (void)setsid();
Karsten Hopp 2ae4a5
+ #  if defined(SIGHUP)
Karsten Hopp 2ae4a5
+ 		    /* When doing "!xterm&" and 'shell' is bash: the shell
Karsten Hopp 2ae4a5
+ 		     * will exit and send SIGHUP to all processes in its
Karsten Hopp 2ae4a5
+ 		     * group, killing the just started process.  Ignore SIGHUP
Karsten Hopp 2ae4a5
+ 		     * to avoid that. (suggested by Simon Schubert)
Karsten Hopp 2ae4a5
+ 		     */
Karsten Hopp 2ae4a5
+ 		    signal(SIGHUP, SIG_IGN);
Karsten Hopp 2ae4a5
+ #  endif
Karsten Hopp 2ae4a5
+ 		}
Karsten Hopp 2ae4a5
  # endif
Karsten Hopp 2ae4a5
  # ifdef FEAT_GUI
Karsten Hopp 2ae4a5
  		if (pty_slave_fd >= 0)
Karsten Hopp 2ae4a5
*** ../vim-7.2.096/src/version.c	Wed Feb  4 13:13:42 2009
Karsten Hopp 2ae4a5
--- src/version.c	Wed Feb  4 14:16:37 2009
Karsten Hopp 2ae4a5
***************
Karsten Hopp 2ae4a5
*** 678,679 ****
Karsten Hopp 2ae4a5
--- 678,681 ----
Karsten Hopp 2ae4a5
  {   /* Add new patch number below this line */
Karsten Hopp 2ae4a5
+ /**/
Karsten Hopp 2ae4a5
+     97,
Karsten Hopp 2ae4a5
  /**/
Karsten Hopp 2ae4a5
Karsten Hopp 2ae4a5
-- 
Karsten Hopp 2ae4a5
It was recently discovered that research causes cancer in rats.
Karsten Hopp 2ae4a5
Karsten Hopp 2ae4a5
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 2ae4a5
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 2ae4a5
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 2ae4a5
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///