On Thu, Aug 3, 2023 at 4:05 PM Niels Liisberg <nli@xxxxxxxxxxxxxxxxx> wrote:
just to continue Richard ....
STDOUT and STDERR - to be more correct.
Richard barely acknowledges that stderr is the Unix convention for
reporting error messages. He definitely does not think it has any role
on IBM i, even in PASE, and he does not offer it as an option in his
utilities. In his mind, STDOUT is mainly what Unix people think stderr
is. Occasionally, he thinks of STDOUT as a combination of Unix's
stdout and stderr. I think it's pretty normal for people to mentally
combine stdout and stderr because by default, both of those are sent
to the screen.
But all of that is kind of tangential to OP's question about the
numeric exit *codes* returned by QSH. The fact is, there is no
standardized meaning for those codes. It's up to each individual
application. Different programs can use the same numeric values to
mean different things. The closest thing to a universal convention for
those exit codes is: zero means "normal" termination, nonzero means
"abnormal" termination. An old Unix tradition is to return 2 for
command line syntax error, and 1 for any other kind of error, but even
that is a fairly weak convention.
John Y.
As an Amazon Associate we earn from qualifying purchases.