From: Richard W.M. Jones Date: Wed, 2 Mar 2011 07:42:44 +0000 (+0000) Subject: docs: Document the exit status of the script. X-Git-Tag: 1.9~1 X-Git-Url: http://git.annexia.org/?p=virt-what.git;a=commitdiff_plain;h=5453cf333745418a641374e19fd968519fd7de30 docs: Document the exit status of the script. --- 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.