--- if_cscope.c.orig.130529-0228	2013-05-29 02:28:17.050165000 -0700
+++ if_cscope.c	2013-06-08 06:18:37.873747000 -0700
@@ -982,6 +982,9 @@
 	vim_free(ppath);
 
 #if defined(UNIX)
+	if (setpgid(0, 0) == -1)
+	    PERROR(_("cs_create_connection setpgid failed"));
+
 	if (execl("/bin/sh", "sh", "-c", cmd, (char *)NULL) == -1)
 	    PERROR(_("cs_create_connection exec failed"));
 
@@ -2512,7 +2515,7 @@
 	if ((fullname = (char *)alloc(len)) != NULL)
 	    (void)sprintf(fullname, "%s/%s", csinfo[i].ppath, name);
     }
-    else if (csdir != NULL && csinfo[i].fname != NULL && STRLEN(csdir) > 0)
+    else if (csdir != NULL && csinfo[i].fname != NULL && *csdir)
     {
 	/* Check for csdir to be non empty to avoid empty path concatenated to
 	 * cscope output. */
