aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-01-13 11:23:04 -0800
committerJunio C Hamano <gitster@pobox.com>2014-01-13 11:23:04 -0800
commit3b72885bd8bd8dbd68a48d630e4e99633c93ab6f (patch)
tree382659414116d2c1bf207edd1fbe1e139f8b33bd
parentf5678f133321c4873109d15fd9ee4612cc326e13 (diff)
parented7eda8b38ec6230abf79986668ccb6e2e2c7494 (diff)
downloadgit-3b72885bd8bd8dbd68a48d630e4e99633c93ab6f.tar.gz
git-3b72885bd8bd8dbd68a48d630e4e99633c93ab6f.tar.xz
Merge branch 'km/gc-eperm' into maint
A "gc" process running as a different user should be able to stop a new "gc" process from starting. * km/gc-eperm: gc: notice gc processes run by other users
-rw-r--r--builtin/gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/gc.c b/builtin/gc.c
index c14190f84..25f2237c0 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -222,7 +222,7 @@ static const char *lock_repo_for_gc(int force, pid_t* ret_pid)
time(NULL) - st.st_mtime <= 12 * 3600 &&
fscanf(fp, "%"PRIuMAX" %127c", &pid, locking_host) == 2 &&
/* be gentle to concurrent "gc" on remote hosts */
- (strcmp(locking_host, my_host) || !kill(pid, 0));
+ (strcmp(locking_host, my_host) || !kill(pid, 0) || errno == EPERM);
if (fp != NULL)
fclose(fp);
if (should_exit) {