cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: How to handle service unavailable

From: What you get is Not what you see <wyginwys_at_gmail.com>
Date: Fri, 11 Jul 2008 15:51:25 +0300

On Fri, Jul 11, 2008 at 12:49 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> 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.
>

I dont know how to read exit codes using bash. Should I look to stderr?
Sorry if newbie question.

>> 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
>
-------------------------------------------------------------------
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