cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: retry doesn't work on win32?

From: Daniel Beardsmore <public_at_telcontar.net>
Date: Tue, 16 Jan 2007 22:49:52 +0000

Tobias Wendorff wrote:
>> Doesn't cURL return an error code that you can check on? After you run
>> cURL, check the error code and then if it failed, sleep() a bit and
>> retry?
>
> sleep() on win32 (WinXP SP2) ??

Aside from Win NT having a POSIX layer (how complete it is, is another
matter) how many systems do not have a sleep function or a way to
achieve it?

With the popularity of Cygwin, for all I know, you're running cURL
inside that. Or maybe MinGW.

I am out of just about every loop, and there are treasures beyond my
imagination out there, so there has got to be a way to sleep Win32, even
  if all you do is set a timer to wake you up (I know you can do that
much at least, and for all I know, that's all sleep() is -- a timer in
the OS).

Anyone who knows their C/C++ could write a sleep command in a few
minutes, if one doesn't exist already. So could I, but it would be a 700
k executable written in a GUI framework (it can take arguments, but
cannot do /?) and compiled in Mac OS 9 for Win32 :P I *CAN* do it, I
just balk so very much at 700 k binaries for such an absurdly trivial task.
Received on 2007-01-17