Re: [PATCH 0/4] Fix file locking with retry and timeout on Windows

2015-06-05 Thread Junio C Hamano
Johannes Sixt j...@kdbg.org writes:

 The remaining 3 patches replace the select() invocation that waits
 for a short time period by the version with poll() that we already
 use in help.c. This is necessary because a select() call where all
 three sets of file descriptors are empty is not supported on Windows.

Thanks.

The use of both select() and poll() in our code has been bugging me
for a long time (but wasn't irritating enough to make me do anything
about it).


 Johannes Sixt (4):
   lockfile: replace random() by rand()
   help.c: wrap wait-only poll() invocation in sleep_millisec()
   lockfile: convert retry timeout computations to millisecond
   lockfile: wait using sleep_millisec() instead of select()

  cache.h|  1 +
  help.c |  2 +-
  lockfile.c | 31 +--
  wrapper.c  |  5 +
  4 files changed, 16 insertions(+), 23 deletions(-)
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] Fix file locking with retry and timeout on Windows

2015-06-05 Thread Michael Haggerty
On 06/05/2015 09:45 PM, Johannes Sixt wrote:
 The first patch is the same that I posted earlier. It fixes a build
 failure on Windows on master due to missing random/srandom.
 
 The remaining 3 patches replace the select() invocation that waits
 for a short time period by the version with poll() that we already
 use in help.c. This is necessary because a select() call where all
 three sets of file descriptors are empty is not supported on Windows.
 
 Johannes Sixt (4):
   lockfile: replace random() by rand()
   help.c: wrap wait-only poll() invocation in sleep_millisec()
   lockfile: convert retry timeout computations to millisecond
   lockfile: wait using sleep_millisec() instead of select()
 
  cache.h|  1 +
  help.c |  2 +-
  lockfile.c | 31 +--
  wrapper.c  |  5 +
  4 files changed, 16 insertions(+), 23 deletions(-)

The whole series looks good to me. Johannes, thanks for taking care of this.

Michael

-- 
Michael Haggerty
mhag...@alum.mit.edu

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] Fix file locking with retry and timeout on Windows

2015-06-05 Thread Johannes Sixt
The first patch is the same that I posted earlier. It fixes a build
failure on Windows on master due to missing random/srandom.

The remaining 3 patches replace the select() invocation that waits
for a short time period by the version with poll() that we already
use in help.c. This is necessary because a select() call where all
three sets of file descriptors are empty is not supported on Windows.

Johannes Sixt (4):
  lockfile: replace random() by rand()
  help.c: wrap wait-only poll() invocation in sleep_millisec()
  lockfile: convert retry timeout computations to millisecond
  lockfile: wait using sleep_millisec() instead of select()

 cache.h|  1 +
 help.c |  2 +-
 lockfile.c | 31 +--
 wrapper.c  |  5 +
 4 files changed, 16 insertions(+), 23 deletions(-)

-- 
2.3.2.245.gb5bf9d3

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html