Mercurial > vim
diff src/if_cscope.c @ 5066:d2f9f67924e7 v7.3.1276
updated for version 7.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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 30 Jun 2013 15:01:22 +0200 |
parents | 04b8912a9c85 |
children | 89143424f604 |
line wrap: on
line diff
--- 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"));