Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'km/gc-eperm' into maint
author
Junio C Hamano
<gitster@pobox.com>
Mon, 13 Jan 2014 19:23:04 +0000
(11:23 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 13 Jan 2014 19:23:04 +0000
(11:23 -0800)
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
builtin/gc.c
patch
|
blob
|
history
raw
(from parent 1:
f5678f1
)
diff --git
a/builtin/gc.c
b/builtin/gc.c
index c14190f840b0427820ebf69b209d86f0a21c62b7..25f2237c08f3b8fbc8f3554f3e22bf7e59e74b1c 100644
(file)
--- 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) {