svn commit: r252672 - head/sbin/nvmecontrol
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sat Jul 6 18:42:29 UTC 2013
On Thu, Jul 04, 2013 at 11:44:28AM +1000, Bruce Evans wrote:
> Many style bugs are visible in this patch:
> - sysexits.h is used
Bruce, until sysexits(3) doesn't explicitly say it shouldn't be used,
please stop calling this a bug, because you are just confusing people.
At this point sysexits(3) actually even suggests it is blessed by
style(9). This is how it starts:
According to style(9), it is not a good practice to call exit(3) with
arbitrary values to indicate a failure condition when ending a program.
Instead, the pre-defined exit codes from sysexits should be used, so the
caller of the process can get a rough estimation about the failure class
without looking up the source code.
In my personal opinion it doesn't hurt to use sysexits(3) - if you don't
want to interpret exit status then treat every value != 0 as an error.
In HAST (IIRC) I do interpret exit status - if I get EX_TEMPFAIL, I know
I can try to restart the process, if I get something else I don't
restart it, as I risk an infinite loop.
Apart from my personal opinion, if you want to call it a bug and not
confuse people, then start discussion and change the manual page to
recommend avoiding sysexits(3). As of now we are just sending mixed
signals and create confusion.
Pawel Jakub Dawidek http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://mobter.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
More information about the svn-src-head