cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Fix for known bug #64 / simplification of hostthre.c

From: Constantine Sapuntzakis <csapuntz_at_gmail.com>
Date: Tue, 8 Sep 2009 14:47:00 -0700

Will need to fix the patch.

On Mon, Sep 7, 2009 at 7:52 AM, Constantine Sapuntzakis
<csapuntz_at_gmail.com>wrote:

> On Sun, Sep 6, 2009 at 11:52 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
>> On Sun, 6 Sep 2009, Constantine Sapuntzakis wrote:
>> Lots of people and apps use timeouts so not supporting those is a real
>> problem.
>>
>>
> In its defense, the patched code behaves almost the same as the old code
> with respect to timeouts but is safer and significantly simpler.
>
>
A comparison of the old code and new code:
> * Curl_destroy_thread_data --- old code waits for thread to
> terminate, new code waits for thread to terminate (so no real timeout)
> * Curl_wait_for_resolv -- old code respects the timeout then after the
> timeout waits for 5 seconds for thread to terminate and if it doesn't,
> forcibly terminates it with TerminateThread which is unsafe, new code just
> waits for thread to terminate (old code = timeout + 5 seconds + possible
> corruption, new code = no real timeout)
>
>
>
I misread the old code. Curl_wait_for_resolv will exit early on timeout -
the new code doesn't do that. I will fix that.

-Costa
Received on 2009-09-08