[Info-vax] Suppressing DCL exit status messages
Simon Clubley
clubley at remove_me.eisner.decus.org-Earth.UFP
Tue Sep 12 08:34:37 EDT 2023
On 2023-09-11, gah4 <gah4 at u.washington.edu> wrote:
>
> It was a C program that I wrote, and that had exit(8); in it.
>
> There was no access violation.
>
I am surprised nobody told you the error message could be suppressed
if you set the right bit in the exit status you return to DCL:
$ exit 8
%SYSTEM-W-ACCVIO, access violation, reason mask=00, virtual address=0000000000000008, PC=000000007AF0D9F0, PS=00000000
$ write sys$output $status
%X00000008
$ exit %x10000008
$ write sys$output $status
%X10000008
Note that it's that specific bit which needs setting as you still get
the message in this case:
$ exit %x40000008
%SYSTEM-W-ACCVIO, access violation, reason mask=00, virtual address=0000000040000008, PC=000000007AF0D9F0, PS=00000000
$ write sys$output $status
%X40000008
You can mask off the top 4 bits (the internal control flags) to
extract out the actual number your program returned to your DCL script.
Not sure where I found this out because it's not in the manuals
I just checked.
Simon.
--
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
More information about the Info-vax
mailing list