summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-09-04 12:35:34 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-09-04 12:35:34 -0700
commit05584b2a4e18e0693ac2af6dd9650e59351786ed (patch)
tree7e3a0bf7846056881980eaaf270c976f7204e20d /compat
parentMerge branch 'ap/remote-hg-tilde-is-home-directory' (diff)
parentgc: reject if another gc is running, unless --force is given (diff)
downloadtgif-05584b2a4e18e0693ac2af6dd9650e59351786ed.tar.xz
Merge branch 'nd/gc-lock-against-each-other'
* nd/gc-lock-against-each-other: gc: reject if another gc is running, unless --force is given
Diffstat (limited to 'compat')
-rw-r--r--compat/mingw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index bb92c436f7..22ee9ef1cf 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1086,6 +1086,12 @@ int mingw_kill(pid_t pid, int sig)
errno = err_win_to_posix(GetLastError());
CloseHandle(h);
return -1;
+ } else if (pid > 0 && sig == 0) {
+ HANDLE h = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
+ if (h) {
+ CloseHandle(h);
+ return 0;
+ }
}
errno = EINVAL;