From: Dan.Pop@mail.cern.ch (Dan Pop)
Subject: Re: Successful and not successful completion
Date: 1995/08/12 [thread overview]
Message-ID: <danpop.808270264@rscernix> (raw)
In-Reply-To: 40jajf$mt0@gap.cco.caltech.edu
In <40jajf$mt0@gap.cco.caltech.edu> carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
>In article <danpop.808262674@rscernix>, Dan.Pop@mail.cern.ch (Dan Pop) writes:
>=In <40iqa1$4eg@gap.cco.caltech.edu> carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
>=
>=>43, F for 44, and ? for 45-47. Similarly, messages 1-7 are
>=>"%SYSTEM-x-NORMAL, normal successful completion", while 0 is
>=>"%NONAME-W-NOMSG, Message number 00000000". Note: The C RTL, in a fit of
>=>accomodation to Unix, converts an exit status of zero to 1.
>=
>=Nope. It does this in a fit of ANSI/ISO C compliance. Before the ANSI
>=standard (and some time after :-) the VMS C RTL couldn't care less about
>=the Unix conventions WRT exit status codes.
>
>Hmmm. I thought the ANSI standard required that a successful exit status be
>defined by keyword. The exit() function in the VAX C RTL converted zero to one
>before the ANSI standard was adopted. return, on the other hand, left the
>value untouched.
The ANSI standard guarantees that returning a value from (the initial
invocation of) main() has the same effect as calling exit() with that
value as argument. This is what DEC C does nowadays. ANSI also
guarantees that 0 and EXIT_SUCCESS have the same effect when passed to
exit(), but it doesn't require that EXIT_SUCCESS is defined as 0 (and
DEC C for OpenVMS doesn't define EXIT_SUCCESS as 0).
Dan
--
Dan Pop
CERN, CN Division
Email: Dan.Pop@mail.cern.ch
Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
next prev parent reply other threads:[~1995-08-12 4:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-08-09 4:00 Successful and not successful completion caip.rutgers.edu!halasz
1995-08-12 4:00 ` Carl J Lydick
1995-08-12 4:00 ` Dan Pop
1995-08-12 4:00 ` Carl J Lydick
1995-08-12 4:00 ` Dan Pop [this message]
1995-08-12 4:00 ` David P. Murphy
-- strict thread matches above, loose matches on Subject: below --
1995-08-10 4:00 fairfield
1995-08-10 4:00 ` halasz
1995-08-10 4:00 ` fairfield
1995-08-10 4:00 ` Jeffrey L. Sue
1995-08-11 4:00 ` Derek Dongray
1995-08-12 4:00 ` Carl J Lydick
1995-08-12 4:00 ` Carl J Lydick
1995-08-14 4:00 ` Stephen Hoffman
[not found] ` <950811113507.608e@alpha.vitro.com>
1995-08-17 4:00 ` halasz
1995-08-24 4:00 ` System Manager
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox