Re: [PATCH v6 00/16] daemon-win32
- From
Erik Faye-Lund <kusmabite@gmail.com>
- Date
- Nov 3, 2010, 22:39 UTC
- Message-ID
- <AANLkTin6120QbxyxHt=UM9Dpk_3C-vaD2z8RaRuut76r@mail.gmail.com>
- In-Reply-To
- <AANLkTin2BCxDoKhDCSgSRG1eVUGVeQh6Bq_=FfAe0M_M@mail.gmail.com>
On Wed, Nov 3, 2010 at 11:18 PM, Erik Faye-Lund <kusmabite@gmail.com> wrote:
Show 14 quoted lines
> Ah, thanks. For me it's leaking a variable amount of handles per
> ls-remote, but if I apply the following patch it's down to one. Need
> to find that one as well...
>
> diff --git a/compat/mingw.c b/compat/mingw.c
> index b780200..47e7d26 100644
> --- a/compat/mingw.c
> +++ b/compat/mingw.c
> @@ -1519,8 +1519,10 @@ pid_t waitpid(pid_t pid, int *status, unsigned options)
> }
>
> if (pid > 0 && options & WNOHANG) {
> - if (WAIT_OBJECT_0 != WaitForSingleObject((HANDLE)pid, 0))
> + if (WAIT_OBJECT_0 != WaitForSingleObject((HANDLE)pid, 0)) {AAAND the last one is right here as well: - if (WAIT_OBJECT_0 != WaitForSingleObject((HANDLE)pid, 0)) + if (WAIT_OBJECT_0 != WaitForSingleObject(h, 0)) {