From 741710c27c1749b81be4260a2ce0c18b319623cd Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Sun, 4 Oct 2015 18:35:26 +0200 Subject: use exit code 3 for version and help Plugins which use OK state for help or version information may run unnoticed in that modes without doing any check. So its good style to let version and help exit with Unknown state. Signed-off-by: Sven Nierlein --- doc/developer-guidelines.sgml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/developer-guidelines.sgml b/doc/developer-guidelines.sgml index d9340285..228d3fa1 100644 --- a/doc/developer-guidelines.sgml +++ b/doc/developer-guidelines.sgml @@ -194,13 +194,15 @@ 3 Unknown - Invalid command line arguments were supplied to the + Invalid command line arguments were supplied to the plugin or low-level failures internal to the plugin (such as unable to fork, or open a tcp socket) that prevent it from performing the specified operation. Higher-level errors (such as name resolution errors, socket timeouts, etc) are outside of the control of plugins and should generally NOT be reported as UNKNOWN states. - + + The --help or --version output should also result in Unknown state. + @@ -610,6 +612,9 @@ The option -v or --verbose should be present in all plugins. The user should be allowed to specify -v multiple times to increase the verbosity level, as described in . + + The exit code for version information or help should be UNKNOWN + (3).
-- cgit v1.2.3