Comment 4 for bug 176464

Revision history for this message
Derick Eddington (derick-eddington) wrote : Re: [Bug 176464] Re: ikrt_exit should unfix exit status number

I apologize if I came across weird by being overly pedantic. I was in
"assertions are just brainstorming" mode after thinking about what you
mentioned.

> Which C standard are you referring to here?
>

ANSI C. I said "conform" because I was thinking Ikarus's C code wants
to be as portable as reasonable, and ANSI C only provides EXIT_SUCCESS
and EXIT_FAILURE and that implies, although probably a non-existent
issue now days, EXIT_SUCCESS and EXIT_FAILURE are not necessarily 0 and
not-0.

Including the Scheme booleans and UNIX [0, 255] comments under "conform"
didn't make sense.

> I couldn't find anywhere in the manuals that I have where it says
> that that the exit status returned should be n modulo 256. So,
> where did you read that?
>

That was just my suggested idea so that exit numbers [0, 255] can be
used on OSes that support it. POSIX says the value of status & 0377 is
returned to the parent process, so I thought that should be supported on
POSIX systems.

The idea about also having the Scheme semantics of #f / not-#f
(excluding for integers) translate to EXIT_FAILURE and EXIT_SUCCESS
seemed like a natural fit.