autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: systems requiring exit?


From: Thomas Dickey
Subject: Re: systems requiring exit?
Date: Tue, 14 Nov 2006 11:51:42 -0500 (EST)

On Tue, 14 Nov 2006, Matthew Woehlke wrote:

Thomas Dickey wrote:
On Mon, 13 Nov 2006, Paul Eggert wrote:
If they conform to C89 there should be no problem.  In C89, returning
N from 'main' is like 'exit(N)'.  This thread is about pre-C89 systems
where the return value from 'main' is mangled.

For example (reading the comments that you made earlier, perhaps you should learn something old about C89):

In that case, it sounds like we should suggest to people that they use
the POSIX environment rather than try to port to a C-only environment.
But I am surprised that a C-only environment would mess up in this
way, even on mainframes.

VMS, where an application can return EXIT_SUCCESS or EXIT_FAILURE from main - but (still complying with C89), those are not 0 and 1 respectively.

Isn't that exactly what I said? :-) (I even used VMS...) You may want to re-read the thread; I think the consensus was that this is a different issue.

I read it, didn't care for the response.  But since you ask:

        hmm - VAX's were introduced as large minicomputers (if you're
        thinking that everthing bigger than a PC is a mainframe, I
        suppose that's a reflection of when you picked up the term).

        VMS uses more than one value for success - typical applications
        add a mask to quiet messages on exit.  There's also a field used
        to specify a message to associate with the code.  But as noted,
        EXIT_SUCCESS and EXIT_FAILURE are defined properly for ISO C
        applications.

        It doesn't need exit.  No point in commenting if all you can say
        is "maybe".

        "has to deal" sounds like the sort of comments that Eggert makes -
        which caught my attention on this list.  A shame, when a few
        moments reading on the web would have answered the question.

quote from the referenced message:

Hmm, mainframes? I want to say VMS also uses 'return 1' for success (or
maybe it even needs exit; I'm not the one that has to deal with our VMS
systems). But as I recall VMS doesn't have a POSIX shell either. Is there
any VMS support that anyone is worried about?

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]