Q: Why does HSI return exit code 0 even when there's an error during a session?

A: This may be a wrapper script problem. HSI is coded to return an exit code any time an error occurs, although it

is possible that there is a bug that causes this not to happen.   However, the HSI (and HTAR) wrapper scripts that were originally posted on this web site, and were in use at several sites, substituted exit code 0 for EX_USAGE (64)

errors, and also then issued a warning message:

   "###WARNING  hsi returned non-zero exit status."

if a non-zero exit code was set.


EX_USAGE is commonly set for common errors such as unrecognized or missing options, and the original 

thought was to avoid issuing the above warning message for interactive sessions where the user made

a typing mistake, etc.  However, this also could result in setting exit code 0 and causing problems for

scripts that depended on knowing that an error had occurred.  The check for EX_USAGE errors has been

removed from the HSI/HTAR wrapper scripts on this web site.