summaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2009-02-04 13:19:42 +0000
committerBram Moolenaar <Bram@vim.org>2009-02-04 13:19:42 +0000
commit0725608d1a501e8ccc82153102fdc7e26478577f (patch)
treed0af3f7de63b746219caade7f21334fe6ac0b07f /src/os_unix.c
parent65b9a6ad59a53dad9b1e48c3d653d3e53079a652 (diff)
downloadvim-git-0725608d1a501e8ccc82153102fdc7e26478577f.tar.gz
updated for version 7.2-097v7.2.097
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 9d6f6cb6f..27ee65e29 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3950,7 +3950,17 @@ mch_call_shell(cmd, options)
* children can be kill()ed. Don't do this when using pipes,
* because stdin is not a tty, we would lose /dev/tty. */
if (p_stmp)
+ {
(void)setsid();
+# if defined(SIGHUP)
+ /* When doing "!xterm&" and 'shell' is bash: the shell
+ * will exit and send SIGHUP to all processes in its
+ * group, killing the just started process. Ignore SIGHUP
+ * to avoid that. (suggested by Simon Schubert)
+ */
+ signal(SIGHUP, SIG_IGN);
+# endif
+ }
# endif
# ifdef FEAT_GUI
if (pty_slave_fd >= 0)