[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
style, sysexits(3), and man RETURN VALUES for sys programs
Rhialto pointed me to sysexits(3) that was exactly what I was looking
for (for inetd(8) revision). So kudos to him!
I'm converting inetd(8) to exiting with conventional values defined
in sysexits(3) since:
- it auto-documents the code;
- it allows to script in a consistent manner the return status
of a sys program;
- it is a help when tracking a bug since it can point the
developer at the culprit or at least narrow down what to look for.
So I suggest to add a mention of sysexits(7) to style.
Furthermore, I'm adding a RETURN VALUES section to inetd.8 and I think
it should be standard practice for sys programs.
But I'd like also to request some additions to sysexits(3):
- a EX_RESOURCES, for an error not in the flow of the program but
due to a contextual exhaustion of resources (for example allocations
on the heap---that's the error detected even if there is probably
another problem elsewhere in this case, except in very small memory
- More fine grained error values for EX_OSERR; specially, error
for major interfaces---I'd like a EX_KEVENT for example;
BTW, and still concerning style, is there a defined way of generating a
MAN page needing to edit some part of the manual (ex.: usage) depending
on some macros defined or not (in the case of inetd.8---even if this is
not an actual problem because LIBWRAP is always defined---the [-l] flag
depends on the macro; but it is always present in the usage).
Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C
Main Index |
Thread Index |