Commit 6c71f8b0 authored by Edward Thomson's avatar Edward Thomson Committed by Junio C Hamano

upload-pack: keep poll(2)'s timeout to -1

Keep poll's timeout at -1 when uploadpack.keepalive = 0, instead of
setting it to -1000, since some pedantic old systems (eg HP-UX) and
the gnulib compat/poll will treat only -1 as the valid value for
an infinite timeout.
Signed-off-by: default avatarEdward Thomson <[email protected]>
Acked-by: default avatarJeff King <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent d31f3ad2
......@@ -158,7 +158,9 @@ static void create_pack_file(void)
if (!pollsize)
ret = poll(pfd, pollsize, 1000 * keepalive);
ret = poll(pfd, pollsize,
keepalive < 0 ? -1 : 1000 * keepalive);
if (ret < 0) {
if (errno != EINTR) {
error("poll failed, resuming: %s",
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment