[monitoring-plugins] use exit code 3 for version and help

Sven Nierlein git at monitoring-plugins.org
Sun Oct 4 23:50:10 CEST 2015


 Module: monitoring-plugins
 Branch: master
 Commit: 741710c27c1749b81be4260a2ce0c18b319623cd
 Author: Sven Nierlein <sven at nierlein.de>
   Date: Sun Oct  4 18:35:26 2015 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=741710c

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 <sven at nierlein.de>

---

 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 d934028..228d3fa 100644
--- a/doc/developer-guidelines.sgml
+++ b/doc/developer-guidelines.sgml
@@ -194,13 +194,15 @@
 					<row>
 						<entry align="center"><para>3</para></entry>
 						<entry valign="middle"><para>Unknown</para></entry>
-						<entry><para>Invalid command line arguments were supplied to the 
+						<entry><para>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.
-						</para></entry>
+						</para>
+						<para>The --help or --version output should also result in Unknown state.</para>
+						</entry>
 					</row>
 				</tbody>
 			</tgroup>
@@ -610,6 +612,9 @@
 		<para>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 <xref linkend="verboselevels">.</para>
+
+		The exit code for version information or help should be UNKNOWN
+		(3).</para>
     </section>
 
     <section>



More information about the Commits mailing list