[Discuss] Run a command with retries
Steven Kurylo
sk at infinitepigeons.org
Thu Mar 18 19:31:11 PDT 2010
On Thu, Mar 18, 2010 at 7:09 PM, pwillis <p.willis at telus.net> wrote:
> I guess the point I was making is that I can't count on '2'
> being 'error' and zero being 'success'.
>
> For example a program can exit successfully with zero,
> yet very gracefully *NOT* carry out an intended function
> due to some external factor.
>
Well it could, but I'd consider that a bug. Do you have an example of
a mainstream program that does that? I'd think its pretty well
establish that 0 means success, not "I exited without crashing, but
may have failed".
Diff would be the closest I can think of, 0 means no difference and 1
means there is, then errors start at 2. I think grep is similar.
But there is a good reason for that, as it makes scripting much
easier.
More information about the Discuss
mailing list