[ofw] [Bug 1886] New: rc of ibping

Sasha Khapyorsky sashak at voltaire.com
Tue Jan 5 02:13:46 PST 2010


On 11:13 Tue 05 Jan     , Leonid Keller wrote:
>  
> The bug, shown below, has its origin in Linux sources.
> I didn't check all the applications of ib_diag package, but at least
> ibping returns sometimes inconventional return codes.
> For example, -1 on error instead of a positive value.

What is wrong with negative exit status?

> Or 2 upon 'ibping -V'.
> Why is it error at all ?

Seems that historically -V (--version) was implemented similar to
--help in sense of return code. I don't really see a reason why, this
can be changed IMO.

> And why 2 ? It's ENOENT. Should be EINVAL (22) if it is regarded as
> error.

Program exit status is not the same thing as 'errno' variable, so at
least formally it shouldn't follow E* convention.

Sasha



More information about the ofw mailing list