(BWDIC!) No! Let $! be errno, and $? the sole exit status..
commit5fd6da65ddb8847891cd4e68e298eb6f8da952bb
authorSteffen (Daode) Nurpmeso <steffen@sdaoden.eu>
Tue, 28 Feb 2017 21:35:07 +0000 (28 22:35 +0100)
committerSteffen (Daode) Nurpmeso <steffen@sdaoden.eu>
Thu, 13 Apr 2017 21:07:02 +0000 (13 23:07 +0200)
treea2fddf4b101f075d402c603f017eee51b47211f4
parent48375da1cdc6e6f823ef92a3f8b2cf389ddf34ce
(BWDIC!) No!  Let $! be errno, and $? the sole exit status..

Making a difference in a "soft" and a "hard" exit status because
of state machine restrictions is a screaming mess.  No.

Instead we have introduced our own errno(X) wrapper machinery in
(Our own layer onto errno, yet too high), and now turn to use it
and report "the errno" via $! (and as well in $^ERR, $^ERRNAME,
$^ERRDOC).

Adjust the state machinery to allow more exit statuses than (-1),
0 and 1, and let $? thus be _the_ exit status.
Introduce the new *errexit* variable which acts the same as what
"set -e" does in a POSIX sh(1)ell, obsolete *batch-exit-on-error*,
which just maps to *errexit* until it is dropped.
Add a new $POSIXLY_CORRECT/*posix* entry and exit the program if
an error occurs during loading of resource files during startup.
25 files changed:
accmacvar.c
auxlily.c
cc-test.sh
cmd-misc.c
cmd-tab.h
dotlock.c
go.c
head.c
ignore.c
maildir.c
main.c
mime-param.c
nail.1
nail.h
nailfuns.h
nam-a-grp.c
popen.c
send.c
sendout.c
shexp.c
smtp.c
spam.c
thread.c
urlcrecry.c
xssl.c