Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Pull request Compare This branch is even with git:master.

poll: honor the timeout on Win32

Ensure that when passing a pipe, the gnulib poll replacement will not
return 0 before the timeout has passed.

Not obeying the timeout (and merely returning 0) causes pathological
behavior when preparing a packfile for a repository and taking a
long time to do so.  If poll were to return 0 immediately, this would
cause keep-alives to get sent as quickly as possible until the packfile
was created.  Such deviance from the standard would cause megabytes (or
more) of keep-alive packets to be sent.

GetTickCount is used as it is efficient, stable and monotonically
increasing.  (Neither GetSystemTime nor QueryPerformanceCounter have
all three of these properties.)

Signed-off-by: Edward Thomson <>
Signed-off-by: Johannes Schindelin <>
Signed-off-by: Junio C Hamano <>
latest commit ef8b53e78c
@ethomson ethomson authored committed
Failed to load latest commit information.
nedmalloc Windows: do not redefine _WIN32_WINNT
poll poll: honor the timeout on Win32
regex C: have space around && and || operators
vcbuild Merge branch 'ks/tree-diff-nway'
win32 Win32: Unicode file name support (dirent)
apple-common-crypto.h imap-send: use Apple's Security framework for base64 encoding
basename.c compat: add a basename() compatibility function
bswap.h compat/bswap.h: detect endianness from XL C compiler macros
fopen.c compat/fopen.c: avoid clobbering the system defined fopen macro
gmtime.c date: recognize bogus FreeBSD gmtime output
hstrerror.c Add a local implementation of hstrerror for the system which do not h…
inet_ntop.c Drop system includes from inet_pton/inet_ntop compatibility wrappers
inet_pton.c Drop system includes from inet_pton/inet_ntop compatibility wrappers
memmem.c optimize compat/ memmem()
mingw.c Mingw: verify both ends of the pipe () call
mingw.h Merge branch 'nd/untracked-cache'
mkdir.c compat: some mkdir() do not like a slash at the end
mkdtemp.c Fix gitmkdtemp: correct test for mktemp() return value
mmap.c wrapper.c: add xpread() similar to xread()
msvc.c win32: use our own dirent.h
msvc.h MSVC: fix stat definition hell
obstack.c obstack.c: Fix some sparse warnings
obstack.h obstack: fix spelling of similar
pread.c Replacing the system call pread() with lseek()/xread()/lseek() sequence.
precompose_utf8.c Set core.precomposeunicode to true on e.g. HFS+
precompose_utf8.h git on Mac OS and precomposed unicode
qsort.c cleanup: use internal memory allocation wrapper functions everywhere
setenv.c compat/setenv.c: error if name contains '='
snprintf.c compat/snprintf: don't look at va_list twice
stat.c compat: convert modes to use portable file type values
strcasestr.c Clean up compatibility definitions.
strlcpy.c simplify inclusion of system header files.
strtoimax.c Add strtoimax() compatibility function.
strtoumax.c Add a compat/strtoumax.c for Solaris 8.
terminal.c mingw: rename WIN32 cpp macro to GIT_WINDOWS_NATIVE
terminal.h add generic terminal prompt function
unsetenv.c Revert "compat/unsetenv.c: Fix a sparse warning"
win32.h mingw: rename WIN32 cpp macro to GIT_WINDOWS_NATIVE
win32mmap.c compat/win32mmap.c: Fix some sparse warnings
winansi.c Win32: reliably detect console pipe handles
Something went wrong with that request. Please try again.