From 5453cf333745418a641374e19fd968519fd7de30 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 2 Mar 2011 07:42:44 +0000 Subject: [PATCH] docs: Document the exit status of the script. --- virt-what.pod | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/virt-what.pod b/virt-what.pod index 0a724d4..156406e 100644 --- a/virt-what.pod +++ b/virt-what.pod @@ -163,6 +163,22 @@ Status: confirmed by RWMJ =back +=head1 EXIT STATUS + +Programs that use or wrap C should check that the exit +status is 0 before they attempt to parse the output of the command. + +A non-zero exit status indicates some error, for example, an +unrecognized command line argument. If the exit status is non-zero +then the output "facts" (if any were printed) cannot be guaranteed and +should be ignored. + +The exit status does I have anything to do with whether the +program is running on baremetal or under virtualization, nor with +whether C managed detection "correctly" (which is basically +unknowable given the large variety of virtualization systems out there +and that some systems deliberately emulate others). + =head1 IMPORTANT NOTE Most of the time, using this program is the I thing to do. -- 1.8.3.1