diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-01-10 10:33:30 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-01-10 10:33:30 -0800 |
commit | 55869681f1f0dc3fe9df0dd95f554f94dd519b72 (patch) | |
tree | 764cb358fee370732abe1f3b42de5ec2ec9bb516 | |
parent | Merge branch 'jk/http-auth-tests-robustify' (diff) | |
parent | gc: notice gc processes run by other users (diff) | |
download | tgif-55869681f1f0dc3fe9df0dd95f554f94dd519b72.tar.xz |
Merge branch 'km/gc-eperm'
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index c14190f840..25f2237c08 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) { |