Otherwise, 126 and 127 would clash with bash and zsh's use.
Higher than 127 would look like signals. And 256 would wrap
to a falsely succesful zero.
.fi
.SH "EXIT STATUS"
.B mhparam
-returns the number of components that were not found.
+returns the number of components that were not found,
+but limits just the return value to 120 to avoid ambiguity,
+e.g.\& 127 is used by shells to indicate `command not found',
+and 256 would wrap to 0, falsely indicating success.
+.
.SH FILES
.fc ^ ~
.nf
run_test "echo $?" 3
set -e
+# And clips their numbers to avoid a misleading exit value.
+while read use want; do
+ r=0
+ mhparam `yes nonexistent | sed ${use}q` || r=$?
+ run_test "echo $r" $want
+done <<\E
+119 119
+120 120
+121 120
+E
+
# mhparam -debug
# Some of its output depends on configure options, so don't bother to
# check for correctness here.
printf("%s: ", comps[i]);
puts(value);
- } else
+ } else if (missed < 120)
missed++;
}
}