skimo@xxxxxxxx, Fri, May 18, 2007 21:24:58 +0200: > + if (!getcwd(cwd, sizeof(cwd)) || cwd[0] != '/') > + die("Unable to read current working directory"); > + > + if (chdir(path)) > + die("Cannot move to '%s'", path); > + How about modifying run_command to chdir after fork? You'd save the hassle of save/restoring cwd and don't mess up process' context (which is always a good idea to preserve). The code'd be simplier, too. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html