cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: How to handle service unavailable

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 11 Jul 2008 11:49:00 +0200 (CEST)

On Fri, 11 Jul 2008, What you get is Not what you see wrote:

>> --retry works for the 503 case but not for the error 52. You need to write
>> your own script for that.
>
> Could you give me some more hints to write down my script? I wish to use it
> on a shell. I browsed through the documents I couldnt find a way to
> understand what exit code curl gives.

They're in the "EXIT CODES" section in the man page. The '52' you seen before
is actually the exit code itself so your bash script would need to check for
that.

> Should I use a programming language for this or the libcurl library?
> Or basic bash commands would suffice?

Both approaches work, but I'd say that using a shell script would be the
fastest to implement.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2008-07-11