> + if (access(subdir, R_OK | X_OK)) > + continue; > + chdir(subdir); You've got yourself a needless race condition right there. Just do the chdir and check the return value. (And besides, access checks with the wrong set of permissions, should this ever end up in set[ug]id context.) Morten - : 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