summaryrefslogtreecommitdiffstats
path: root/src/if_cscope.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-06-30 15:01:22 +0200
committerBram Moolenaar <Bram@vim.org>2013-06-30 15:01:22 +0200
commit85e932f2ca8830990adffa904401089e4e357c21 (patch)
tree11ee82b269f1c566b8290d605c2e646e1d351469 /src/if_cscope.c
parente78495de7e5d9f198602fcdfe32fac521c477297 (diff)
updated for version 7.3.1276v7.3.1276
Problem: When using a cscope connection resizing the window may send SIGWINCH to cscope and it quits. Solution: Call setpgid(0, 0) in the child process. (Narendran Gopalakrishnan)
Diffstat (limited to 'src/if_cscope.c')
-rw-r--r--src/if_cscope.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/if_cscope.c b/src/if_cscope.c
index 605131156e..09982e6477 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -997,6 +997,15 @@ err_closing:
vim_free(ppath);
#if defined(UNIX)
+# if defined(HAVE_SETSID) || defined(HAVE_SETPGID)
+ /* Change our process group to avoid cscope receiving SIGWINCH. */
+# if defined(HAVE_SETSID)
+ (void)setsid();
+# else
+ if (setpgid(0, 0) == -1)
+ PERROR(_("cs_create_connection setpgid failed"));
+# endif
+# endif
if (execl("/bin/sh", "sh", "-c", cmd, (char *)NULL) == -1)
PERROR(_("cs_create_connection exec failed"));